Welcome! Log In Create A New Profile

Advanced

Problem booting with USB HDD attached

Posted by pancho22 
Problem booting with USB HDD attached
October 19, 2012 06:28PM
I'm having a problem booting my POGO-E02 off a USB flash drive with Debian while a particular USB HDD is attached to it. There is no problem when the USB stick is the only drive connected. I had no problem with my old WD My Book 500GB with a single NTFS partition but now I bought a WD My Book 3TB that I formatted as ext4 and it doesn't work anymore. The drive mounts fine when plugged after the system has boot but fails when rebooting. Here's what Uboot says through netconsole:

U-Boot 2011.12 (Feb 20 2012 - 21:21:59)
Pogoplug E02
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
Hit any key to stop autoboot:  0 
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 4 USB Device(s) found
       scanning bus for storage devices... EHCI timed out on TD - token=0x10008d80
EHCI timed out on TD - token=0x128d80
READ_CAP ERROR
3 Storage Device(s) found
Loading file "/rescueme" from usb device 0:1 (usbda1)
** File not found /rescueme
reading /rescueme.txt

** Unable to read "/rescueme.txt" from usb 0:1 **

It stops there and doesn't go any further. I tried searching for "READ_CAP ERROR" in the forums but no results.

Any thoughts? Thanks for helping me.
Re: Problem booting with USB HDD attached
October 19, 2012 07:33PM
UBoot seem so pick up your USB HDD as the boot drive, so it can't boot. So the idea is to make UBoot pick the right one. The approach is to use a label for the USB boot drive and set UBoot env so that it will be selected. As long as you have the boot drive labeled with a unique name, it will be used always.

See this discussion:
http://forum.doozan.com/read.php?3,8044,8152#msg-8152



Edited 1 time(s). Last edit at 10/19/2012 07:35PM by bodhi.
Re: Problem booting with USB HDD attached
October 21, 2012 10:25AM
Thanks for your help but the USB labeling technique doesn't solve the problem. Searching for the error message on Google doesn't really give much information either. The first hit is a similar unresolved bug reported on open-wrt devel list and the second is this thread. I'm starting to think that there is some sort of incompatibility with this particular HDD.

Here's my printenv output if it can help:

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_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
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
ethaddr=00:25:31:00:9E:BC
rescue_installed=1
arcNumber=2998
serverip=192.168.1.2
ipaddr=192.168.1.100
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_root=/dev/sda1
usb_init=run usb_scan; setenv usb_root LABEL=ROOTFS
usb_rootdelay=30
usb_rootfstype=ext4

It seems that the problem is when starting USB.

u-boot>> usb start
usb start
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 4 USB Device(s) found
       scanning bus for storage devices... EHCI timed out on TD - token=0x10008d80
EHCI timed out on TD - token=0x128d80
READ_CAP ERROR
3 Storage Device(s) found

More info...

u-boot>> usb info
usb info
1: Hub,  USB Revision 2.0
 - u-boot EHCI Host Controller 
 - Class: Hub
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x0000  Product 0x0000 Version 1.0
   Configuration: 1
   - Interfaces: 1 Self Powered 0mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub,  USB Revision 2.0
 -  USB2.0 Hub 
 - Class: Hub
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x05e3  Product 0x0608 Version 9.1
   Configuration: 1
   - Interfaces: 1 Self Powered Remote Wakeup 100mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Mass Storage,  USB Revision 2.0
 - SanDisk Cruzer Edge 200443188013E670B1F0
 - Class: (from Interface) Mass Storage
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x0781  Product 0x556b Version 1.3
   Configuration: 1
   - Interfaces: 1 Bus Powered 200mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 2
     - Class Mass Storage, Transp. SCSI, Bulk only
     - Endpoint 1 In Bulk MaxPacket 512
     - Endpoint 2 Out Bulk MaxPacket 512

4: Mass Storage,  USB Revision 2.10
 - Western Digital My Book 1140 574341575A32363334343133
 - Class: (from Interface) Mass Storage
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x1058  Product 0x1140 Version 16.18
   Configuration: 1
   - Interfaces: 1 Self Powered 8mA
   - String: "USB Mass Storage"
     Interface: 0
     - Alternate Setting 0, Endpoints: 2
     - Class Mass Storage, Transp. SCSI, Bulk only
     - String: "MSC Bulk-Only Transport"
     - Endpoint 1 In Bulk MaxPacket 512
     - Endpoint 2 Out Bulk MaxPacket 512

And this is strange...

u-boot>> usb storage
usb storage
  Device 0: Vendor: SanDisk Rev: 1.18 Prod: Cruzer Edge
            Type: Removable Hard Disk
            Capacity: 3819.0 MB = 3.7 GB (7821312 x 512)
  Device 1: Vendor: WD       Rev: 1012 Prod: My Book 1140    
            Type: Hard Disk
            Capacity: 764404.0 MB = 746.4 GB (732558336 x 4096)
  Device 2: Vendor: WD       Rev: 1012 Prod: SES Device      
            Type: # 0D #
            Capacity: 90112.1 MB = 88.0 GB (1074462721 x 131072)



Edited 3 time(s). Last edit at 10/21/2012 11:24AM by pancho22.
Re: Problem booting with USB HDD attached
October 21, 2012 05:06PM
It is indeed strange! there should be only one USB Hub, if you plug both drives directly to the Pogo E02. Sorry, I've not connected an ext4 HDD to the plug before starting the system, so don't know how Ext4 behave during boot time.
Re: Problem booting with USB HDD attached
October 21, 2012 05:55PM
Are you sure there should be only one USB hub? Because when the USB flash drive is the only drive attached to the Pogoplug it looks like this:

u-boot>> usb tree
usb tree

Device Tree:
  1  Hub (480 Mb/s, 0mA)
  |  u-boot EHCI Host Controller 
  |
  +-2  Hub (480 Mb/s, 100mA)
    |   USB2.0 Hub 
    |
    +-3  Mass Storage (480 Mb/s, 200mA)
         SanDisk Cruzer Edge 200443188013E670B1F0

Doesn't matter what port it is connected to.



Edited 1 time(s). Last edit at 10/21/2012 05:55PM by pancho22.
Re: Problem booting with USB HDD attached
October 22, 2012 05:16PM
After reading other threads on this forum I believe I found the answer I was looking for.

http://forum.doozan.com/read.php?3,6965,8187#msg-8187

Quote
davygravy
I'd rather not do any advertising about support for drives of size greater than 2.1TB or GPT/EFI until I can get a 3TB drive and actually monkey w/ it, and test it for a few months. (... will go back and expunge any of my talk/comments about it as well...) In an effort to get more understanding about this, I've put in another request for first-hand experience/information regarding EFI on Kirkwood, as well as on 64BIT. I heard very little back from anyone the previous request, but maybe something will turn up this time.

Looks like 3TB drives are not supported by uBoot. Is there any way I could disable or ignore the drive at boot time? I'm booting on a USB flash drive anyway and the HDD works fine when it is plugged after boot up.

Maybe it would work with davy's kernel under testing?

https://www.dropbox.com/sh/nwt2kbvetvgvroo/A8LNvweqKX/Kirkwood/uboot/under_testing

I will wait for help before proceeding any further.



Edited 1 time(s). Last edit at 10/22/2012 05:20PM by pancho22.
Re: Problem booting with USB HDD attached
October 22, 2012 07:12PM
I don't think you can disable UBoot scan for a certain USB drive (no reliable way to know which drive comes up first, it varies depending on the types and other factors). Can you repartition the drives to 1TB and 2TB partitions?



Edited 1 time(s). Last edit at 10/22/2012 07:13PM by bodhi.
Re: Problem booting with USB HDD attached
October 25, 2012 09:34AM
I tried partitioning the HDD but it doesn't work I ended up buying a 2TB drive and returning the 3TB to the store. At least I learned something. Thanks for your help.
Author:

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: