Welcome! Log In Create A New Profile

Advanced

GoFlex Net: Boot from USB while SATA disks connected

Posted by cyb 
Re: GoFlex Net: Boot from USB while SATA disks connected
October 29, 2012 08:45AM
To use the the label based function you need an initrd. The kernel needs to know where to find root via a device, it cannot scan for labels, UUIDs, etc. By using an initrd you present a temporary rootfs the kernel can attach to, along with enough userland tools to do fancy volume searches based on UUID, labels, etc, and to then REMOUNT root and continue booting.

Because Arch ARM doesn't use an initrd, this path isn't available to it. You can however setup uboot manually to boot whatever drive layout you want statically, or define multiple boot scenarios and wait for the user to choose the one they want at powerup assuming they have working console access.
Re: GoFlex Net: Boot from USB while SATA disks connected
February 01, 2013 02:37PM
Hi,

I've bought an Iomega iConnect. I installed an Debian whezzy with this description http://www.kroonen.eu/wiki/Install%20Debian%202 and the system is running very well.
But one Problem is still there, when i connect the USB-device with the debian installed, and e.g. 2 external hard disks to the iConnect, it is searching for the rootfs for a while and then it starts from nand.
the USB-Device is labeled "rootfs", it is in the first usb-slot and without the other disks connected, the system will start from this.
The only thing i want is the ability to restart the iConnect with all disks connected and it starts into the debian system.
I have read ths thread more then 3 times, but i dont know where i have to change the settings ( or include the necessary phrases)
when you have a look at the code below, you will see my first try fix this issue at the end of the logs.
furthermore i didn't change anything. I hope you can help me

baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
usbstart=usb start
run_diag=yes
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
CASset=min
MALLOC_len=1
bootargs_root=root=/dev/nfs rw
bootargs_end=:::orion:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
eth1addr=XX:XX:XX:XX:XX:XX
eth1mtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(XX:XX:XX:XX:XX:XX,XX:XX:XX:XX),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
iomega=123
nandEcc=1bit
ethprime=egiga0
ethact=egiga0
ipaddr=192.168.100.97
serverip=192.168.100.91
arcNumber=1682
uboot_start=0x0
uboot_size=0xc0000
env_start=0xa0000
env_size=0x20000
kernel_start=0x100000
kernel_size=0x300000
initrd_start=0x540000
initrd_size=0x300000
flash_load=run make_boot_args load1 load2 boot
load1=nand read.e 0x2000000 $(kernel_start) $(kernel_size)
load2=nand read.e 0x4500000 $(initrd_start) $(initrd_size)
boot=bootm 0x2000000 0x4500000
krn=run a b c
rd=run d e f
a=tftp 0x2000000 zImage
b=nand erase $(kernel_start) $(kernel_size)
c=nand write.e 0x2000000 $(kernel_start) $(kernel_size)
d=tftp 0x4500000 initrd
e=nand erase $(initrd_start) $(initrd_size)
f=nand write.e 0x4500000 $(initrd_start) $(initrd_size)
flashall=run krn rd
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
hddPowerCtrl=no
enaAutoRecovery=yes
pcieTune=no
ethaddr=XX:XX:XX:XX:XX:XX
make_bootsetenv=make_boot_args setenv bootargs console=ttyS0,115200 mtdparts=orion_nand:;setenv bootargs $(bootargs)$(uboot_size)@$(uboot_start)(uboot),;setenv bootargs $(bootargs)$(env_size)@$(env_start)(env),;setenv bootargs $(bootargs)$(kernel_size)@$(kernel_start)(zImage),;setenv bootargs $(bootargs)$(initrd_size)@$(initrd_start)(initrd),;setenv bootargs
bootargs=setenv bootargs console=ttyS0,115200
boot_starsetenv=boot_start 0x980000
boot_sizesetenv=boot_size 0x1f400000
MAPOWERENV=Ver. 1.1.27 English
make_boot_args=setenv bootargs console=ttyS0,115200 mtdparts=orion_nand:;setenv bootargs $(bootargs)$(uboot_size)@$(uboot_start)(uboot),;setenv bootargs $(bootargs)$(env_size)@$(env_start)(env),;setenv bootargs $(bootargs)$(kernel_size)@$(kernel_start)(zImage),;setenv bootargs $(bootargs)$(initrd_size)@$(initrd_start)(initrd),;setenv bootargs $(bootargs)$(boot_size)@$(boot_start)(boot)
boot_start=0x980000
boot_size=0x1f400000
usb_scan_1=setenv usb 0:1; setenv dev sda1
usb_scan_2=setenv usb 1:1; setenv dev sdb1
usb_scan_3=setenv usb 2:1; setenv dev sdc1
usb_scan_4=setenv usb 3:1; setenv dev sdd1
usb_scan_5=setenv usb 0:1; setenv dev sda2
usb_scan_6=setenv usb 1:1; setenv dev sdb2
usb_scan_7=setenv usb 2:1; setenv dev sdc2
usb_scan_8=setenv usb 3:1; setenv dev sdd2
bootcmd_usb_1=run usb_scan_1;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /boot/uImage;bootm 0x00800000
bootcmd_usb_2=run usb_scan_2;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /boot/uImage;bootm 0x00800000
bootcmd_usb_3=run usb_scan_3;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /boot/uImage;bootm 0x00800000
bootcmd_usb_4=run usb_scan_4;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /boot/uImage;bootm 0x00800000
bootcmd_usb_5=run usb_scan_5;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /uImage;bootm 0x00800000
bootcmd_usb_6=run usb_scan_6;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /uImage;bootm 0x00800000
bootcmd_usb_7=run usb_scan_7;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /uImage;bootm 0x00800000
bootcmd_usb_8=run usb_scan_8;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /uImage;bootm 0x00800000
make_usb_bootargs=run make_boot_args; setenv bootargs $(bootargs) root=/dev/$(dev) rootdelay=10
bootcmd_usb=usb stop;usb start;run bootcmd_usb_1;run bootcmd_usb_2;run bootcmd_usb_3;run bootcmd_usb_4;run bootcmd_usb_5;run bootcmd_usb_6;run bootcmd_usb_7;run bootcmd_usb_8
bootcmd_usb1=usb stop;usb start;run bootcmd_usb_1;run bootcmd_usb_5
bootcmd=run bootcmd_usb1; run flash_load



