Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Why doesn't my custom kernel boot ("root block device")
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
apple_orange
n00b
n00b


Joined: 18 Feb 2015
Posts: 1

PostPosted: Wed Feb 18, 2015 11:05 am    Post subject: Why doesn't my custom kernel boot ("root block device&q Reply with quote

I've followed the gentoo handbook closely in order to compile my own kernel, so I did these:
Code:
emerge --ask sys-kernel/gentoo-sources
cd /usr/src/linux
make menuconfig #configured my kernel
make #this took about 30-40 minutes
make modules_install
make install

and then later in the boot loader chapter, I've installed LILO configuring it like this:
Code:
boot=/dev/sda
prompt
timeout=50
default=gentoo
 
image=/boot/vmlinuz-3.17.8-gentoo-r1
  label=gentoo
  read-only
  root=/dev/sda5


Now when I booted into my newly installed gentoo I got an error like this:
Code:
kernel panic-not syncing: VFS: unable to mount root fs on unknown block(0,0)

I realized it might be because I don't have initramfs so I decided to compile it as well (following the handbook)
Code:
#ran these
emerge --ask genkernel
genkernel --install initramfs

#and changed my lilo.conf to the following:
boot=/dev/sda
prompt
timeout=50
default=gentoo
vga=normal

image=/boot/vmlinuz-3.17.8-gentoo-r1
   label=gentoo
   read-only
   append="real_root=/dev/sda5"
   initrd="/boot/initramfs-genkernel-x86-3.17.8-gentoo-r1"


This seems to have fixed the "kernel panic" problem, but then I immediatelly ran into another one;
Now when I boot into gentoo I get an error like this:
Code:
!! Block device /dev/sda5 is not a valid root device...
!! Could not find the root block device in .
   Please specify another value or: press Enter for the same, type "shell" for a shell, or "q" to skip...
root block device() ::

I have no idea how to fix this, and I suspect it might be because I didn't turn on some option in make menuconfig but have no idea what exactly.
How do I fix this?

Additional info:
Code:
#My partition table:
sda
|- sda1 #primary (100M)
|- sda2 #primary (10G)
|- sda3 #primary (20G)
|- sda4 #extended (1K)
|- sda5 #logical (20G) << this is where I am installing gentoo

#My fstab (whole file):
/dev/sda5 / ext4 defaults 0 1

#My current lilo.conf:
boot=/dev/sda
prompt
timeout=50
default=gentoo
vga=normal

image=/boot/vmlinuz-3.17.8-gentoo-r1
   label=gentoo
   read-only
   append="real_root=/dev/sda5"
   initrd="/boot/initramfs-genkernel-x86-3.17.8-gentoo-r1"
Back to top
View user's profile Send private message
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 434
Location: Stockholm

PostPosted: Wed Feb 18, 2015 2:56 pm    Post subject: Reply with quote

Quote:
!! Block device /dev/sda5 is not a valid root device...
!! Could not find the root block device in .
Please specify another value or: press Enter for the same, type "shell" for a shell, or "q" to skip...
root block device() ::

Enter "shell" and "ls /dev" to see what you see..

With "blkid" you can get the UUID for each partition, in my lilo.conf:

append="root=UUID=3717a696....-a9b6 ro"

And you have to run "lilo" each time you generate a new kernel or initrd. Grub is easier I think.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Wed Feb 18, 2015 10:42 pm    Post subject: Reply with quote

Code:
unable to mount root fs on unknown block(0,0)

This indicates your kernel has no clue how to access the hard drive via your particular controller. Drop the initrd and add your HDD controller support to your kernel, make sure it is built in, not as module. Also you need built-in support for your partition table and root filesystem in order to boot successfully.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
A.S. Pushkin
Guru
Guru


Joined: 09 Nov 2002
Posts: 418
Location: dx/dt, dy/dt, dz/dt, t

PostPosted: Sun Mar 29, 2015 4:50 am    Post subject: Why doesn't my custom kernel boot ("root block device&q Reply with quote

Are you including drivers for the file system you use?

For reasons that not be useful I have long included /usr on a separate partition. When Gentoo moved as it did I was forced to use an initramfs
and also genkernel as I was not quite certain how to build it myself. Twice over the last several years I ran into a similar issue to the one
you have. I switched from ext3 to ext4 and with both file systems on one occasion each I missed that when I ran old config my drivers did not get updated.
When building the file system into the kernel my problem went away. I now remind myself to double check this.

I hope this might be your problem.
_________________
ASPushkin

"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
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