Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Another "Unable to mount root fs..." prob [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
tagger
n00b
n00b


Joined: 31 Mar 2005
Posts: 37

PostPosted: Sat Apr 30, 2005 12:24 am    Post subject: Another "Unable to mount root fs..." prob [SOLVED] Reply with quote

I've now spent a great deal of time reading in this forum and elsewhere about problems that seem similar to this one, but the various recommended solutions do not seem to address my root problem.

Below I'll describe my system, then my problem, then I'll show my current config setting, etc., and finally I'll discuss briefly the various things I've already tried.

This is a G5 dual. I followed the http://www.gentoo.org/doc/en/handbook/handbook-ppc64.xml handbook and occasionally made reference to the handbook-ppc (not 64) handbook. Nothing unusual about the machine: in-bay SATA hard-drive. Stage-3 installation starting from the minimal CD. Kernel 2.6.11-gentoo-r6.

My problem is related to yaboot and possibly my kernel config, from what I've read. Here's how it manifests: a short way into bootup I get:

Code:

VFS: Cannot open root device "sda4" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
 <0>Rebooting in 180 seconds.._


(Yes, like I said, you've probably seen stuff like this before; sorry if I'm boring you.)

Rather than posting my whole kernel config, I'll tell you that I merely followed the directions in http://www.gentoo.org/doc/en/handbook/handbook-ppc64.xml, which are, granted, a little out-dated. It says:

Code:

File systems --->
  [*] Virtual memory file system support (former shm fs)
  [*] /proc file system support
  [*] /dev file system support (EXPERIMENTAL)
  [*]   Automatically mount at boot
  [*] /dev/pts file system for Unix98 PTYs


I selected the equivalent to each of these, but note that they're arranged differently now. Specifically, I have:

Code:

CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_SYSFS=y
# CONFIG_DEVFS_FS is not set
CONFIG_DEVPTS_FS_XATTR=y
CONFIG_DEVPTS_FS_SECURITY=y
CONFIG_TMPFS=y
CONFIG_TMPFS_XATTR=y
# CONFIG_TMPFS_SECURITY is not set
CONFIG_HUGETLBFS=y
CONFIG_HUGETLB_PAGE=y
CONFIG_RAMFS=y


Additionally, I have the following:

Code:

CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
# CONFIG_EXT2_FS_SECURITY is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
# CONFIG_EXT3_FS_SECURITY is not set
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
CONFIG_REISERFS_FS=y
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set
# CONFIG_REISERFS_FS_XATTR is not set
CONFIG_JFS_FS=y
CONFIG_JFS_POSIX_ACL=y
# CONFIG_JFS_SECURITY is not set
# CONFIG_JFS_DEBUG is not set
# CONFIG_JFS_STATISTICS is not set
CONFIG_FS_POSIX_ACL=y


Note that the PPC (non-64) handbook explicitly says do _not_ select the /dev file system, which is, in fact, now obsolete -- perhaps the ppc64 documentation needs to be updated. Nevertheless, whether or not I have the /dev file system compiled into the kernel does not seem to matter.

Here's what I have in my /etc/fstab (minus all the gory comments):

Code:

/dev/sda4      /      ext3      noatime         0 1
/dev/sda5      /home      ext3      noatime         0 2
/dev/sda3      none      swap      sw         0 0

/dev/cdroms/cdrom0   /mnt/cdrom   auto      noauto,user,ro      0 0

none         /proc      proc      defaults      0 0

none         /dev/shm   tmpfs      defaults      0 0



And, for those who doubt, here's a printout of my partitions:

Code:

/dev/sda
        #                    type name                  length   base      ( size )  system
/dev/sda1     Apple_partition_map Apple                     63 @ 1         ( 31.5k)  Partition map
/dev/sda2         Apple_Bootstrap bootstrap               1600 @ 64        (800.0k)  NewWorld bootblock
/dev/sda3         Apple_UNIX_SVR2 swap                 6291456 @ 1664      (  3.0G)  Linux swap
/dev/sda4         Apple_UNIX_SVR2 root                41943040 @ 6293120   ( 20.0G)  Linux native
/dev/sda5         Apple_UNIX_SVR2 /home              104857600 @ 48236160  ( 50.0G)  Linux native
/dev/sda6              Apple_Free Extra              117925928 @ 153093760 ( 56.2G)  Free space
/dev/sda7               Apple_HFS Apple_HFS_Untitled_3  41562104 @ 271019688 ( 19.8G)  HFS
/dev/sda8              Apple_Free Extra                     16 @ 312581792 (  8.0k)  Free space

Block size=512, Number of Blocks=312581808
DeviceType=0x0, DeviceId=0x0


Finally, here's my yaboot.conf. Well, I should say here's _a_ yaboot.conf, which happens to be my most recent. This has undergone various trials, always followed by a 'ybin -v', the output of which is always uninteresting (but I've posted it below, as well). Anyway, yboot.conf:

Code:

boot=/dev/sda2
device=/ht@0,f2000000/pci@7/k2-sata-root@c/k2-sata@0/disk@0:
partition=4
root=/dev/sda4
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot

## ofboot=sd:4

image=/boot/kernel-2.6.11-gentoo-r6
   label=Linux
   read-only
   sysmap=/boot/System.map-2.6.11
   partition=4
   append="real_root=/dev/sda4"

##enableofboot


ybin -v output, before I spend more time talking about yaboot.conf:

Code:

ybin: Finding OpenFirmware device path to `/dev/sda2'...
ybin: Installing first stage bootstrap /usr/lib/yaboot/ofboot onto /dev/sda2...
ybin: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/sda2...
ybin: Installing /etc/yaboot.conf onto /dev/sda2...
ybin: Setting attributes on ofboot...
ybin: Setting attributes on yaboot...
ybin: Setting attributes on yaboot.conf...
ybin: Blessing /dev/sda2 with Holy Penguin Pee...
ybin: Updating OpenFirmware boot-device variable in nvram...


Now for the heart: yaboot.conf....

Code:

device=/ht@0,f2000000/pci@7/k2-sata-root@c/k2-sata@0/disk@0:

I started out using things more like device=hd: and device=hd:2. I also tried sd: and sd:2, even though I think there is no such thing (the documentation seems to indicate that "hd" is allegorical to "/dev/hdx", so I suspected that "sd" might be the correct substitution in my case, but I tried both to no avail). I finally used ofboot to generate /ht@0,f2000000/pci@7/k2-sata-root@c/k2-sata@0/disk@0:.

Code:

## ofboot=sd:4
##enableofboot

Again, I tried hd as well as sd. It turns out that when these lines are in the config, the bootup doesn't even get started. As soon as the yaboot menu goes away, all you see is the Mac grey-screen.

Code:

partition=4

I tried with and without the 'partition'.

Code:

sysmap=/boot/System.map-2.6.11

I tried with and without the sysmap specified. I saw some places people used initrd's. I didn't travel that road at all.

Code:

append="real_root=/dev/sda4"

I tried this as well as "root=/dev/sd4", to no avail.

Code:

root=/dev/sda4

I never tried "root=/dev/ram0", which I think was a documentation misprint, If I read the results of other posts correctly.

The result is always the same (except in the case where I used enableofboot and ofboot, as described above). Again, I always ybin -v 'd after making changes.

Any help or ideas would be greatly appreciated; thanks in advance.

Oh, one other thing that probably has nothing to do with anything: I turned _off_ the IBM pSeries & new iSeries kernel support; they were in the default config, but are not pertinent as far as I know.


Last edited by tagger on Mon May 02, 2005 8:47 pm; edited 2 times in total
Back to top
View user's profile Send private message
tagger
n00b
n00b


Joined: 31 Mar 2005
Posts: 37

PostPosted: Sat Apr 30, 2005 1:51 am    Post subject: Reply with quote

I think yaboot is working just fine, exactly as it's supposed to, and even being forgiving with my varied settings. Following http://penguinppc.org/bootloaders/yaboot/doc/yaboot-howto.shtml/ch9.en.shtml, I interactively booted to the same result. So any help with my kernel would be much appreciated.
Back to top
View user's profile Send private message
tagger
n00b
n00b


Joined: 31 Mar 2005
Posts: 37

PostPosted: Sat Apr 30, 2005 8:08 am    Post subject: Reply with quote

Well, I went laboriously through the whole kernel config and noticed that I was missing Frodo / Apple K2 SATA. I placed that, very hopefully, and made several other less interesting changes. I rebuilt, etc., but still no luck. But my feedback message _did_ change:

Code:

unknown-block(0,0)

turned into
Code:

unknown-block(8,4)


I wonder if this gives anybody any clues?


Last edited by tagger on Sat Apr 30, 2005 11:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
tagger
n00b
n00b


Joined: 31 Mar 2005
Posts: 37

PostPosted: Sat Apr 30, 2005 7:17 pm    Post subject: genkernel Reply with quote

Tried a different tack today: genkernel.

The output of genkernel provided instructions on setting up bootloader options. Following them as closely as I could I tried a couple of variations of the following:

Code:

boot=/dev/sda2
device=/ht@0,f2000000/pci@7/k2-sata-root@c/k2-sata@0/disk@0:
partition=4
root=/dev/sda4
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot

image=/boot/kernel-2.6.11-gentoo-r6
   label=Linux
   read-only
   initrd=/boot/initrd-2.6.11-gentoo-r6
   append="root=/dev/ram0 real_root=/dev/sda4/ init=/linuxrc"


The boot process _seemed_ to get further along; at least I didn't have a kernel panic, but it's possible that my problem is still the same and is just being uncovered in a different way. Then boot output ends with:

Code:

>> Mounting filesystems
mount: Mounting devfs on /dev failed: No such device
Error opening file: ".devfsd"  No such file or directory
>> Determining root device...
>> Block device /dev/sda4/ is not a valid root device...
>> The root block device is unspecified or not detected.
   Please specify a device to boot or "shell" for a shell...
   boot() ::


Commenting out:
Code:

##partition=4
##root=/dev/sda4

results in a complete failure that tels me that /ht@0,f2000000/pci@7/k2-sata-root@c/k2-sata@0/disk@0: is not a valid device or something of the sort.

Commenting those back in, but setting root=/dev/ram0 (rather than setting that in the append section as genkernel alludes to) results in the same output as above: "The root block device is unspecified or not detected".

Finally, leaving root as root=/dev/sda4, at the top level, then setting it to /dev/ram0 under the image= level leads to the same results.

Well, at least perhaps I've come up with a lot of things for people _not_ to try, to save them the time. :)
Back to top
View user's profile Send private message
tagger
n00b
n00b


Joined: 31 Mar 2005
Posts: 37

PostPosted: Sat Apr 30, 2005 7:44 pm    Post subject: Re: genkernel Reply with quote

tagger wrote:

Code:

>> Mounting filesystems
mount: Mounting devfs on /dev failed: No such device
Error opening file: ".devfsd"  No such file or directory


I think I got rid of this error by emerging udev.

Maybe I'm getting closer?

But I still have:
Code:

>> Determining root device...
>> Block device /dev/sda4/ is not a valid root device...
>> The root block device is unspecified or not detected.
   Please specify a device to boot or "shell" for a shell...
   boot() ::
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Sat Apr 30, 2005 10:53 pm    Post subject: Reply with quote

I'm not familiar with ppc64 - not really familiar with ppc, actually, since I just got my first mac couple of week ago - but I think when you specify the real_root in yaboot.conf's append line, the trailing / should not be there. So real_root=/dev/sda4 rather than real_root=/dev/sda4/ . I also think you should definitely completely disable devfs related stuff since you're using udev.

Also, maybe you could try using the kernel from the installation CD. Copy the running kernel to/mnt/gentoo/boot and the modules to/mnt/gentoo/lib/modules/{name of kernel} and configure yaboot. If it's a kernel config problem, maybe this will work assuming that the kernel of the liveCD has sata support compiled in.
Back to top
View user's profile Send private message
tagger
n00b
n00b


Joined: 31 Mar 2005
Posts: 37

PostPosted: Sun May 01, 2005 1:26 am    Post subject: Reply with quote

Thank you for the suggestions, quatsch.

I tried removing the trailing /; I must say, I'm a bit relieved that that doesn't appear to make any difference, as much as I'd like to see this thing work.

Then I tried copying over the liveCD image kernel, initrd, modules tree, etc., and set my yaboot.conf accordingly (and, of course, ran ybin). Same results. I know the kernel copy 'took' b/c, at the boot:: prompt I can ask for a shell, and, in that shell, if I type uname -a, it tells me that the ("G5") kernel is running.

So this leads me back to thinking: maybe it _is_ my yaboot / yaboot.conf hookup. I spent some time trying various things like that shown in Section 9.3 of the Yaboot howto (http://penguinppc.org/bootloaders/yaboot/doc/yaboot-howto.shtml/ch9.en.shtml), but I incessantly get:
Code:

Block device <whatever> is not a valid root device.


I would not at all be surprised, at this point, if there's just some slick yaboot trick I'm missing now.
Back to top
View user's profile Send private message
tagger
n00b
n00b


Joined: 31 Mar 2005
Posts: 37

PostPosted: Sun May 01, 2005 1:58 am    Post subject: Reply with quote

Spoke too soon. I _can_ get the liveCD kernel to work -- I had accidentally left the udev token in my append line. I replaced that with devfs and whalla. So I'm about to try several other things - I'm re-compiling my kernel now with devfs re-enabled and I'll un-emerge udev. It would ultimately be nice if I could go back to compiling my own kernel (rather than using genkernel), without initrd. That is, perhaps the ultimate secret was merely to have devfs in that append line. Wow.
Back to top
View user's profile Send private message
tagger
n00b
n00b


Joined: 31 Mar 2005
Posts: 37

PostPosted: Mon May 02, 2005 8:45 pm    Post subject: Reply with quote

Ok, here's what's come of this....

I discovered http://dev.gentoo.org/~tgall/ and ftp://ftp.linuxppc64.org/pub/people/tgall/gentoo-ppc64/. I got my kernel config from there, and, perhaps more importantly, my yaboot.conf file from there. The yaboot.conf file was shockingly simple, and I think it is the trick to this. It says to use:

Code:

boot=/dev/sdax

(where x is the number of your partition) -- no surprises here, but then says:
Code:

device=sd0:

which I couldn't find in documentation. I tried 'sd', on hunch, but never 'sd0'. So this cleans things up quite a bit.

Finally, it has a few other simplifications. Here's a pared down version of the file, as it would work if your bootstrap partition was 2, and your root partition was 4, and your (2.6.11-gentoor6, e.g.) kernel was created according to the Handbooks, using make && make modules_install and copying over the kernel image, and, finally, if your OS X / HFS partition was 8:
Code:

boot=/dev/sda2
device=sd0:
partition=4
defaultos=macosx
delay=10
timeout=40
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot

image=/boot/kernel-2.6.11-gentoo-r6
   label=Linux
   root=/dev/sda4
   read-only

macosx=/dev/sda8
enablecdboot
enableofboot


No need for a System.map or anything.

Perhaps it would be good to update the ppc64 documentation -- I'll look into logging a documentation bug.

(Side note: there's also an xorg.conf at tgall's site - it works.)
Back to top
View user's profile Send private message
tagger
n00b
n00b


Joined: 31 Mar 2005
Posts: 37

PostPosted: Mon May 02, 2005 8:50 pm    Post subject: Reply with quote

Oh, my notes show one more important step (esp. / only if you did a stage-3 install):
You have to emerge devfsd for the reboot to work. Kernel support for devfsd was compiled in, but you still have to emerge the package, of course.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC 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