Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76445 - Can't mount root on USB Storage Dev (sda2) after upgrade to kernel 2.6.10
Summary: Can't mount root on USB Storage Dev (sda2) after upgrade to kernel 2.6.10
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Daniel Drake (RETIRED)
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-01-02 14:01 UTC by Peder L. Nielsen
Modified: 2005-02-05 02:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pic of boot after 20sec patch (boot-2.6.10.jpg,92.41 KB, image/jpeg)
2005-01-03 12:12 UTC, Peder L. Nielsen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peder L. Nielsen 2005-01-02 14:01:01 UTC
FROM http://forums.gentoo.org/viewtopic.php?t=273988

I got a 2.6.9 kernel from kernel.org, running just fine - root mountet on USB disk sda2. 
 
 Then i upgraded to 2.6.10, and then it wasen't able to mount root. Got this error message. 
 
 VFS: Cannot open root device "sda2" or unknown-block(0,0) 
 Please append a correct "root=" boot option 
 Kernel pamic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) 
 
 To solv the problem i copyed the /drivers/usb/storrage from 2.6.9 to the 2.6.10. 
 
 Recompiled the kernel, and everything worked just fine.. 
 
 Is this a bug..? or.. how can this be ?

DSD Wrote:

its a bug, please report it
_________________
http://dev.gentoo.org/~dsd

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2005-01-02 16:47:33 UTC
Peder: Please use Gentoo Linux -> Component: Ebuilds. Infrastructure is the wrong addressee.
Comment 3 Peder L. Nielsen 2005-01-03 08:07:36 UTC
How do i compile the patch into the the kernel.. ? (n00b)
Comment 4 A. Hatziman 2005-01-03 08:46:39 UTC
patch -p1<path-to-patch

However Daniel i face the same problem with Peder.
I tried also todays Morton sources,which has this patch already built in with no luck.
I found an old post in kernel archieves,a workaround but i dont know how to pass the right value for sda3 device.
Look here.
http://www.ussg.iu.edu/hypermail/linux/kernel/0307.2/1537.html
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2005-01-03 08:53:54 UTC
cd /usr/src/linux
wget http://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.10/2.6.10-mm1/broken-out/waiting-10s-before-mounting-root-filesystem.patch
patch -p1 -i waiting-10s-before-mounting-root-filesystem.patch

A. Hatziman: Perhaps you could clarify your exact problem, because the URL you link to is fairly unrelated.
Comment 6 A. Hatziman 2005-01-03 09:05:58 UTC
I just try to boot from an usb external disk.
It boots fine with 2.6.8.1-ck6,but when i try to boot with the 2.6.10 or with ck-sources or mm-sources based in 2.6.10,i take the same message with Peder.
In that link i provived,booting with root=0303 option in grub,instead of root=/dev/hda3 for his case,it fixed the issue.
I wonder if there is a way to do the same with my occasion and pass the right value for the sda3.
Comment 7 Daniel Drake (RETIRED) gentoo-dev 2005-01-03 11:16:58 UTC
It's not the same issue as you read in that thread. Anyway, perhaps you could explain to me what happens when you using 2.6.10-mm1, with regard to the delaying. Does it boot up as normal and immediately say "can't find root" or does the waiting come into play? Does it try the full 20 times?
Comment 8 Peder L. Nielsen 2005-01-03 11:37:01 UTC
Hey Daniel..

It waited the 20 sec, but didn
Comment 9 Peder L. Nielsen 2005-01-03 11:37:01 UTC
Hey Daniel..

It waited the 20 sec, but didn´t help.

I can see that i found the USB disk, but wasen´t abel to mount it.

It must be something with the storage device driver.. I took a picture of the boot with my digital cam, do you want the picture on mail ?
Comment 10 Daniel Drake (RETIRED) gentoo-dev 2005-01-03 12:05:59 UTC
Yes please, or even uploaded here
Comment 11 Peder L. Nielsen 2005-01-03 12:12:19 UTC
Created attachment 47514 [details]
pic of boot after 20sec patch
Comment 12 A. Hatziman 2005-01-03 12:27:52 UTC
Daniel.
Yes i see know that its not the same.

And yes waits for 20 sec but it cant boot afterthat.The disk is initialized fine,its a western digital 80g,separate in 6 partitions,but for some reason its unable to find the root partition.
In the meantime i compiled the 2.6.9 vanillia,and also works without a problem.
I use udev and the specific root partition its a reiser4.
Comment 13 Peder L. Nielsen 2005-01-04 00:22:42 UTC
A. Hatziman:

Have you tryed root=8:3
Comment 14 Daniel Drake (RETIRED) gentoo-dev 2005-01-04 01:42:43 UTC
Booting with root=8:1 allows me to boot from my sda1 usb partition.
I can see why using /dev/sda1 is not working, even with the referenced patch. Investigating now. Booting with root=/dev/sdaX where sdaX is a USB drive partition definately worked in 2.6.9 right?
Comment 15 Peder L. Nielsen 2005-01-04 01:50:47 UTC
Daniel..

/dev/sda2 - works great with kernel 2.6.9

and -- also with kernel 2.6.10 if i compile the kernel with /drivers/usb/storage from kernel 2.6.9
Comment 16 Daniel Drake (RETIRED) gentoo-dev 2005-01-04 03:57:24 UTC
Ok, please revert the old patch and apply my new one:

cd /usr/src/linux
patch -p1 -R -i waiting-10s-before-mounting-root-filesystem.patch
wget "http://www.reactivated.net/patches/linux-kernel/2.6.10/boot-delay-retry.patch"
patch -p1 -i boot-delay-retry.patch

Then recompile, reboot, etc. Hopefully this solves it, it certainly does for myself :)
Comment 17 Peder L. Nielsen 2005-01-04 04:37:05 UTC
Nice Job :)

arp_tables: (C) 2002 David S. Miller
NET: Registered protocol family 1
NET: Registered protocol family 17
VFS: Root device 'sda2' not available, waiting 19sec
VFS: Root device 'sda2' not available, waiting 18sec
VFS: Root device 'sda2' not available, waiting 17sec
  Vendor: IC25N030  Model: ATMR04-0          Rev: MOAO
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sda: 58605121 512-byte hdwr sectors (30006 MB)
sda: assuming drive cache: write through
SCSI device sda: 58605121 512-byte hdwr sectors (30006 MB)
sda: assuming drive cache: write through
 /dev/scsi/host0/bus0/target0/lun0: p1 < p5 > p2
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0
usb-storage: device scan complete
ReiserFS: sda2: found reiserfs format "3.6" with standard journal
ReiserFS: sda2: using ordered data mode
ReiserFS: sda2: journal params: device sda2, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: sda2: checking transaction log (sda2)
ReiserFS: sda2: Using r5 hash to sort names
VFS: Mounted root (reiserfs filesystem) readonly.

Thanx  ...

Peder
Comment 18 A. Hatziman 2005-01-04 05:21:12 UTC
Daniel and Peder.
That worked for me also.
Thanks a lot both of you.
Comment 19 Daniel Drake (RETIRED) gentoo-dev 2005-01-04 08:07:04 UTC
Better see what upstream think then. Thanks for testing.
Comment 20 Daniel Drake (RETIRED) gentoo-dev 2005-01-24 03:54:33 UTC
We decided that the wait-retry loop could cause evil problems and have settled for this patch:

http://www.reactivated.net/patches/linux-kernel/2.6.10/rootdelay-boot-param-v2.patch

You then boot with the rootdelay=10 parameter for a 10 second delay. Not ideal, but it safe. Will include in next gentoo-dev-sources release.
Comment 21 Daniel Drake (RETIRED) gentoo-dev 2005-02-05 02:20:00 UTC
Fixed in gentoo-dev-sources-2.6.10-r7