# Genkernel --menuconfig + alsa = /dev/hda3 not valid root dev

## phoeniks

ok, went to fix my sound following the alsa documentation  http://www.gentoo.org/doc/en/alsa-guide.xml

I'm a genkernel user, and I followed the steps for alsa to be provided by the kernel. which recompiled successfully. Before going on to emerging the alsa-utils, a reboot was in order. However, after selecting my kernel in grub, problems occured when it came time to mount the filesystems

```

mounting filesystems

determining root device

block device /dev/hda3 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() :: 

```

I've poked around grub's command line to no avail. I've also entered the afore mentioned "shell" environment, which is pretty much neutered. Can't find a grub.conf to edit (although i suppose it's possible i'm just missing it). There is an /etc/fstab , but it looks nothing like mine should.The one i see now looks like this

```

/dev/ram0           /              ext2          defaults

proc                    /proc        proc          defaults         0 0

```

My fstab should have 4 partitions 1)boot  2)swap   3)root    4)aux storage partition

So, basically I'm kinda stuck. Will editing this file in the image of my old one alleviate the problem ? Barking up the wrong tree ? Discuss.

as always, any help is appreciated.

----------

## gentoo_dude

re-editing your /etc/fstab should fix your problem.

Also make sure you have built-in support for the filesystem your / is in your kernel.

----------

## phoeniks

Ok, so I figured I should probably be editing MY fstab file, not the meager fstab i was provided with from that inadequate shell. So I busted out the live cd, was able to mount my root (dev/hda3) and get ahold of the real /etc/fstab. However, when I went to edit it, i found it in the exact same condition that I last left it . (sorry about the formatting)

```

none        /proc     proc    defaults             0 0

/dev/hda1   /boot      ext2        defaults,noatime     1 2

/dev/hda2   none      swap        sw                        0 0

/dev/hda3   /            reiserfs    noatime                 0 1

/dev/hda4   /mnt/aux  ext3       defaults                 0 1

none        /proc     proc    defaults             0 0

none        /dev/shm  tmpfs   nodev,nosuid,noexec  0 0

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

/dev/hdc                      /media/cdrecorder           auto           user,exec, noauto,managed  0 0

```

also, while putting in my fstab, I did realize i repeat this line twice

```
none        /proc     proc    defaults             0 0
```

I don't think it's a big deal, and i'll probably comment one out later, but if it is a problem let me know.

At any rate, my fstab was the same and I found that odd. So I mounted my boot partition and fired up grub.conf. Also looked like it should.

```

default 0

timeout 30

splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux 2.6.11-r3

root (hd0,0)

kernel /kernel-2.6.11-gentoo-r3 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev

initrd /initrd-2.6.11-gentoo-r3

```

Now I'm back to being lost.  I don't understand how editing the /etc/fstab provided by the watered down shell would do anything, so what next?

----------

## phoeniks

tried some new things and wanted to rule them out for everyone else.

booted the live cd and chrooted into my environment, where i ran 

```

make menuconfig
```

I wanted to make sure reiserFS support (for my /dev/hda3) was there and it is. The only two options unchecked for reiser are "enable reiserfs debug mode" and "stats in /proc/fs/reiserfs"

don't think that's it either.

EDIT:  I also read alot about sata drives and similar problems. This is NOT a sata drive. Just a regular laptop ide, i recall.

----------

## gentoo_dude

From all the posts so far:

You can boot your computer using old kernels, but you can't use the one that you compiled with ALSA options in it.

You are using genkernel.

What I would do next is 2 things:

1.  Try to recompile the alsa kernel without using genkernel (it will not provide an initram) and then add this kernel to your grub menu list.  And try to boot it.  If it still does not work then;

2.  I would try lilo (boot manager) and see if you can boot from this one.  Gentoo Handbook has config files for both boot managers, you can see what options to append to lilo.

----------

## phoeniks

Can I do this by booting the live cd and chrooting into my system? Tried searching for ways to boot old kernels, but I didn't really trip over anything.

----------

## phoeniks

ok.... booting the livecd, chrooting and then recompiling without sound support doesn't work either.......crap.

----------

## smitty_one_each

Looking around in the ash shell, I don't seem to get any devices enumerated;

/dev is barren, so how could I find an partition to boot after the initrd?

My particular configuration is a dual boot, and I (perhaps foolishly) put / in an extended partition.

My solution has been to carry forward a 2.6.12 initrd that was built with devfs support.

Hopefully, the magic incantation for a happy initrd will become available soon.

Best,

Chris

----------

## XhwMikey

phoeniks,

I have a very similar problem...here's a question for you.  If you remove the "udev" from your grub.conf, does your boot get further?  For me, I see complaints about not finding /sbin/devfsd, but the system boots up relatively OK.  I'm not saying this is the way to go, but it sure sounds like we have the same problem.  BTW, my alsa is not working fully either.  This is also a genkernel install.  I've been searching through the posts, and have seen nothing that seems to apply.

MikeyB

----------

## phoeniks

I get a  similar  response about  devfsd , but no boot . Goes right to the same boot(): prompt and runaround about /dev/hda3 not being a valid root device.

EDIT: at this point i've pretty much given up hope on genkernel and have come to rest on the fact that i'll probably have to compile the kernel manually.  My question is this: can anyone give me a reason not to rule out grub and try something different than a manual kernel compilation? Will a boot CD -> chroot -> manual recompile even take? Basically,  I plan on exactly what i mention in the previous sentence. Is there any reason it'll screw me worse than I am already?

----------

## gentoo_dude

 *phoeniks wrote:*   

> 
> 
> EDIT: at this point i've pretty much given up hope on genkernel and have come to rest on the fact that i'll probably have to compile the kernel manually.  My question is this: can anyone give me a reason not to rule out grub and try something different than a manual kernel compilation? Will a boot CD -> chroot -> manual recompile even take? Basically,  I plan on exactly what i mention in the previous sentence. Is there any reason it'll screw me worse than I am already?

 

The reason I mentioned those is to actually try to see what the problem is.  If you can boot from a custom built kernel -- withouht genkernel -- than there is you problem in the way you configure the kernel using genkernel.  If that still didn't solve it, then try lilo...if it works, that it was the way you configured grub to boot your system.  Knowing where your problem is it will help you troubleshoot it.  Not necessarly that you should you from now on to build kernels using just make menuconfig; make all && make modules_install or to use lilo as your boot manager, but it is a way to try and see where your problem is.

----------

## XhwMikey

phoeniks,

I don't think chrooting in to do a rebuilt of the kernel will hurt - any worse than you're hurting now.  Look at it this way, if you cant boot the kernel, all bets are off no matter what so what've ya got to lose??

I'm going to do the same thing - build a manual kernel - and hopefully that will get me up and running without this devfsd complaint.  Perhaps even my alsa will work (and perhaps world peace will break out all over...)  Hang in there - beleive it or not once you get over the hump you'll like gentoo.  I won't be able to get to it tonight, but I'll fill you in on how it goes for me when it's done.  Good luck!

MikeyB

----------

## phoeniks

Of course it doesn't want to play nice. I figured I'd go with the easy one first, so I uninstalled grub, emerged lilo, wrote the .conf and rebooted. 

saw a new selection screen for lilo, selected gentoo. And.........................

same.

exact.

junk.

----------

## XhwMikey

OK,

I ejected genkernel, and now udev starts as advertised.  My problem with udev is pretty much done.  Phoeniks - give the manual kernel build a go - you'll laugh, you'll cry, it'll become part of you:D 

I don't know what the deal with genkernel is but it seems to have borked the initrd.  I'd say that I did it, but genkernel did it all on its own,  no help from me in this regard.  From now on for me, genkernel has been kicked to the curb!

On the other hand, still no sound in kde:roll:   But that's another subject altogether.  Good luck!

MikeyB

----------

## depontius

Symptoms showing up in a different place, I suspect... There was recently a major change in genkernel, though the version number doesn't show it, and there have been all sorts of problems. I'm guessing this is just another one.

Genkernel used to build an initrd, now it builds an initramfs. This is really a fairly big change, not just a little name thing, and is important to the future of the kernel development process. But there are clearly some growing pains here, and it was clearly let out of ~x86 a bit too soon. Genkernel 3.3.3 gave unbootable system, and 3.3.5 gives systems that boot, but can't talk to their network cards. The problem is in the initramfs.

In short, just don't use initrd/initramfs. First off, make sure that what you need to access your root filesystem is built into the kernel, not as modules. That includes the drivers for your harddisk controller and the filesystem driver for your root filesystem. If you're network mounting, get the network drivers and and filesystem(s). If you have root in lvm or lvm2, you're outta luck, since these need userspace code. Downgrade genkernel.

----------

## phoeniks

Good info depontius. However, when you say this:

 *depontius wrote:*   

>  Downgrade genkernel.

 

I come back with these questions :

1) how exactly I might do this. My guess is unmerging the current version and re-emerging with a version parameter, but I lack the detailed knowledge.

2) More importantly, which version would be OK? 3.3.2? earlier?

----------

## phoeniks

first go at a manual make menuconfig: Upon reboot and following the handbook instructions (with adaptation for the situation) 

http://www.gentoo.org/doc/en/handbook/2005.0/handbook-x86.xml?full=1#book_part1_chap7

```

BIOS data check successful

Uncompressing Linux...

invalid compressed format (err=1)

-- System halted

```

... fun.

----------

## phoeniks

 *depontius wrote:*   

> 
> 
> Genkernel used to build an initrd, now it builds an initramfs. This is really a fairly big change, not just a little name thing, and is important to the future of the kernel development process. But there are clearly some growing pains here, and it was clearly let out of ~x86 a bit too soon. Genkernel 3.3.3 gave unbootable system, and 3.3.5 gives systems that boot, but can't talk to their network cards. The problem is in the initramfs.
> 
> 

 

I found it odd that after running 'emerge -s genkernel' my genkernel version was only 3.1.5.

Does this set off any red flags in anyone's mind?

----------

## depontius

When did you last "emerge sync"?

----------

## phoeniks

not all that long ago. Week and a half to two weeks tops since i last did it.  I can see the latest verson available as 3.3, but i really haven't updated the actual software since my initial install (and a lengthy process that was) . The sound issue was the last one i had to resolve before i had a fully functional notebook, but as you can tell, my path has forked a number of times. like I said before, right now genkernel is v 3.1.5

----------

## phoeniks

updated to the most recent genkernel; no help.

----------

## phoeniks

Why?Why?Why?Why?Why?Why?Why?Why?Why?freakin Why?

I followed a gentoo wiki guide on manually compiling a kernel and i still have that damn boot(): prompt haunting me.

http://gentoo-wiki.com/HOWTO_Compile_a_Kernel_Manually

I mean WTF? I've tried everything I can think of.  Is grub still booting an old kernel maybe? Did I need to add something else to a file after the manual compile? Are there latent files laying around that are hurting me? Is it possible there's something physically wrong with a section of my hard disk? More importantly, if i revert back to a configuration like i had before, why am I still seeing the same junk?

EDIT: I was really excited about gentoo for a while, and I still want to use it, but this is getting rediculous. I recompiled the kernel manually AND removed the sound support completely, yet I'm stuck in purgatory. I officially have ZERO ideas left.

EDIT 2: after a manual compilation, what , if anything, do I need to change to files like grub.conf.   'udev' is still in there, for example, and I don't think I need it.

EDIT 3: nevermind....

----------

## smitty_one_each

 *phoeniks wrote:*   

> Why?Why?Why?Why?Why?Why?Why?Why?Why?freakin Why?
> 
> I followed a gentoo wiki guide on manually compiling a kernel and i still have that damn boot(): prompt haunting me.
> 
> http://gentoo-wiki.com/HOWTO_Compile_a_Kernel_Manually
> ...

 

Well, I've been surfing the genkernel source in /usr/share/genkernel

The linuxrc script comes from /usr/share/genkernel/general, and there is a tasty initrd.scripts file that has some clues.

What is not happening is, when udevstart (a symlink to a bare udev) gets invoked, that /dev gets populated with tasty nodes, like /dev/hda6, my / partition.

Copying udev-065.tar.bz2 to /usr/local/src, and unpacking it for an autopsy, udev.c would seem to indicate a requirement for environment variable action

to direct udev to a /sys location to enumerate nodes (forgive my whitespace as I study code--original does NOT look like this):

```

   action    = getenv( "ACTION"    );

   devpath   = getenv( "DEVPATH"   );

   subsystem = getenv( "SUBSYSTEM" );

   /* older kernels passed the SUBSYSTEM only as argument */

   if (!subsystem && argc == 2)

      subsystem = argv[1];

   if (!action || !subsystem || !devpath) {

      err("action, subsystem or devpath missing");

      goto exit;

   }

   /* export log_priority , as called programs may want to do the same as udev */

   if (udev_log_priority) {

      char priority[32];

      sprintf(priority, "%i", udev_log_priority);

      setenv("UDEV_LOG", priority, 1);

   }

   udev_init_device( & udev

                        ,   devpath

                        ,   subsystem

                        ,   action    );

   udev_rules_init(  & rules

                       ,    0         );

   retval = udev_process_event( & rules

                                   , & udev);

```

In summary, udev appears to be anticipating some environment variable input that is not provided, AFAIKT.

The syntax is vague; I should probably easter-egg a bit at the ash command line to try to make it worky-worky.

R,

C

----------

## smitty_one_each

```

/usr/share/genkernel/generic/initrd.scripts

@@ -207,7 +207,25 @@

 }

 runUdev() {

        mount -t tmpfs -o size=100k udev /dev

+       SYSFSDIR=/sys           # change this for a nonstand sysfs mount point

+       BIN=/sbin/udev          # location of your udev binary

+       export ACTION=add       # 'add' or 'remove'

+

+       for i in ${SYSFSDIR}/block/*; do

+               # add each drive

+               export DEVPATH=${i#${SYSFSDIR}}

+               $BIN block

+

+               # add each partition, on each device

+               for j in $i/*; do

+                       if [ -f $j/dev ]; then

+                               export DEVPATH=${j#${SYSFSDIR}}

+                               $BIN block

+                       fi

+               done

+       done

        mkdir /dev/pts

        mkdir /dev/shm

        /sbin/udevstart

```

The careful reader will note a nearly direct thugging from udev-065/test/test.block

This let the initrd create all of the /dev/hdan entries; there is probably more work to do to make the whole thing work right.

So, I shouldn't marked this [Solved].

Best,

Chris

----------

## smitty_one_each

https://bugs.gentoo.org/show_bug.cgi?id=101599

----------

## DualCpuUser

My problem also!  I have been using the 60+ versions of udev and with initrd it was just fine.

I have udev-65 now and also genkernel is using 65.  default 54 not work in genkernel, so I used the latest.

I get invalid root device  on my SATA disk,  / is /dev/sda6  When doing a dir, there are NO /dev/hd* or /dev/sd*

-R

----------