Edited 1 time(s). Last edit at 02/01/2013 04:01PM by solidplanet.
Re: GoFlex Net: Boot from USB while SATA disks connected
February 01, 2013 03:27PM
The rootfs label approach is described here:
http://forum.doozan.com/read.php?3,8044,8152#msg-8152

Basically, rootfs label environment variable will tell uBoot to find the USB drive with that label and use that for booting. So does not matter how many drives are connected to the box, it will use the correct drive for rootfs, as long as it's the only drive with that specific label.
Re: GoFlex Net: Boot from USB while SATA disks connected
February 01, 2013 04:13PM
thank you for your fast feedback.
I unterstand the need of labeling the usb-device.
Now all i need is to know, in which argument and how i have to insert this phrase. I find there no argument usb_init or something else, thats fitts that way.
well, i know and see at the last 20 lines in the code posted by myself above there is the usb-initiation, but i dont know which one i have to change.
Can you give me a hint
thanks
Re: GoFlex Net: Boot from USB while SATA disks connected
February 01, 2013 04:45PM
The 2nd block of code is the full listing of uBoot envs on one of my plugs.

The 1st block of code is the list of the relevant uBoot envs in reversed order of variable assigments (backward from the bootcmd). It would be obvious what need to be changed when we substitue the value of each variable.

The crucial point here is the execution order ensures that the content of the variable usb_root is passed as an argument into the kernel correctly.

run usb_scan; setenv usb_root LABEL=rootfs
needs to run before
run usb_set_bootargs


Rootfs-related uBoot variable assignment:
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run sata_bootcmd; run rescue_bootcmd; run pogo_bootcmd; reset usb_rootfstype=ext3
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_init=run usb_scan; setenv usb_root LABEL=rootfs
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1


Full listing:
# fw_printenv
ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_device=0:1
usb_root=/dev/sda1
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
ethaddr=xx:xx:xx:xx:xx:xx
arcNumber=3089
rescue_installed=1
serverip=192.168.0.220
ipaddr=192.168.0.224
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole
usb_init=run usb_scan; setenv usb_root LABEL=rootfs
sata_boot=ide reset; mw 0x800000 0 1; ext2load ide 0:1 0x800000 /boot/uImage; if ext2load ide 0:1 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_bootcmd=run usb_set_bootargs; run sata_boot
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run sata_bootcmd; run rescue_bootcmd; run pogo_bootcmd; reset
usb_rootfstype=ext3

