Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kernel 2.6.28 only--cannot find root slice at boot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jcc3
n00b
n00b


Joined: 25 Mar 2008
Posts: 18

PostPosted: Mon Dec 29, 2008 5:57 am    Post subject: kernel 2.6.28 only--cannot find root slice at boot Reply with quote

I have two machines which I keep bitwise as identical as possible, an Intel P4 tower & an IBM Thinkpad T42p. Both machines are at or very near daily current, and both have large /boot slices which contain all (gen)kernels (and associated files) from 2.6.24 through 2.6.28.

Both machines run all kernels perfectly, up through 2.6.28--but with /one/ exception: the T42p Thinkpad, when running the 2.6.28 kernel, encounters at boot:

Code:

>> Activating mdev
>> Determining root device...
!! Block device /dev/sda2 is not a valid root device...
!! Could not find the root block device in .
Please specify another value [...]
root block device() ::


(Pick off 2.6.27-gentoo-r7 (or earlier) kernel from the grub menu, the T42p boots and runs perfectly.)

Most interesting is that a successful circumvention is to merely reply to the above prompt with /dev/sda2 (the very same slice it complained about not being able to find), the boot then continues without error and we come up fine.

BTW, /etc/fstab does indeed have /dev/sda2 as the slice for /.

Again, this problem only happens for the 2.6.28 gentoo kernel; all other kernels boot fine.

I should note here that the drive containing Gentoo is an external Maxtor USB hard drive, which the T42p sees as /dev/sda--Gentoo is /not/ on the internal hard drive (which is another OS). At boot, I just select the external USB disk to boot from the BIOS menu and we're off.

All grub entries for the various kernels are identical, except of course for obvious differences such as titles and filenames. All specify real_root=/dev/sda2.

The grub level is 0.97-r6.

genkernel output says "Root device is (8, 2)" which is the correct major/minor for /dev/sda2.

I have found near-miss posts, and bugs, but they appear to be quite old (some are years). I apologize of I missed a direct hit on the current s/w levels and symptoms.
Back to top
View user's profile Send private message
outermeasure
Apprentice
Apprentice


Joined: 26 Nov 2008
Posts: 194
Location: ping6 ff02::1

PostPosted: Mon Dec 29, 2008 6:38 am    Post subject: Re: kernel 2.6.28 only--cannot find root slice at boot Reply with quote

jcc3 wrote:
I have two machines which I keep bitwise as identical as possible, an Intel P4 tower & an IBM Thinkpad T42p. Both machines are at or very near daily current, and both have large /boot slices which contain all (gen)kernels (and associated files) from 2.6.24 through 2.6.28.

Both machines run all kernels perfectly, up through 2.6.28--but with /one/ exception: the T42p Thinkpad, when running the 2.6.28 kernel, encounters at boot:

Code:

>> Activating mdev
>> Determining root device...
!! Block device /dev/sda2 is not a valid root device...
!! Could not find the root block device in .
Please specify another value [...]
root block device() ::


(Pick off 2.6.27-gentoo-r7 (or earlier) kernel from the grub menu, the T42p boots and runs perfectly.)

Most interesting is that a successful circumvention is to merely reply to the above prompt with /dev/sda2 (the very same slice it complained about not being able to find), the boot then continues without error and we come up fine.

BTW, /etc/fstab does indeed have /dev/sda2 as the slice for /.

Again, this problem only happens for the 2.6.28 gentoo kernel; all other kernels boot fine.

I should note here that the drive containing Gentoo is an external Maxtor USB hard drive, which the T42p sees as /dev/sda--Gentoo is /not/ on the internal hard drive (which is another OS). At boot, I just select the external USB disk to boot from the BIOS menu and we're off.

All grub entries for the various kernels are identical, except of course for obvious differences such as titles and filenames. All specify real_root=/dev/sda2.

The grub level is 0.97-r6.

genkernel output says "Root device is (8, 2)" which is the correct major/minor for /dev/sda2.

I have found near-miss posts, and bugs, but they appear to be quite old (some are years). I apologize of I missed a direct hit on the current s/w levels and symptoms.


What happens if you use label/uuid (I assume you built your initrd with disklabel) for your real_root, i.e. real_root=UUID=<uuid> or real_root=LABEL=<label>?

BTW, "slices" are not linux terminology...
Back to top
View user's profile Send private message
jcc3
n00b
n00b


Joined: 25 Mar 2008
Posts: 18

PostPosted: Mon Dec 29, 2008 9:47 am    Post subject: Reply with quote

Thanks for the reply. I will certainly try that, but if that works, since all other kernels boot fine using traditional device names, the indication would be that this behavior is unique to 2.6.28 (certainly possible).

With regard to js0n's post at

https://forums.gentoo.org/viewtopic-p-4588037.html#4588037

I duplicate his behavior, in that the USB bus is seen as the "zero-th" bus, before the ATA bus which contains the internal hard drive of the laptop. Once we're beyond grub, the internal drive appears on the "first" bus, as /dev/hda, not as /dev/sdb.

I also hack both OpenSolaris and FreeBSD on other, model-identical copies of this Maxtor external usb disk device, and in Solaris for example, the USB external disk is seen as

/dev/dsk/c0t0d0

while the internal hard disk is

/dev/dsk/c1d0

The appearance of the 't0' (target 0) is the first case tells us that Solaris is also using a SCSI hardware abstraction to see the external USB drive, but not for the internal drive, c1d0 (the 'c1' indicating bus 1). And this is consistent with my Gentoo observations above.

And yes I do agree that 'slices' is not Linux terminology. There turns out to be a gnarly confusion in the literature, where some authors use 'partition' to mean (in x86 at least) one of the classical four MBR table entries, while others use 'slice' for /that/, and 'partition' for a subdivision of an MBR chunk! It appears that the mixup started with the first porting of Solaris to x86, since SPARC boxes had no exact counterpart of the Intel MBR, and things went downhill from there.

I'll try the UUID approach tomorrow--thanks for the suggestion.
Back to top
View user's profile Send private message
lugo
n00b
n00b


Joined: 28 May 2006
Posts: 3

PostPosted: Mon Dec 29, 2008 1:37 pm    Post subject: Reply with quote

i have exactly the same problem, with the exception that my "invalid" root-sector is on an interal drive
/dev/hda1;
also had no luck with uuid.. :/

edit: a weird behaviour is that, 2.6.27 took about an hour to compile with my configuration; and 2.6.28 compiled successfully, as in without errors, in under 15min with a comparable config...as if it's skipping to build some modules
Back to top
View user's profile Send private message
jcc3
n00b
n00b


Joined: 25 Mar 2008
Posts: 18

PostPosted: Mon Dec 29, 2008 6:22 pm    Post subject: Reply with quote

For lugo, if you reply to the "root block device" prompt (when the error occurs) with the /same/ device that it complained about (which is presumably the actual root partition), does the boot then resume and come up the rest of the way successfully?

That works for me, and since this is an easy circumvention, the severity of this problem is pretty much reduced to an annoyance, unless you need to be able to boot the machine "unattended."

BTW, keep in mind that we are talking about the root partition here (in Gentoo, normally 2), not the boot partition (1).
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 38008
Location: 56N 3W

PostPosted: Mon Dec 29, 2008 6:33 pm    Post subject: Reply with quote

Guys,

Please post your
Code:
ls -l /boot
and contents of grub.conf

Expecting your drive to be /dev/hd* shows that you have not made the switch to the libata drivers yet.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jcc3
n00b
n00b


Joined: 25 Mar 2008
Posts: 18

PostPosted: Mon Dec 29, 2008 11:40 pm    Post subject: Reply with quote

Neddy,

Thanks for the input. I apologize if this thread becomes long--on the scale of OS engineering problems, I would put this at around 0.5 out of 10. I'm confident the solution is straightforward; the fault is probably mine, and the problem is easily circumventable anyway. As someone who has had the misfortune of having a colleague walk into my office at 8pm on a Friday and announce that the university biweekly payroll just cored, and it's up to me to save it before it has to get transmitted to the bank in three hours so that the hourly people can buy formula for their babies, this is not so bad.

