Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3247

Iomage IX2 really old uboot (1 reply)

$
0
0
I have an Iomega IX2 2-drive NAS (original version) that I wanted to get working with a newer version of Linux. Iomega actually had the two hard drives arranged in two RAID 1’s – a small one for /tmp and user configurations, and a much larger RAID for data. Since the stock uboot booted Linux from NAND, it could still boot Linux even if one or both hard drives failed. As far as I know there is no replacement uboot available but I was able to get the stock uboot to bring up Debian 5.13.6. I still wanted it to boot in case one drive failed and I was following bobafetthotmail’s Making a Raid 1 rootfs but ran into a curious problem when trying to get uboot to choose which drive to boot.

Either the version of uboot on this IX2 is so old, or, Iomega chose not to include it, but the version of uboot on this NAS has no IF-THEN commands. It also has no FOR-NEXT or WHILE-DONE either. I came up with this to boot a working hard drive:
setenv bootargs_console 'console=ttyS0,115200'
setenv bootcmd_ide0 'ide reset; ext2load ide 0:1 0x800000 /boot/uImage; ext2load ide 0:1 0x2100000 /boot/uInitrd'
setenv bootcmd_ide1 'ide reset; ext2load ide 1:1 0x800000 /boot/uImage; ext2load ide 1:1 0x2100000 /boot/uInitrd'
setenv bootcmd_stock 'nand read 0x800000 uImage; nand read 0x2100000 uInitrd; bootm 0x00800000 0x2100000'
setenv bootcmd 'setenv bootargs $(bootargs_console) root=LABEL=rootfs rootfdelay=10 earlyprintk=serial; run bootcmd_ide1; run bootcmd_ide0; run bootcmd_stock'
This works and I tested it by having two identical boot drives. It still booted with one or the other removed. Since the idea was to make the rootfs into a RAID 1, this should be fine but it seems a bit clunky. Is there a better way to get uboot to choose a boot drive?

Viewing all articles
Browse latest Browse all 3247

Trending Articles