If you have more questions, please post and I'll try to answer them. If you are not sure if you have the envs modified correctly, post them here and we'll check.

Addendum:

There might be more explanation needed on my env for
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi

Looking at the content of usb_boot, I've found a flaw in the way we set up rootfs label. But it should not effect what was described above. Will revisit this in a different thread.



Edited 5 time(s). Last edit at 02/02/2013 12:46PM by bodhi.
Re: GoFlex Net: Boot from USB while SATA disks connected
February 02, 2013 02:44AM
solidplanet Wrote:
-------------------------------------------------------

baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
usbstart=usb start
run_diag=yes
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
CASset=min
MALLOC_len=1
bootargs_root=root=/dev/nfs rw
bootargs_end=:::orion:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
eth1addr=XX:XX:XX:XX:XX:XX
eth1mtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(XX:XX:XX:XX:XX:XX,XX:XX:XX:XX),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
iomega=123
nandEcc=1bit
ethprime=egiga0
ethact=egiga0
ipaddr=192.168.100.97
serverip=192.168.100.91
arcNumber=1682
uboot_start=0x0
uboot_size=0xc0000
env_start=0xa0000
env_size=0x20000
kernel_start=0x100000
kernel_size=0x300000
initrd_start=0x540000
initrd_size=0x300000
flash_load=run make_boot_args load1 load2 boot
load1=nand read.e 0x2000000 $(kernel_start) $(kernel_size)
load2=nand read.e 0x4500000 $(initrd_start) $(initrd_size)
boot=bootm 0x2000000 0x4500000
krn=run a b c
rd=run d e f
a=tftp 0x2000000 zImage
b=nand erase $(kernel_start) $(kernel_size)
c=nand write.e 0x2000000 $(kernel_start) $(kernel_size)
d=tftp 0x4500000 initrd
e=nand erase $(initrd_start) $(initrd_size)
f=nand write.e 0x4500000 $(initrd_start) $(initrd_size)
flashall=run krn rd
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
hddPowerCtrl=no
enaAutoRecovery=yes
pcieTune=no
ethaddr=XX:XX:XX:XX:XX:XX
make_bootsetenv=make_boot_args setenv bootargs console=ttyS0,115200 mtdparts=orion_nand:;setenv bootargs $(bootargs)$(uboot_size)@$(uboot_start)(uboot),;setenv bootargs $(bootargs)$(env_size)@$(env_start)(env),;setenv bootargs $(bootargs)$(kernel_size)@$(kernel_start)(zImage),;setenv bootargs $(bootargs)$(initrd_size)@$(initrd_start)(initrd),;setenv bootargs
bootargs=setenv bootargs console=ttyS0,115200
boot_starsetenv=boot_start 0x980000
boot_sizesetenv=boot_size 0x1f400000
MAPOWERENV=Ver. 1.1.27 English
make_boot_args=setenv bootargs console=ttyS0,115200 mtdparts=orion_nand:;setenv bootargs $(bootargs)$(uboot_size)@$(uboot_start)(uboot),;setenv bootargs $(bootargs)$(env_size)@$(env_start)(env),;setenv bootargs $(bootargs)$(kernel_size)@$(kernel_start)(zImage),;setenv bootargs $(bootargs)$(initrd_size)@$(initrd_start)(initrd),;setenv bootargs $(bootargs)$(boot_size)@$(boot_start)(boot)
boot_start=0x980000
boot_size=0x1f400000
usb_scan_1=setenv usb 0:1; setenv dev sda1
usb_scan_2=setenv usb 1:1; setenv dev sdb1
usb_scan_3=setenv usb 2:1; setenv dev sdc1
usb_scan_4=setenv usb 3:1; setenv dev sdd1
usb_scan_5=setenv usb 0:1; setenv dev sda2
usb_scan_6=setenv usb 1:1; setenv dev sdb2
usb_scan_7=setenv usb 2:1; setenv dev sdc2
usb_scan_8=setenv usb 3:1; setenv dev sdd2
bootcmd_usb_1=run usb_scan_1;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /boot/uImage;bootm 0x00800000
bootcmd_usb_2=run usb_scan_2;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /boot/uImage;bootm 0x00800000
bootcmd_usb_3=run usb_scan_3;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /boot/uImage;bootm 0x00800000
bootcmd_usb_4=run usb_scan_4;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /boot/uImage;bootm 0x00800000
bootcmd_usb_5=run usb_scan_5;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /uImage;bootm 0x00800000
bootcmd_usb_6=run usb_scan_6;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /uImage;bootm 0x00800000
bootcmd_usb_7=run usb_scan_7;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /uImage;bootm 0x00800000
bootcmd_usb_8=run usb_scan_8;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /uImage;bootm 0x00800000
make_usb_bootargs=run make_boot_args; setenv bootargs $(bootargs) root=/dev/$(dev) rootdelay=10
bootcmd_usb=usb stop;usb start;run bootcmd_usb_1;run bootcmd_usb_2;run bootcmd_usb_3;run bootcmd_usb_4;run bootcmd_usb_5;run bootcmd_usb_6;run bootcmd_usb_7;run bootcmd_usb_8
bootcmd_usb1=usb stop;usb start;run bootcmd_usb_1;run bootcmd_usb_5
bootcmd=run bootcmd_usb1; run flash_load


Hi I didn't change anything yet, because i dont know where to put or append or insert
setenv usb_root LABEL=rootfs
in my env args
please have a look



Edited 1 time(s). Last edit at 02/02/2013 05:17AM by solidplanet.
Re: GoFlex Net: Boot from USB while SATA disks connected
February 02, 2013 12:10PM
solidplanet,

If you don't have serial console to the Iconnect, I'd recommend that you set up netconsole first before changing uBoot envs. Because you could get locked out of the box with uBoot envs problem, and will have to resort to serial console. See this thread for instruction: http://forum.doozan.com/read.php?3,14
Re: GoFlex Net: Boot from USB while SATA disks connected
February 03, 2013 08:33AM
well, here are my resent changes:
MAPOWERENV=Ver. 1.1.27 English
make_boot_args=setenv bootargs console=ttyS0,115200 mtdparts=orion_nand:;setenv bootargs $(bootargs)$(uboot_size)@$(uboot_start)(uboot),;setenv bootargs $(bootargs)$(env_size)@$(env_start)(env),;setenv bootargs $(bootargs)$(kernel_size)@$(kernel_start)(zImage),;setenv bootargs $(bootargs)$(initrd_size)@$(initrd_start)(initrd),;setenv bootargs $(bootargs)$(boot_size)@$(boot_start)(boot)
boot_start=0x980000
boot_size=0x1f400000
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=setenv usb 0:1; setenv dev sda1
usb_scan_2=setenv usb 1:1; setenv dev sdb1
usb_scan_3=setenv usb 2:1; setenv dev sdc1
usb_scan_4=setenv usb 3:1; setenv dev sdd1
usb_scan_5=setenv usb 0:1; setenv dev sda2
usb_scan_6=setenv usb 1:1; setenv dev sdb2
usb_scan_7=setenv usb 2:1; setenv dev sdc2
usb_scan_8=setenv usb 3:1; setenv dev sdd2
usb_device=0:1
usb_root=/dev/sda1
usb_rootdelay=10
bootcmd_usb_1=run usb_scan_1;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /boot/uImage;bootm 0x00800000
bootcmd_usb_2=run usb_scan_2;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /boot/uImage;bootm 0x00800000
bootcmd_usb_3=run usb_scan_3;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /boot/uImage;bootm 0x00800000
bootcmd_usb_4=run usb_scan_4;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /boot/uImage;bootm 0x00800000
bootcmd_usb_5=run usb_scan_5;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /uImage;bootm 0x00800000
bootcmd_usb_6=run usb_scan_6;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /uImage;bootm 0x00800000
bootcmd_usb_7=run usb_scan_7;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /uImage;bootm 0x00800000
bootcmd_usb_8=run usb_scan_8;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /uImage;bootm 0x00800000
bootcmd_usb_9=run make_usb_bootargs1;ext2load usb $usb_device 0x00800000 /boot/uImage;bootm 0x00800000
bootcmd_usb_10=run make_usb_bootargs1;ext2load usb $usb_device 0x00800000 /uImage;bootm 0x00800000
make_usb_bootargs=run make_boot_args; setenv bootargs $(bootargs) root=/dev/$(dev) rootdelay=10
make_usb_bootargs1=run make_boot_args; setenv bootargs $(bootargs) root=$usb_root rootdelay=$usb_rootdelay
bootcmd_usb=usb stop;usb start;run bootcmd_usb_1;run bootcmd_usb_2;run bootcmd_usb_3;run bootcmd_usb_4;run bootcmd_usb_5;run bootcmd_usb_6;run bootcmd_usb_7;run bootcmd_usb_8
serverip=192.168.0.120
ipaddr=192.168.0.211
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole
usb_init=run usb_scan; setenv usb_root LABEL=rootfs
bootcmd_usb1=usb stop;usb start;run bootcmd_usb_1;run bootcmd_usb_5
bootcmd_usb2=usb stop;usb start;run usb_init;run bootcmd_usb_9;run bootcmd_usb_10
bootcmd=run bootcmd_usb2;run bootcmd_usb1; run flash_load

neither i tested the ncip console, nor the new startup
Just for a check:
can you go along with this changes, have i forgot something?
Re: GoFlex Net: Boot from USB while SATA disks connected
February 03, 2013 03:20PM
solidplanet Wrote:
-------------------------------------------------------

> usb_scan_list=1 2 3 4

Since you want to scan 8 USB devices, this list should be 1 to 8.

> serverip=192.168.0.120
> ipaddr=192.168.0.211
> if_netconsole=ping $serverip
> start_netconsole=setenv ncip $serverip; setenv
> bootdelay 10; setenv stdin nc; setenv stdout nc;
> setenv stderr nc; version;
> preboot=run if_netconsole start_netconsole

You netconsole setup looks good. If these are true:

serverip is the ip address of your desktop (where you want to monitor and interact with netconsole)
ipaddr is the ip address of the iConnect
192.168.0.x is your LAN

> usb_init=run usb_scan; setenv usb_root
> LABEL=rootfs[/b]
> bootcmd_usb1=usb stop;usb start;run bootcmd_usb_1;run bootcmd_usb_5
> bootcmd_usb2=usb stop;usb start;run usb_init;run bootcmd_usb_9;run bootcmd_usb_10

When you boot Debian, the uBoot image is /boot/uImage, so only bootcmd_usb_9 is needed.

> bootcmd=run bootcmd_usb2;run bootcmd_usb1; run flash_load

I could not tell if this works or not. The suggestions above only to point out the errors in the modified uBoot envs. As usual, the warning is: if this does not work, it could lock you out of the box, and serial console will be needed. If you could not boot in to Debian, and your netconsole does work, then you can recover without serial console. So please do so at your own risk :)

Addendum:
I think we are too far out of topic in this thread, please create another thread for Iomega iConnect.



Edited 1 time(s). Last edit at 02/03/2013 03:43PM by bodhi.
Re: GoFlex Net: Boot from USB while SATA disks connected
February 19, 2013 03:31PM
@solidplanet,

See this post for rootfs label change:
http://forum.doozan.com/read.php?2,6624,9123#msg-9123

If you still have difficulty, please post in this iconect thread: http://forum.doozan.com/read.php?3,3333, and I will help.
Is there a way to get USB HDD connected and get Pogo Pro work I'm on Arch linux arm and it does not works on label so even changing the label wont work ,have OXNAS device with 2.6 Kernel
Re: GoFlex Net: Boot from USB while SATA disks connected
March 11, 2013 02:04AM
Dinjo,

I have not play with it much. But I planned to take a look at the uBoot envs. Will let you know.

Do you have serial console?

- bodhi



Edited 1 time(s). Last edit at 03/11/2013 02:17AM by bodhi.
Re: GoFlex Net: Boot from USB while SATA disks connected
March 12, 2013 03:00AM
Dinjo,

I don't think we can manipulate the uBoot envs to make the PogoPro choose the correct drive! I've looked, the current uBoot version is too limited.
Ahh.... WarheadSE also said it kinda impossible on Pro , also i had issues when i connect my second HDD to Pro the device does not boot blinking green light
Re: GoFlex Net: Boot from USB while SATA disks connected
March 12, 2013 09:11PM
The sure way to have a consistent booting PogoPro is to use the Sata port inside.
There was this thread which says you can boot with secondary drive i tried never worked maybe you could give some hint how it can be achieved

http://archlinuxarm.org/forum/viewtopic.php?f=29&t=5034

http://archlinuxarm.org/forum/viewtopic.php?f=29&t=4488&start=40
Re: GoFlex Net: Boot from USB while SATA disks connected
March 13, 2013 03:17AM
You could use SATA for boot drive in a multiple drive configuration. You don't even have to use Warhead's method to bypass uBoot with SATA, just put the rootfs on a SATA drive in an eSATA enclosure, and connect it with SATA to eSATA cable.

The PogoPro is quite easy to open, plug in the cable, route it through the gap at the bottom front.
Re: GoFlex Net: Boot from USB while SATA disks connected
March 13, 2013 11:39AM
Is there a visual representation of how to open the pogo and which ports to connect , poor at hardware ;-)
Re: GoFlex Net: Boot from USB while SATA disks connected
March 13, 2013 12:03PM
I know these two:
Hack247
A Google+ contribution

---
Standart ist der Standardfehler
Re: GoFlex Net: Boot from USB while SATA disks connected
March 14, 2013 12:13AM
chessplayer Wrote:
-------------------------------------------------------
> I know these two:
> [url=http://www.hack247.co.uk/pogo-plug-pink-seria
> l-connection/]Hack247[/url]
> [url=https://plus.google.com/photos/11697247051289
> 5353815/albums/5686965546721880769]A Google+
> contribution[/url]

2nd one is WarheadsSE's page.
Re: GoFlex Net: Boot from USB while SATA disks connected
June 07, 2013 04:05PM
Hi,
are you still searching for solutions?
Just came across after setting it up for me and writing it down. I am booting from stick only. It shouldn't be that hard to manage the behavior from 1st post.
http://dev.shyd.de/2013/06/booting-with-uuid-not-device-name/

--
shyd

Goflex Net 3.9.5 | Dockstar 3.9.5 | http://dev.shyd.de
Re: GoFlex Net: Boot from USB while SATA disks connected
June 09, 2013 06:16AM
shyd,

thanks for sharing, but I believe that your solution is inferior to the one using LABEL which has been discussed all over the place here in this forum (for a complete printenv of the uBoot with usb_scan see, e.g, my post). The LABEL solution as well as yours (I believe) both come with a price tag: since this relies on Initrd and not just uImage, you cannot boot Archlinux with it (see here).

Or, does your solution using UUID have any other advantage which I can't see? To me, the LABEL solution leaves the option to use another key or external HDD with just the same label, which I find considerably more easy.

Cheers,

chessplayer

---
Standart ist der Standardfehler
Re: GoFlex Net: Boot from USB while SATA disks connected
June 09, 2013 06:37AM
chessplayer,

you are absolutely right. Yesterday I made these things work for my goflex on my own. After writing the article I noticed what is going on here. Using UUIDs would make sense if you have two drives with the same label attached.
After reading through it makes more sense to use a disk's label. Especially if you need to use a backup drive.
Thanks for the hint!

cheers

--
shyd

Goflex Net 3.9.5 | Dockstar 3.9.5 | http://dev.shyd.de
Re: GoFlex Net: Boot from USB while SATA disks connected
October 16, 2015 03:18PM
I have set up my goflex net to boot from label rootfs. I have set up a partition on the SATA, copied the rootfs from the sub stick onto, set the bootable flag, and labeled it rootfs, but it still doesnt boot up from the SATA drive. My goal is to have set this up so it can boot from both usb or SATA if the partition is labeled rootfs. Preferably it should boot from usb stick if both are present, but thats not so important.

I have the following configuration, is there something I need to change to make this work as I want?

