Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CD kernel cannot find root device at boot. [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
52midnight
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2012
Posts: 136
Location: Brisbane AU

PostPosted: Fri Mar 15, 2013 10:07 pm    Post subject: CD kernel cannot find root device at boot. [SOLVED] Reply with quote

According to Gentoo/x86 Installation Tips & Tricks the kernel and modules on the Installation CD can be used for a hard disk installation. I have tried this and it has failed, reporting that it cannot mount whatever root partition I specify. The grub entry initially read:
Code:
root (hd0,2)
kernel /boot/gentoo

and after starting to boot, failed with the following:
Code:
VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

When a boot option is added:
Code:
root (hd0,2)
kernel /boot/gentoo root=/dev/sda3

the resulting message is:
Code:
VFS: Cannot open root device "sda3" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

The machine is a Lenovo laptop that's been running Lx and Gentoo successfully for years. Note that "the available partitions" list is empty - seems that the kernel can't detect the four Lx boot partitions on the HDD.

Can anyone please throw some light on this?


Last edited by 52midnight on Sat Mar 16, 2013 5:14 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Mar 15, 2013 10:17 pm    Post subject: Reply with quote

52midnight,

The liveCD kernel is made with genkernel. It must have an initrd.
You need to copy the initrd over to boot and tell grub to load it.

All of the hardware device drivers are in the initrd, along with the filesystem drivers you need to load before the genkernel kernel can mount your root.
Your diagnosis is spot on.
_________________
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
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1411

PostPosted: Fri Mar 15, 2013 10:27 pm    Post subject: Reply with quote

Quote:
Using the Installation CD kernel

If you don't want to compile a kernel yourself you can use the kernel from the Installation CD and copy it to your system. When you come to the point that you're asked to compile a kernel, go to another terminal (press Alt-F2) and log in with the root password you've supplied at the beginning of the installation.

Copy over the kernel and modules to your Gentoo system:

Code Listing 2.8: Copying over the Installation CD kernel
(${KN} is the kernel name, usually something like 'gentoo' or 'smp')
Code:
cdimage ~# cp /mnt/cdrom/isolinux/${KN} /mnt/cdrom/isolinux/${KN}.igz /mnt/gentoo/boot
cdimage ~# mkdir -p /mnt/gentoo/lib/modules
cdiamge ~# cp -Rp /lib/modules/`uname -r` /mnt/gentoo/lib/modules


To have all modules that are currently running (from the Installation CD) loaded during bootup of your Gentoo system, run the following command from within the chrooted environment:

Code Listing 2.9: Adding all running modules to the /etc/conf.d/modules file
Code:
# printf "modules\"" >> /etc/conf.d/modules
# cat /proc/modules | cut -d ' ' -f 1 >> /etc/conf.d/modules
# printf "\"\n" >> /etc/conf.d/modules


You must still edit /boot/grub/grub.cfg to point to your root partition, 0 2 is the partition map on the ISO, not your hard disk. Read Chapter 10
_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
52midnight
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2012
Posts: 136
Location: Brisbane AU

PostPosted: Fri Mar 15, 2013 10:55 pm    Post subject: Reply with quote

> It must have an initrd.

OK, problem being I can't find one when the CD is mounted. There are two top-level directories, /gentoo.efimg.mountPoint/ and /isolinux/ The first contains gentoo and gentoo.igz and System.map-gentoo all of which I've copied over, also elilo.efi that's a binary of some sort.

The /isolinux/ dir has duplicates of these along with several other files, including isolinux.bin and isolinux.cfg

I know little about booting with isolinux, but it may be that one of these serves the function of an initrd, since there's nothing with that name on the CD. The most likely candidate is probably gentoo.efimg in the root directory.

I've tried listing /boot/ and /mnt/livecd/boot/ when the CD is running, but they're both empty. The CD is install-x86-minimal-20121213.iso

I tried adding initrd /boot/gentoo.efimg to grub.conf with the same failed result.

> 0 2 is the partition map on the ISO, not your hard disk.

Hmm. The install partn is /dev/sda3, or hd(0,2) in grubbish, as specified in grub.conf.
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Sat Mar 16, 2013 1:44 am    Post subject: Reply with quote

52midnight,

Easy way to tell. Look at isolinux/isolinux.cfg

kernel gentoo initrd=gentoo.igz
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
52midnight
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2012
Posts: 136
Location: Brisbane AU

PostPosted: Sat Mar 16, 2013 5:13 am    Post subject: Reply with quote

BillWho wrote:
52midnight,
Easy way to tell. Look at isolinux/isolinux.cfg
kernel gentoo initrd=gentoo.igz

Great! Simple, even obvious, like all good solutions.
Code:
root (hd0,2)
kernel /boot/gentoo initrd=gentoo.igz root=/dev/sda3
initrd /boot/gentoo.igz

Boots like a football star! Many thanks, Doctor.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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