Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've been trying to compile my own kernel for the first time and I've run into some trouble. After compiling everything and updating lilo, when trying to boot, I get the following error message:
VFS: Cannot open root device "806" or unknown-block(8,6)
Please append a correct "root=" boot option: here are the ava.... (its cut off)
0000 312571224 sda driver: sd
0001 204800 sda1
0002 25781625 sda2
0003 39162991 sda3
0b00 1048575 sr0 driver: sr
Kernel panic - not syncing: VFS: Unable to mount root fs on un... (cut off again)
Pid: 1, comm: swapper Not tainted 2.6.33.4 #1
The kernel version is 2.6.33.1, the distro is Slackware 13.0. My linux partition is ext4 and on /dev/sda6 which is a logical partition. It seems like it isn't recognizing this partition. It boots up fine with the old kernel and doing an fdisk after booting that kernel shows the sda6 partition. I have ext4, SATA and PATA support all in the kernel config. I've tried recompiling a few times now to no avail and I'm not really sure what else to try at this point since is this is my first time. Anyone have any ideas? Let me know if you want to see the output of any files.
How did you go about configuring your kernel? Did you start your config file from scratch?
For a first time I would follow this by Alien BOB. I found it best to have a little hand holding so the first one would go ok so that when I went too far and broke things, I'd have a reference.
I actually did use that guide to walk me through. The only part I differed was that I used gconfig instead of xconfig to make the configuration file because I did not have the Qt library installed.
I noticed at the bottom of that guide it has the error that I'm receiving and says to use an initrd file in that case. I made the initrd with "mkinitrd -c -k 2.6.33.4 -m ext4" and now I get get this error when booting:
mount: mounting /dev/sda6 on /mnt failed: No such device or address
ERROR: No/sbin/init found on rootdev (or not mounted). Trouble ahead. You can try to fix it. Type 'exit' when things are done.
/bin/sh: can't access tty; job control turned off
and then it gives me a shell that I can't type into.
I usually just include my filesystems in the kernel instead of building them as modules, so that I have no need for an initrd, but when using an initrd I just do
Yeah, I ran lilo after changing lilo.conf. I even ran it after changing the initrd (although I don't think it's necessary?).
Code:
bash-3.1# cat /etc/lilo.conf
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" vt.default_utf8=0"
boot = /dev/sda
# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used. We don't specify it here, as there's just one column.
bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
bmp-timer = 65,27,0,255
# Standard menu.
# Or, you can comment out the bitmap menu above and
# use a boot message with the standard menu:
#message = /boot/boot_message.txt
# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# VESA framebuffer console @ 1024x768x256
vga = 773
# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# End LILO global section
# Windows bootable partition config begins
other = /dev/sda3
label = Windows
table = /dev/sda
# Windows bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sda6
label = Linux
read-only
# Linux bootable partition config ends
image = /boot/bzImage-2.6.33.4
initrd = /boot/initrd.gz
root = /dev/sda6
label = newkernel
read-only
Did you follow the guide exactly? If you did then your kernel would be "vmlinuz-2.6.33.4". Also what all did you change in your kernel? It seems like your hard drive can't be read during boot. Did you start with a working Slackware .config file?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.