# fw_printenv
ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_device=0:1
usb_root=/dev/sda1
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
ethaddr=00:10:75:26:71:9F
rescue_installed=1
arcNumber=3089
usb_init=run usb_scan; setenv usb_root LABEL=rootfs
usb_bootcmd=run usb_init; setenv usb_root LABEL=rootfs; run usb_set_bootargs; run usb_boot
Re: GoFlex Net: Boot from USB while SATA disks connected
October 16, 2015 04:24PM
amyren Wrote:
-------------------------------------------------------
> I have set up my goflex net to boot from label
> rootfs. I have set up a partition on the SATA,
> copied the rootfs from the sub stick onto, set the
> bootable flag, and labeled it rootfs, but it still
> doesnt boot up from the SATA drive. My goal is to
> have set this up so it can boot from both usb or
> SATA if the partition is labeled rootfs.
> Preferably it should boot from usb stick if both
> are present, but thats not so important.
>
> I have the following configuration, is there
> something I need to change to make this work as I
> want?
>
>
> # fw_printenv
> ethact=egiga0
> bootdelay=3
> baudrate=115200
> mainlineLinux=yes
> console=ttyS0,115200
> led_init=green blinking
> led_exit=green off
> led_error=orange blinking
> mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage)
> ,32M(rootfs),-(data)
> mtdids=nand0=orion_nand
> partition=nand0,2
> stdin=serial
> stdout=serial
> stderr=serial
> rescue_set_bootargs=setenv bootargs
> console=$console ubi.mtd=2 root=ubi0:rootfs ro
> rootfstype=ubifs $mtdparts $rescue_custom_params
> rescue_bootcmd=if test $rescue_installed -eq 1;
> then run rescue_set_bootargs; nand read.e 0x800000
> 0x100000 0x400000; bootm 0x800000; else run
> pogo_bootcmd; fi
> pogo_bootcmd=if fsload uboot-original-mtd0.kwb;
> then go 0x800200; fi
> force_rescue=0
> force_rescue_bootcmd=if test $force_rescue -eq 1
> || ext2load usb 0:1 0x1700000 /rescueme 1 ||
> fatload usb 0:1 0x1700000 /rescueme.txt 1; then
> run rescue_bootcmd; fi
> ubifs_mtd=3
> ubifs_set_bootargs=setenv bootargs
> console=$console ubi.mtd=$ubifs_mtd
> root=ubi0:rootfs rootfstype=ubifs $mtdparts
> $ubifs_custom_params
> ubifs_bootcmd=run ubifs_set_bootargs; if ubi part
> data && ubifsmount rootfs && ubifsload 0x800000
> /boot/uImage && ubifsload 0x1100000 /boot/uInitrd;
> then bootm 0x800000 0x1100000; fi
> usb_scan=usb_scan_done=0;for scan in
> $usb_scan_list; do run usb_scan_$scan; if test
> $usb_scan_done -eq 0 && ext2load usb $usb 0x800000
> /boot/uImage 1; then usb_scan_done=1; echo "Found
> bootable drive on usb $usb"; setenv usb_device
> $usb; setenv usb_root /dev/$dev; fi; done
> usb_scan_list=1 2 3 4
> usb_scan_1=usb=0:1 dev=sda1
> usb_scan_2=usb=1:1 dev=sdb1
> usb_scan_3=usb=2:1 dev=sdc1
> usb_scan_4=usb=3:1 dev=sdd1
> usb_device=0:1
> usb_root=/dev/sda1
> usb_rootdelay=10
> usb_set_bootargs=setenv bootargs console=$console
> root=$usb_root rootdelay=$usb_rootdelay
> rootfstype=$usb_rootfstype $mtdparts
> $usb_custom_params
> usb_boot=mw 0x800000 0 1; ext2load usb $usb_device
> 0x800000 /boot/uImage; if ext2load usb $usb_device
> 0x1100000 /boot/uInitrd; then bootm 0x800000
> 0x1100000; else bootm 0x800000; fi
> bootcmd=usb start; run force_rescue_bootcmd; run
> ubifs_bootcmd; run usb_bootcmd; usb stop; run
> rescue_bootcmd; run pogo_bootcmd; reset
> ethaddr=00:10:75:26:71:9F
> rescue_installed=1
> arcNumber=3089
> usb_init=run usb_scan; setenv usb_root
> LABEL=rootfs
> usb_bootcmd=run usb_init; setenv usb_root
> LABEL=rootfs; run usb_set_bootargs; run usb_boot
>

