• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: U-Boot can't read USB HDD partition table  (Read 4857 times)
egon
Newbie
*

Karma: 0
Posts: 3


View Profile
« on: January 05, 2010, 09:01:01 AM »

I just got my new SheevaPlug, and I'm trying my darndest to get the thing booting off
my new WD Passport 500GB HDD (USB powered).

I can boot out of NAND, partition and format the drive, copy over the kernel and rootfs,
but U-Boot can't read the partition table (it seems).

The fact that I can read and write to the disk when booting from NAND
leads me to believe that it's not a power issue.

Note that, in an attempt to solve this problem, I upgraded U-Boot, but the problem
also existed in the stock version.

I saw one one-post thread with a very similar problem. Anyone ever seen this or
solved a similar problem?

Thanks in advance!

Code:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x80c3ee49

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          16      128519+  83  Linux
/dev/sda2              17       60737   487741432+  83  Linux
/dev/sda3           60738       60801      514080   82  Linux swap / Solaris

Here's some console output:

Code:
Marvell>> version

U-Boot 1.1.4 (Dec 23 2009 - 13:32:43) Marvell version: 3.4.27
Marvell>> usb start
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
T 1 Storage Device(s) found
Marvell>> usb storage
  Device 0: Vendor: WD       Prod.: 5000BEV External Rev: 1.75
            Type: Hard Disk
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
Marvell>> usb part
print_part of 0
## Unknown partition table

print_part of 1
## Unknown partition table

print_part of 2
## Unknown partition table

print_part of 3
## Unknown partition table

print_part of 4
## Unknown partition table
Marvell>> ext2ls usb 0:1
** Bad partition - usb 0:1 **

Logged

Tom
Newbie
*

Karma: 0
Posts: 11


View Profile
« Reply #1 on: January 05, 2010, 10:44:10 AM »

That's a usual behavior for the current u-boot versions. You should first power on the usb hdd, so that the disk is spinning (you'll hear that). Afterwards you should power on the sheevaplug.

When the boot fails then do the following: At first poweroff/poweron the disk, 5sec later type reset at the Marvell prompt. Then the disk will remain spinning while u-boot searches for the disk.

If you compare the output you'll notice that there is an additional single T every time before scanning the drive in the case the boot fails. This additional single T will not appear if the boot succeed.

Be aware that this u-boot failure will also disable the possibility to do a shutdown -r now without manual assistance. This is also a reason why the serial console is always in use at my plug.

Yes, it's annoying. Globalscale should know it since months but wasn't able to fix it yet. On the other side u-boot is not their software, as far as I understood they have only adapted u-boot for the plug.

Logged

monkeyhybrid
Newbie
*

Karma: 1
Posts: 16


View Profile
« Reply #2 on: January 05, 2010, 11:42:35 AM »

Hi egon.

I've the same drive and experienced the same issue from a cold boot. I followed Martin Michlmayr's suggestion of adding a reset command at the end of my u-boot boot command. This way, when it doesn't boot first time, it will reset itself and will then boot successfully on second attempt.

I use the following:-
Code:
setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x0800000 /uInitrd; ext2load usb 0:1 0x400000 /uImage'
setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_usb; bootm 0x400000 0x0800000; reset'

Hope that helps.
Logged

egon
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #3 on: January 05, 2010, 01:34:04 PM »

Thanks all for the responses.

U-Boot changed somewhere between 3.4.19 and 3.4.27 to wait
for USB harddrives to settle down before attempting to scan
the partition table. That added delay was enough to cause
my drive to spin down such that no combination of bootcmd resets or
quick plug-ins that I tried allowed the correct detection of the
partition map.

So I downgraded to 3.4.19, and I'm now able to boot off the
drive by plugging it in just before I reset the sheevaplug.

Thanks again for all the help! Sure would be nice to have this quirk fixed.
Logged

trampjuice
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #4 on: January 21, 2010, 09:50:46 AM »

Same problem

1. Have upgraded to U-Boot xxx.27
2. On shutdown/soft reset

USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
T 1 Storage Device(s) found
** Bad partition 1 **
** Bad partition 1 **
## Booting image at 0040000 ...
Bad Magic Number

I never get to the reset (and retry) part because it drops into U-BOOT and bombs out after the usb start..!

On a power off and on cycle it boots.

Logged

Takigama
Newbie
*

Karma: 0
Posts: 22


View Profile
« Reply #5 on: February 09, 2010, 06:45:54 AM »

I have the same issue and i've yet to solve it... putting reset in for me just sends the plug into an infinite loop cause it'll never see the drive again unless the thing is powered off and on again. I've tried many different storage configs, and recently upgraded to 3.4.27 uboot to no avail... So far the only solution i've been able to find is to put the kernel/initrd into nand, then once the kernel has booted it can see the usb storage but i'd like to keep the internal storage for a functional 9.04 ubuntu as a bit of a fail safe.

The different storage i've tried:
1) A Lacie 160gb usb-powered 2.5" drive - internally its a western digital 5400rpm ide drive (the one im keen to actually get working)
2) Several 3.5" (mostly seagate) ida and sata drives connected via different storage cases (all mains powered)
3) about 5 different thumb drives of different sizes and types
4) several sd cards plugged up via a two different usb/sd converter (1gb sandisk microsd, 2gb sandisk microsd, 8gb toshiba class 4 sdhc, 8gb kingston class 4 sdhc, 16gb kingston microsd class 2).
5) a seagate 3.5" freeagent 1tb drive (mains powered)

im beginning to wonder if my plug may have a bit of a hardware fault somewhere.
Logged

j0n3s
Newbie
*

Karma: 2
Posts: 13


View Profile
« Reply #6 on: February 23, 2010, 04:23:36 AM »

I have the same issue.
It is annoying since I cannot drop the SD card and keep the whole system on HD.

My drive is Seagate FreeAgent 1 TB.

The reset approach is not working...I only manage to access the drive only if I manually unplug/plug USB connector during init - otherwise the drive cycle power during reset sequence...

For time being I will probably keep my boot on SD card (but on a smaller one) and the rest of the system to HDD  Cry
Logged

Pages: [1]
Print
Jump to: