The Netgear ReadyNAS 104 comes shipped with U-Boot. To access its "shell" remove the small quadratic sticker at the backside to reveal the UART pins (3V3, pinout available at Arnaud's NAS page[1]) and connect a matching adapter. Also connect a network cable to the lower jack.
Then on a different machine in the same network setup a tftp server (e.g.
apt-get install tftpd-hpa
). As of today the latest beta netboot installer
(Beta 2) doesn't work any more because the kernel in jessie was updated since
the installer was released. So pick up the armhf netboot installer from the
daily snapshots. You
need
initrd.gz
and vmlinuz.
Furthermore
armada-370-netgear-rn104.dtb.
Update: As jessie is released now, download the following images:
To make the installer ready to boot do:
# apt-get install u-boot-tools
$ cat vmlinuz armada-370-netgear-rn104.dtb > vmlinuz-rn104
$ mkimage -A arm -O linux -T multi -C none -a 0x04000000 -e 0x04000000 -n "Debian Jessie armhf installer" -d vmlinuz-rn104:initrd.gz uImage-installer-rn104
# cp uImage-installer-rn104 /srv/tftp
Then on the U-Boot shell setup networking and start the installer by issuing the following commands:
dhcp
setenv serverip 192.168.1.17
tftp uImage-installer-rn104
bootm $load_addr
With 192.168.1.17
being the IPv4 of the machine you set up the tftp server
above, adapt accordingly to your setup.
While in U-Boot the default ethernet device is the lower jack, the installer is only able to use the upper, so replug the ethernet cable to the upper receptacle.
Go through the installation, and before rebooting do the following: Select "Change debconf priority" and set it to "low". Then "Download installer components" and check "mtd-modules-3.16.0-4-armmp-di". After that "Execute a shell" and do:
# echo "The following is dangerous, see Note below!"
# depmod -a
# modprobe pxa3xx_nand
# mount --bind /proc /target/proc
# chroot /target
# cat >> /etc/flash-kernel/db << EOF
Machine: NETGEAR ReadyNAS 104
DTB-Id: armada-370-netgear-rn104.dtb
DTB-Append: yes
Mtd-Kernel: uImage
Mtd-Initrd: minirootfs
U-Boot-Kernel-Address: 0x04000000
U-Boot-Initrd-Address: 0x05000000
Required-Packages: u-boot-tools
EOF
# flash-kernel
You then need to adapt the u-boot environment to pass the right root parameter
to Linux. Alternatively add Bootloader-Sets-Incorrect-Root: yes
to
/etc/flash-kernel/db
.
Note: flash-kernel as of now (flash-kernel 3.35+deb8u2 and also 3.56) doesn't handle bad blocks correctly. This might damage your flash beyond repair! So maybe better don't setup flash-kernel as suggested above. Use at your own risk.
[1] Note this page is about a ReadyNAS 102, the pinout is identical though.