Welcome! Log In Create A New Profile

Advanced

force Debian to Boot first from USB Flash not HDD

Posted by msanad 
force Debian to Boot first from USB Flash not HDD
July 22, 2014 06:11PM
Dears
i have Pogoplug E02 works with Debian using USB Flash Stick and i use my USB HDD to access it.
but when i make a reboot for the device it stop working , after serial connection i found that it detect the HDD first and trying to boot using it but it failed and ignore the stick , i want to force the device to boot from the USB flash even there are other USB Storage devices connected to.

any idea.
Re: force Debian to Boot first from USB Flash not HDD
July 22, 2014 07:23PM
Re: force Debian to Boot first from USB Flash not HDD
July 23, 2014 03:31AM
thanks bodhi
i will try and feedback
Re: force Debian to Boot first from USB Flash not HDD
July 23, 2014 10:01AM
it doesnt work

check the below log


U-Boot 2013.10 (Feb 21 2014 - 19:35:02)-tld-2
Pogo E02

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  0 
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... READ_CAP ERROR
EHCI timed out on TD - token=0xbe008d80
EHCI timed out on TD - token=0xbe008d80
EHCI timed out on TD - token=0xbe008d80
EHCI timed out on TD - token=0xbe008d80
EHCI timed out on TD - token=0xbe008d80
EHCI timed out on TD - token=0xbe008d80
3 Storage Device(s) found
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
stopping USB..
resetting ...


U-Boot 2013.10 (Feb 21 2014 - 19:35:02)-tld-2
Pogo E02

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  0


PogoE02> printenv     
arcNumber=2097
baudrate=115200
bootargs_root=root=/dev/mtdblock2 ro
bootcmd=usb start; run usb_bootcmd; usb stop; reset
bootcmd_pogo=fsload uboot-original-mtd0.kwb; go 0x800200
bootcmd_usb=run usb_init; run usb_load_uimage; run set_bootargs_usb; run usb_boot;
bootdelay=3
console=ttyS0,115200
ethact=egiga0
ethaddr=00:25:31:04:A2:18
ipaddr=192.168.1.4
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
serverip=192.168.1.3
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts
stderr=serial
stdin=serial
stdout=serial
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
usb_bootcmd=run usb_set_bootargs; run usb_boot
usb_device=0:1
usb_init=usb start; setenv usb_root LABEL=rootfs
usb_load_uimage=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage
usb_root=/dev/sda1
usb_rootdelay=10
usb_rootfstype=ext2
usb_set_bootargs=setenv bootargs console=$console root=/dev/sda1 rootdelay=10 rootfstype=ext3 $mtdparts

Environment size: 1339/131068 bytes
PogoE02> 
Re: force Debian to Boot first from USB Flash not HDD
July 31, 2014 02:47AM
do you have any idea??
Re: force Debian to Boot first from USB Flash not HDD
July 31, 2014 03:22AM
msanad,

You still have the same boot command:
bootcmd=usb start; run usb_bootcmd; usb stop; reset
usb_bootcmd=run usb_set_bootargs; run usb_boot
usb_set_bootargs=setenv bootargs console=$console root=/dev/sda1 rootdelay=10 rootfstype=ext3 $mtdparts
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

Arrange them backward in this fashion, and set up your new u-boot envs sequence in a notepad. After you proof-read it, cut and paste to the console prompt.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: force Debian to Boot first from USB Flash not HDD
July 31, 2014 04:02AM
sorry ,
but i dont undersatand what do you mean by (Arrange them backward in this fashion )
Re: force Debian to Boot first from USB Flash not HDD
July 31, 2014 03:31PM
msanad,

Just mean when you are troubleshooting problem with u-boot envs, it is best to list them in the reversed execution order, starting from bootcmd. So if you do that, you'll see the mistake is:
bootcmd=usb start; run usb_bootcmd; usb stop; reset

It should be
bootcmd=usb start; run bootcmd_usb; usb stop; reset

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: