Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Root block device unspecified or not detected
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
Karl_R
Tux's lil' helper
Tux's lil' helper


Joined: 21 Mar 2004
Posts: 118
Location: Sydney

PostPosted: Sun Mar 21, 2004 7:11 pm    Post subject: Root block device unspecified or not detected Reply with quote

Hi,

I have read the previous posts on this subject but it dosn't help me.
I am using the gentoo-dev-sources (Kernel 2.6.3 r1) and used the latest genkernel to build the kernel and initrd

This is not a problem of not specifying "root=/dev/ram0 init=/linuxrc real_root=/dev/hda5"
(my root filesystem is on /dev/hda5) The problem seems to be with devfs or udev.

The problem is the the BusyBox ram disk created by genkernel has NOT created a /dev/hda5 device node. infact if I enter a shell in the ram disk and look through the /dev directory it hasn't created any device relating to my disk partitions. there is a device that relates to my disk at:

/dev/ide/host0/bus0/target0/lun0/disc which has a major number of 3 and a minor number of 0 but there is no part5 with a major number 3 and minor number 5.

Does anyone know how to fix this? do I have to edit the Busybox to add udev or devfs support and if so what's the best way to go about this?

Cheers

Karl
Back to top
View user's profile Send private message
Karl_R
Tux's lil' helper
Tux's lil' helper


Joined: 21 Mar 2004
Posts: 118
Location: Sydney

PostPosted: Tue Apr 27, 2004 9:12 am    Post subject: Reply with quote

:D I have discovered what the real problem was and hence the solution.

The problem was that I was using lilo as my boot loader This problem does not occur when using grub (but I had to use lilo on my hardware, Toshiba Tecra M1 laptop).
As you are no doubt aware, when using lilo you have to write a lilo.conf file specifying

Code:
boot=/dev/hda
prompt
timeout=50
message=/boot/message
default=linux

image=/boot/linux-2.6.5-gentoo-r1
   label=linux
   initrd=/boot/initrd-2.6.5-gentoo-r1
   read-only
   root=/dev/ram0
        append="init=linuxrc real_root=/dev/hda5"


Lilo reads this file and writes out the Map when the lilo command is ran. The file must be correct at the time lilo is ran hence the "/dev/hda" etc which are the discs and partitions of the "livecd"

The trouble is that when we come to boot up the ram disk (/dev/ram0) starts a udev daemon that manages /dev . This daemon creates device nodes that look like
Code:
/dev/ide/host0/bus0/target0/lun0/disk
for the disk instead of /dev/hda and
Code:
/dev/ide/host0/bus0/target0/lun0/part5
for the /dev/hda5 partition.

The solution is to manually create these nodes before writting lilo.conf from within your livecd install.
To find out what these nodes should be called look in /proc/partitions. There will be entries like
Code:

/dev/ide/host0/bus0/target0/lun0/disk
/dev/ide/host0/bus0/target0/lun0/part5


So find out the Major and Minor numbers for the bits you need. On my machine I ran:
Code:

$ ls -l /dev/hda
brwxr-x---  1  root disk   3,  0  /dev/hda
$ ls -l /dev/hda5
brwxr-x---  1  root disk   3,  5  /dev/hda5


so I need to create a node with Major number 3 Minor 0 and Major 3 Minor 5

Code:
mknod /dev/ide/host0/bus0/target0/lun0/disk b 3 0
mknod /dev/ide/host0/bus0/target0/lun0/part5 b 3 5


then write my lilo.conf as follows:

Code:
boot=/dev/ide/host0/bus0/target0/lun0/disk
prompt
timeout=50
message=/boot/message
default=linux

image=/boot/linux-2.6.5-gentoo-r1
label=linux
initrd=/boot/initrd-2.6.5-gentoo-r1
read-only
root=/dev/ram0
append="init=linuxrc real_root=/dev/ide/host0/bus0/target0/lun0/part5"


then run lilo. exit out of the chrooted enviroment unmount my partitions and reboot. Sorted

It would be nice if livecd created these udev device nodes by default to help out lilo users :wink:
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