Which u-boot version you have installed?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: GoFlex Net: Boot from USB while SATA disks connected
October 17, 2015 12:22AM
bodhi Wrote:
> Which u-boot version you have installed?

It looks like its 2011.12

# grep -a --null-data U-Boot /dev/mtd0ro
U-Boot 2011.12 (Apr 18 2012 - 23:08:20)
Seagate GoFlexNetU-Boot
** Invalid partition type "%.32s" (expect "U-Boot")
U-Boot BUG at %s:%d!


Edit: I notice that latest uboot is 2014.07, which makes my uboot very old. So I guess I should update.
I have been a bit reluctant to do mess anymore with the nand flash, but I guess I should be safe if I follow your guide...
.



Edited 1 time(s). Last edit at 10/17/2015 12:38AM by amyren.
Re: GoFlex Net: Boot from USB while SATA disks connected
October 17, 2015 12:58AM
amyren,

> I have been a bit reluctant to do mess anymore
> with the nand flash, but I guess I should be safe
> if I follow your guide...
> .

Serial console is highly recommended. Once you can boot UART with kwboot, then everything is quite safe!

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: GoFlex Net: Boot from USB while SATA disks connected
October 17, 2015 03:01AM
Doing the flashing by your instructions now. Doing it from SSH, I didnt wait long enaugh to see your serial console advice, I hope this will still be ok.

In my case I got an error at making the nanddump backup (nanddump: command not found)
But after doing "apt-get install mtd-utils" it was ok.

But at 6. I get a slightly different output than you wrote:

#flash_erase /dev/mtd0 0 4
Erasing 128 Kibyte @ 60000 -- 100 % complete

But I guess that in reality this is the same as in your example, but my uboot version gives a slightly different format on the output.
So I did continue with flashing:

# nandwrite /dev/mtd0 uboot.2014.07-tld-2.goflexnet.mtd0.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000


So far so good. A brief look at the output from fw_printenv does look like its still the same as before.

I havent rebooted yet. I have a question regarding the netconsole setup, ref 10. in your guide.
Does the ip settings here only count for if you want to use netconsole, and the IP adress for debian itself will still use DHCP?
My reason for asking is that I have it connected to one machine right now, that use IP-range 192.168.231.x
Later I will connect it to my router, which have a different IP range (192.168.1.x)

What I asume is that I can set the netconsole ip to anything I want, as long as I remember those ip settings. And if needed I can connect it directly to a computer by setting the computer network card to the server IP.
And if I boot it up normally, connected to my router, it will get assigned a different ip adress.
Is this asumption correct?
Re: GoFlex Net: Boot from USB while SATA disks connected
October 17, 2015 04:02AM
amyren,

> But I guess that in reality this is the same as in
> your example, but my uboot version gives a
> slightly different format on the output.

Yes, indeed.

> So I did continue with flashing:

> fw_printenv does look like its still the same as
> before.

Cool!

>
> I havent rebooted yet. I have a question regarding
> the netconsole setup, ref 10. in your guide.
> Does the ip settings here only count for if you
> want to use netconsole, and the IP adress for
> debian itself will still use DHCP?

True.

>
> What I asume is that I can set the netconsole ip
> to anything I want, as long as I remember those ip
> settings. And if needed I can connect it directly
> to a computer by setting the computer network card
> to the server IP.
> And if I boot it up normally, connected to my
> router, it will get assigned a different ip
> adress.
> Is this asumption correct?

All correct! netconsole ipaddr will be irrelevant once Debian starts. u-boot actually stops the network before starting the kernel. For convenience, usually we set a static IP in Linux to be the same one. So it seems to be continuous (in reality it is not), if Debian is set up for netconsole also.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: GoFlex Net: Boot from USB while SATA disks connected
October 17, 2015 06:04AM
All done updating then.
Do I need to make any changes to make it boot from SATA?

It still does not boot from my SATA hdd.
I did make a 5G ext3 partition on the disk, made it bootable, labeled it rootfs, copied everything from the usb stick onto it, second partition is 512MB swap, and the third is EXT4 with the rest of the disk space.

It boots fine with usb attached, as before.
I tried to connect to netconsole (having a windows pc, trying the NetCat program), but I didnt make it to connect.
Havent tried serial console yet, but I can try that if needed.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: