* https://en.wikipedia.org/wiki/OpenMediaVault ===== Guide to install ovm on qnap ====== Feedback welcome at: * https://github.com/amouiche/qnap_mtd_resize_for_bullseye/issues/59 ==== HardWare ===== ==== TS-420u (arm) ==== * https://www.qnap.com/en/product/ts-420u# 1GB * https://www.qnap.com/en/download?model=ts-420u * https://docs.qnap.com/operating-system/qts/4.2.x/cat1/qts4.2.2-ug-cat1-en-us.zip * https://eu1.qnap.com/TechnicalDocument/Storage/Repair%20Manual/nas-repair-manual-en-us.pdf * http://169.254.100.100:8080 (if no DhCp) * https://www.qnap.com/en/news/2013/qnap-launches-new-budget-friendly-4-drive-rackmount-nas-for-workgroups-and-entry-level-smbs# 2013 * https://camelcamelcamel.com/QNAP-TS-420U-NAS-bays-TS-420U-EU/product/B00C1T4CZW# * https://www.upcitemdb.com/upc/163120803903# * UPC: 163120803903 EAN: 062450762486 PRODUCT GROUP: PC Accessory CATEGORY: Personal Computers MANUFACTURER: QNAP MODEL: TS-420U * https://keepa.com/#!product/4-B00C1T4CZW# AsIn * UPC 163120803903 624507624868 132017730301 ==== Specs ==== Power Consumption (W) Sleep mode: 15W In operation: 29W (with 4 x 500GB HDD installed) * https://www.qnap.com/en/product/ts-420u/specs/software * https://www.qnap.com/en/product/ts-420u/app_center/# QPkG Review: * https://www.technologyx.com/news/qnap-introduces-new-budget-friendly-turbo-ts-420u-and-ts-421u-rackmount-nas-units/ ==== Boot ==== I got one without drive, I put blank 120GB SSD in it booted without disk it i was able to see it from my DHCP server ssh to it worked too (admin:admin) uname -a Linux NASxxxxxx 3.4.6 #1 Wed Jun 19 10:48:42 CST 2024 armv5tel unknown dmesg | more [ 18.472309] orion_spi orion_spi.0: master is unqueued, this is deprecated [ 18.479303] m25p80 spi0.0: found MC N25Q128, expected m25p128 [ 18.485077] m25p80 spi0.0: MC N25Q128 (16384 Kbytes) cat /proc/partitions major minor #blocks name 31 0 512 mtdblock0 # 1024+0 31 1 2048 mtdblock1 31 2 9216 mtdblock2 31 3 3072 mtdblock3 31 4 256 mtdblock4 31 5 1280 mtdblock5 8 32 125034840 sdc === Install === From WebGUI I install the supported fw * https://download.qnap.com/Storage/TS-420U/TS-420U_20240619-4.3.3.2784.zip Then i was able to install the OS to the HDD * http://192.168.1.215:8080/cgi-bin/quick/html/index.html#upgrade /dev/sdc3 115.9G 361.1M 115.0G 0% /share/HDC_DATA cat /proc/mdstat Personalities : [raid1] [linear] [raid0] [raid10] [raid6] [raid5] [raid4] md4 : active raid1 sdc2[0] 530128 blocks super 1.0 [2/1] [U_] md13 : active raid1 sdc4[0] 458880 blocks super 1.0 [4/1] [U___] bitmap: 7/8 pages [28KB], 32KB chunk md9 : active raid1 sdc1[0] 530112 blocks super 1.0 [4/1] [U___] bitmap: 9/9 pages [36KB], 32KB chunk === Tweaked u-boot for recent kernel === ubootcfg -b 0 -f /dev/mtdblock4 -o - | sed "s/^\(bootargs=.*\)/\1 mem=768M/" > /tmp/debian.uboot grep "^bootargs" /tmp/debian.uboot # Check it looks sane # bootargs=console=ttyS0,115200 root=/dev/ram initrd=0xa00000,0x900000 ramdisk=34816 mem=768M ubootcfg -b 0 -f /dev/mtdblock4 -i /tmp/debian.uboot # Update /dev/mtdblock4 by using /tmp/debian.uboot done === debian-10 installer === time sh flash-debian # rather long (10min?) Updating MAC address... Update /dev/mtdblock4 by using /tmp/debian.30950 done Your MAC address is 00:08:9B:FF:FF:FF Writing debian-installer to flash... done. Please reboot your QNAP device. time apt install -y etckeeper sudo avahi-daemon screen busybox-static mosh time curl /usr/share/flash-kernel/dtb-probe/kirkwood-qnap kirkwood-qnap: machine: QNAP TS419 family kirkwood-ts419-6282.dtb === remap mtd === cat /proc/mtd dev: size erasesize name mtd0: 00080000 00001000 "U-Boot" mtd1: 00200000 00001000 "Kernel" mtd2: 00900000 00001000 "RootFS1" mtd3: 00300000 00001000 "RootFS2" mtd4: 00040000 00001000 "U-Boot Config" mtd5: 00140000 00001000 "NAS Config" curl -k -O https://raw.githubusercontent.com/amouiche/qnap_mtd_resize_for_bullseye/master/qnap_mtd_resize.py chmod a+x qnap_mtd_resize.py sudo ./qnap_mtd_resize.py --dry-run time sudo ./qnap_mtd_resize.py # TODO should it be done before ? grep -o "^mtd[^:]*" /proc/mtd \ | while read t; do mkdir -pv "$t.dir.tmp" time dd if="/dev/$t" \ < /dev/null \ | xz -9 \ > "./$t.xz" \ ||: rmdir -pv "$t.dir.tmp" done cat /proc/mtd dev: size erasesize name mtd0: 00080000 00001000 "uboot" mtd1: 00300000 00001000 "Kernel" mtd2: 00c00000 00001000 "RootFS1" mtd3: 00200000 00001000 "Kernel_legacy" mtd4: 00040000 00001000 "U-Boot_Config" mtd5: 00040000 00001000 "NAS_Config" # echo "COMPRESS=xz" | sudo tee -a /etc/initramfs-tools/conf.d/compress === debian 11 upgrade === * https://www.debian.org/releases/bullseye/releasenotes * https://www.debian.org/releases/bullseye/armel/release-notes.en.txt === debian 12 upgrade === WoL was not working, see related chapter /usr/sbin/qcontrol buzzer short /usr/sbin/qcontrol time apt-get dist-upgrade # 40min /dev/sda2 116G 1.6G 109G 2% / reboot cat /proc/version Linux version 6.1.0-32-marvell (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 Debian 6.1.129-1 (2025-03-06) ==== omv / setup ==== * https://docs.openmediavault.org/en/stable/installation/index.html * https://docs.openmediavault.org/en/stable/installation/on_debian.html apt-get install --yes gnupg wget sudo wget --quiet --output-document=- https://packages.openmediavault.org/public/archive.key | sudo gpg --dearmor --yes --output "/usr/share/keyrings/openmediavault-archive-keyring.gpg" cat < ==== omv / use ==== * http://00089bFFffFF.local/#/dashboard * https://docs.openmediavault.org/en/stable/installation/index.html SsH will be lost need to emable it again from: * http://00089bFFffFF.local/#/dashboard Add users: * http://00089bFFffFF.local/#/usermgmt/users ToDo: * https://github.com/search?q=org%3AOpenMediaVault-Plugin-Developers+armel&type=issues * https://github.com/OpenMediaVault-Plugin-Developers/packages/issues/6 * https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-omvextrasorg/issues/39#issuecomment-606585230 * https://www.reddit.com/r/OpenMediaVault/comments/rfqupt/is_it_worth_using_anymore/ ==== WoL ==== * https://michael.stapelberg.ch/posts/2014-01-28-qnap_ts119_wol/ * https://docs.openmediavault.org/en/stable/administration/general/network.html#ethernet # WoL * https://www.cyrius.com/debian/kirkwood/qnap/ts-41x/known-issues/# WoL * https://michael.stapelberg.ch/posts/2016-11-21-gigabit-nas-coreos/ * https://raw.githubusercontent.com/stapelberg/zkj-nas-tools/0c3dcd830be4314074463edc82c9b33dc31b1f18/wol-shutdown.service * https://tracker.debian.org/pkg/qcontrol * https://git.hellion.org.uk/qcontrol.git/ sudo /sbin/ethtool -s eth0 wol g && sudo /usr/sbin/qcontrol wol on && sudo poweroff unit=wol-shutdown file=/etc/systemd/system/$unit.service apt-get install ethtool curl sudo url="https://raw.githubusercontent.com/stapelberg/zkj-nas-tools/0c3dcd830be4314074463edc82c9b33dc31b1f18/wol-shutdown.service" curl -o "$file" "$url" sudo sed -e 's|wakeonlan|wol|g' -i $file systemctl list-units --type=device | grep net-eth | cut -d' ' -f 3 sys-devices-platform-mv643xx_eth_port.0-net-eth0.device sys-devices-platform-mv643xx_eth_port.1-net-eth1.device dpkg -L qcontrol | grep .service # /lib/systemd/system/qcontrol.service # /lib/systemd/system/qcontrold.service sudo zile /etc/systemd/system/wol-shutdown.service && sudo systemctl daemon-reload sudo systemctl enable /etc/systemd/system/wol-shutdown.service sudo systemctl status wol-shutdown || sudo journalctl -u wol-shutdown systemctl list-units --type=device # /sbin/ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Link partner advertised pause frame use: Symmetric Link partner advertised auto-negotiation: Yes Link partner advertised FEC modes: Not reported Speed: 1000Mb/s Duplex: Full Auto-negotiation: on Port: Twisted Pair PHYAD: 0 Transceiver: external MDI-X: Unknown Supports Wake-on: pg Wake-on: d Link detected: yes grep CONFIG_MARVEL /boot/config-$(uname -r) # config-6.1.0-32-marvell CONFIG_MARVELL_PHY=m CONFIG_MARVELL_10G_PHY=m # CONFIG_MARVELL_88X2222_PHY is not set * https://git.hellion.org.uk/?p=qcontrol.git;a=commit;h=cf77c72425a45541e8998c8c11605500440859a9 ==== RECOVER ==== * http://www.cyrius.com/debian/kirkwood/qnap/ts-41x/troubleshooting/ * http://www.cyrius.com/debian/kirkwood/qnap/ts-41x/recovery/ * https://github.com/amouiche/qnap_mtd_resize_for_bullseye/blob/master/Recovery.md * http://wiki.qnap.com/wiki/Firmware_Recovery sudo apt install isc-dhcp-server atftpd sudo file=F_TS-420U mac="00:08:9b:Ff:Ff:Ff" filename=F_TS-420U # TODO use default net : http://169.254.100.100:8080 (if no DhCp) file -E /srv/tftp/$file cat< /etc/dhcp/dhcpd.conf systemctl restart isc-dhcp-server.service || journalctl -u isc-dhcp-server.service journalctl -f -u isc-dhcp-server.service double beep loud fan still blinking blink red and green ping 192.168.0.71 ssh installer@192.168.0.71 ls /dev/disk/by-id/* | grep -v 'ata' | while read t; do mkdir -p /mnt/$t && mount $t /mnt/$t ; done cd /mnt/dev/disk/by-id/wwn-xxx-part2 mount --bind /mnt/dev/disk/by-id/wwn-xxx-part1 ./boot time flash-kernel EOF ==== misc ==== * http://www.cyrius.com/debian/kirkwood/qnap/ts-41x/ * http://archive.debian.org/debian/dists/buster/main/installer-armel/current/images/kirkwood/network-console/qnap/ts-41x/ * https://github.com/amouiche/qnap_mtd_resize_for_bullseye/blob/master/Recovery.md * https://forum.openmediavault.org/index.php?thread/46448-omv-5-on-a-arm-based-qnap-ts410/&postID=340887&highlight=%2522TS-410%2522#post340887 * http://www.cyrius.com/debian/kirkwood/qnap/ts-41x/known-issues/# * BUG: Bad rss-counter state * https://bugs-devel.debian.org/cgi-bin/bugreport.cgi?bug=928706 * https://blog.spblinux.de/2018/09/debian-with-btrfs-on-qnap-11x-21x-kirkwood/ * https://lists.debian.org/debian-arm/2018/06/msg00003.html * https://lists.debian.org/debian-arm/2019/04/msg00031.html * https://people.debian.org/~timo/qnap/ * https://lore.kernel.org/linux-arm-kernel/1501094452.29118.5.camel@hellion.org.uk/T/#mf22f4bf7c03eaa5bfe756343c6535d1bd58f86ba * https://lore.kernel.org/linux-arm-kernel/1501094452.29118.5.camel@hellion.org.uk/T/#m16bf67ffebb52afb27bfcdeb6d1a43a3d988b3f5 * kirkwood-ts419-6282.dtb KirkWood ==== MORE ==== @TaG: NaS