As far as libata, libata.ko is built on all kernels on the affected machine; it is indeed in the respective /lib/modules/<version>/... These kernels are 2.6.24-r4, 2.6.24-r5, 2.6.25-r8 2.6.26-r2, 2.6.27-r2, 2.6.27-r7, and 2.6.28, all in /boot, along with their corresponding files appropriately versioned in their file names, thus putting 57 or so files in /boot. All are built via genkernel using default generated .config's, and installed via genkernel --install.

I do not treat 2.6.28 any differently than any of the of other kernels, but this problem only occurs on .28. All kernels have a grub entry in the legacy canonical form

Code:

title Blah...blah
root (hd0,0)
kernel /kernel-genkernel-x86-<version> root=/dev/ram0 init=/linuxrc ramdisk_size=8192 real_root=/dev/sda2 doscsi udev
initrd /initramfs-genkernel-x86-<version>


The USB Gentoo disk /dev/sda is device (8,0) to Gentoo, which is seen as (hd0) by grub and this is correct--from BIOS, the 0th disk on the 0th bus to grub. And '/' is of course in partition 2.

I guess then that by 2.6.28 we may now be at a point where the device addressing technique /must/ change. An ls -al /boot follows (I still keep up the config symlinks manually).

Again, every kernel in here works fine except 2.6.28.

Code:

total 92216
drwxr-xr-x  6 root root    4096 Dec 28 18:34 .
drwxr-xr-x 19 root root    4096 Dec 24 01:09 ..
-rw-r--r--  1 root root       0 Apr 19  2007 .keep
lrwxrwxrwx  1 root root      38 Dec 28 18:33 System.map -> System.map-genkernel-
x86-2.6.28-gentoo
-rw-r--r--  1 root root 1489929 Apr  9  2008 System.map-genkernel-x86-2.6.24-gen
too-r4
-rw-r--r--  1 root root 1489929 Apr  9  2008 System.map-genkernel-x86-2.6.24-gen
too-r4.old
-rw-r--r--  1 root root 1489929 Apr 16  2008 System.map-genkernel-x86-2.6.24-gen
too-r5
-rw-r--r--  1 root root 1489929 Apr 16  2008 System.map-genkernel-x86-2.6.24-gen
too-r5.old
-rw-r--r--  1 root root 1512670 Nov  7 18:31 System.map-genkernel-x86-2.6.25-gen
too-r8
-rw-r--r--  1 root root 1549249 Nov 10 14:10 System.map-genkernel-x86-2.6.26-gen
too-r2
-rw-r--r--  1 root root 1549249 Nov 10 12:36 System.map-genkernel-x86-2.6.26-gen
too-r2.old
-rw-r--r--  1 root root 1587398 Nov 10 16:10 System.map-genkernel-x86-2.6.27-gen
too-r2
-rw-r--r--  1 root root 1588123 Dec 21 16:56 System.map-genkernel-x86-2.6.27-gen
too-r7
-rw-r--r--  1 root root 1584374 Dec 21 14:01 System.map-genkernel-x86-2.6.27-gen
too-r7.old
-rw-r--r--  1 root root 1653867 Dec 28 18:33 System.map-genkernel-x86-2.6.28-gen
too
-rw-r--r--  1 root root 1653867 Dec 28 13:03 System.map-genkernel-x86-2.6.28-gen
too.old
lrwxrwxrwx  1 root root      42 Dec 28 18:33 System.map.old -> System.map-genker
nel-x86-2.6.28-gentoo.old
lrwxrwxrwx  1 root root       1 Feb 19  2008 boot -> .
lrwxrwxrwx  1 root root      20 Dec 28 18:34 config -> config-2.6.28-gentoo
-rw-r--r--  1 root root   67909 Apr  9  2008 config-2.6.24-gentoo-r4
-rw-r--r--  1 root root   67909 Apr 16  2008 config-2.6.24-gentoo-r5
-rw-r--r--  1 root root   69541 Nov  7 18:32 config-2.6.25-gentoo-r8
-rw-r--r--  1 root root   71610 Nov 10 14:11 config-2.6.26-gentoo-r2
-rw-r--r--  1 root root   72800 Nov 10 16:11 config-2.6.27-gentoo-r2
-rw-r--r--  1 root root   72829 Dec 21 16:57 config-2.6.27-gentoo-r7
-rw-r--r--  1 root root   75820 Dec 28 18:34 config-2.6.28-gentoo
lrwxrwxrwx  1 root root      23 Nov  7 16:01 config.old -> config-2.6.28-gentoo
drwxr-xr-x  2 root root    1024 Dec 29 12:54 grub
lrwxrwxrwx  1 root root      37 Dec 28 18:34 initramfs -> initramfs-genkernel-x8
6-2.6.28-gentoo
-rw-r--r--  1 root root 1976730 Apr  9  2008 initramfs-genkernel-x86-2.6.24-gent
oo-r4
-rw-r--r--  1 root root 1976709 Apr  9  2008 initramfs-genkernel-x86-2.6.24-gent
oo-r4.old
-rw-r--r--  1 root root 1976671 Apr 16  2008 initramfs-genkernel-x86-2.6.24-gent
oo-r5
-rw-r--r--  1 root root 1976656 Apr 16  2008 initramfs-genkernel-x86-2.6.24-gent
oo-r5.old
-rw-r--r--  1 root root 2114518 Nov  7 18:32 initramfs-genkernel-x86-2.6.25-gent
oo-r8
-rw-r--r--  1 root root 2104899 Nov 10 14:11 initramfs-genkernel-x86-2.6.26-gent
oo-r2
-rw-r--r--  1 root root 2104909 Nov 10 12:36 initramfs-genkernel-x86-2.6.26-gent
oo-r2.old
-rw-r--r--  1 root root 2147107 Nov 10 16:11 initramfs-genkernel-x86-2.6.27-gent
oo-r2
-rw-r--r--  1 root root 2149392 Dec 21 16:57 initramfs-genkernel-x86-2.6.27-gent
oo-r7
-rw-r--r--  1 root root 2149419 Dec 21 14:16 initramfs-genkernel-x86-2.6.27-gent
oo-r7.old
-rw-r--r--  1 root root 2163895 Dec 28 18:34 initramfs-genkernel-x86-2.6.28-gent
oo
-rw-r--r--  1 root root 2163864 Dec 28 13:19 initramfs-genkernel-x86-2.6.28-gent
oo.old
lrwxrwxrwx  1 root root      41 Dec 28 18:34 initramfs.old -> initramfs-genkerne
l-x86-2.6.28-gentoo.old
lrwxrwxrwx  1 root root      34 Dec 28 18:33 kernel -> kernel-genkernel-x86-2.6.
28-gentoo
-rw-r--r--  1 root root 4085048 Apr  9  2008 kernel-genkernel-x86-2.6.24-gentoo-
r4
-rw-r--r--  1 root root 4084952 Apr  9  2008 kernel-genkernel-x86-2.6.24-gentoo-
r4.old
-rw-r--r--  1 root root 4085016 Apr 16  2008 kernel-genkernel-x86-2.6.24-gentoo-
r5
-rw-r--r--  1 root root 4085048 Apr 16  2008 kernel-genkernel-x86-2.6.24-gentoo-
r5.old
-rw-r--r--  1 root root 4037884 Nov  7 18:31 kernel-genkernel-x86-2.6.25-gentoo-
r8
-rw-r--r--  1 root root 4074032 Nov 10 14:10 kernel-genkernel-x86-2.6.26-gentoo-
r2
-rw-r--r--  1 root root 4074032 Nov 10 12:36 kernel-genkernel-x86-2.6.26-gentoo-
r2.old
-rw-r--r--  1 root root 4228144 Nov 10 16:10 kernel-genkernel-x86-2.6.27-gentoo-
r2
-rw-r--r--  1 root root 4230768 Dec 21 16:56 kernel-genkernel-x86-2.6.27-gentoo-
r7
-rw-r--r--  1 root root 4228976 Dec 21 14:01 kernel-genkernel-x86-2.6.27-gentoo-
r7.old
-rw-r--r--  1 root root 4297104 Dec 28 18:33 kernel-genkernel-x86-2.6.28-gentoo
-rw-r--r--  1 root root 4297104 Dec 28 13:03 kernel-genkernel-x86-2.6.28-gentoo.
old
lrwxrwxrwx  1 root root      38 Dec 28 18:33 kernel.old -> kernel-genkernel-x86-
2.6.28-gentoo.old
drwx------  2 root root   12288 Feb 19  2008 lost+found
drwxr-xr-x  2 root root    1024 Mar 11  2008 memtest86
drwxr-xr-x  2 root root    1024 Oct 10 14:22 memtest86plus
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 38008
Location: 56N 3W

PostPosted: Tue Dec 30, 2008 12:41 am    Post subject: Reply with quote

jcc3,

I did the old manual method and it JustWorked(tm)

That was copy the .config file,
run make oldconfig in the new kernel
make
make modules_install
mount /boot
cp arch/x86/boot/bzImage /boot/<nice_name>
Add boot stanz to grub
Reboot
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jburns
l33t
l33t


Joined: 18 Jan 2007
Posts: 967
Location: Massachusetts USA

PostPosted: Tue Dec 30, 2008 4:36 am    Post subject: Reply with quote

From /usr/src/linux/Documentation/kernel-parameters.txt. You could try adding the rootdelay= or rootwait parameter to the kernel line in grub.conf.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 38008
Location: 56N 3W

PostPosted: Tue Dec 30, 2008 1:09 pm    Post subject: Reply with quote

jcc3,

Please post the output of lspci and your 2.6.28 kernel .config file
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jcc3
n00b
n00b


Joined: 25 Mar 2008
Posts: 18

PostPosted: Tue Dec 30, 2008 6:33 pm    Post subject: Reply with quote

Neddy,

Ok, will do a bit later (I'm not at the systems at the moment). But it hits me that I failed to stress that 2.6.28, as configured in my previous post, exhibits this problem ONLY on the Thinkpad, with its external USB disk. Essentially this identical setup of 2.6.28, /does/ JustWork 100% on an older Intel P4 (Socket 478) tower with the usual 4 ATA internal drives.

The weather vane of suspicion creaks around to point to 2.6.28 and the Thinkpad's USB!

ALL kernels /prior/ to 2.6.28 JustWork everywhere, including the Thinkpad.
Back to top
View user's profile Send private message
waw
n00b
n00b


Joined: 31 Dec 2008
Posts: 3

PostPosted: Wed Dec 31, 2008 3:34 pm    Post subject: Reply with quote

Hello,

I have the same problem on my ASUS F9S laptop using gentoo kernel 2.6.24-r5 on an external usb drive.
https://forums.gentoo.org/viewtopic-t-695553.html

Regards
Back to top
View user's profile Send private message
arjay
n00b
n00b


Joined: 11 Jun 2005
Posts: 60
Location: Jacksonville, FL

PostPosted: Sun Apr 12, 2009 1:54 pm    Post subject: T42p, USB SATA, and kernel > 2.6.27 problem?? Reply with quote

jcc3 wrote:
Neddy,

........

The weather vane of suspicion creaks around to point to 2.6.28 and the Thinkpad's USB!

ALL kernels /prior/ to 2.6.28 JustWork everywhere, including the Thinkpad.


I realize this is an old thread, but jcc3, just in case you're still involved with your problem, I'd like to add my 2 cents as well. I too have a TP T42p and have the same issue, and have tried changing everything I know to try without success. I installed a 2.6.29 kernel having skipped 2.6.28, and then the problem began. I go back to 2.6.27 and it works fine. I've tried my own config as well as genkernel without success. I too am using an SATA external USB hard drive on my ThinkPad.

As I have time, I'll try some other things, but for now at least, I'm living on 2.6.27. I've been hesitant to do a funtoo installation for this very reason.

Have you managed to resolve the issue?
Back to top
View user's profile Send private message
arjay
n00b
n00b


Joined: 11 Jun 2005
Posts: 60
Location: Jacksonville, FL

PostPosted: Wed Apr 15, 2009 12:00 pm    Post subject: As an FYI...I upgraded my bios at lenovo and... Reply with quote

it's working! I am now able to boot 2.6.29 on my T42p without any problems after the bios update. I also changed the order of boot in bios however, so I'm not sure which was creating the problem. I changed it back to the internal HD before any external HD when I was making sure that the bios update was correct. Anyhow, if anyone has the same problem:

1. Check your boot order. If you are using an external USB HD, make sure it falls AFTER the internal HD. If that doesn't help;

2. Check for a bios update. If available, update it.

Worked for me.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum