unknown-block(3.6) when compiling 2.6 kernel in Slack 11
SlackwareThis Forum is for the discussion of Slackware Linux.
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.
unknown-block(3.6) when compiling 2.6 kernel in Slack 11
I've seen many threads about this, and I've tried all the suggestions, and none seem to work.
I have a Dell Latitude D610, and I'm trying to get Slackware 11 to work with the 2.6.x kernel.
I tried compiling my own 2.6.18, using the slack .config as a base, and also using the 2.6.18 and 2.6.17 kernels from the install DVD.
In each case, I have also installed the corresponding kernel modules.
I also tried creating a initrd image specifying reiserfs, with no luck.
This is what I see when it boots:
Code:
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
/boot/initrd.gz: Loading kernel modules from initrd image:
Using /lib/modules/2.6.18/reiserfs.ko
reiserfs: version magic '2.6.18 mod_unload 486 gcc-3.4' should be '2.6.18 PENTIUM4 REGPARM gcc-3.4'
insmod: cannot insert '/lib/modules/2.6.18/reiserfs.ko': Invalid module format (-1): Exec format error
VFS: Cannot open root device "306" or unknown-block(3,6)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,6)
Here is my lilo config:
Code:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hda
message = /boot/boot_message.txt
prompt
timeout = 50
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
vga = 773
# End LILO global section
# Windows bootable partition config begins
other = /dev/hda1
label = Windows
table = /dev/hda
# Windows bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hda6
label = Linux_2.4
read-only
image = /boot/vmlinuz-2.6.18
initrd = /boot/initrd.gz
root = /dev/hda6
label = Linux_2.6.18
read-only
image = /boot/vmlinuz-2.6.18-Stock
#initrd = /boot/initrd.gz
root = /dev/hda6
label = Linux_2.6.18-S
read-only
image = /boot/vmlinuz-2.6.17-Stock
#initrd = /boot/initrd.gz
root = /dev/hda6
label = Linux_2.6.17-S
read-only
# Linux bootable partition config ends
I am trying to boot the "Linux_2.6.18" kernel, which has the initrd image.
VFS mount root(ext2 filesystem).
No Kernel modules found for Linux 2.6.17.13
Input : AT translated Set 2 Keyboard /class/input/input0
No filesystem could mount root, tried: ext2
Kernel Panic - Not syncing VFS: Unable to mount fs on unknown block(3,2)
Our common thread is that we're running reiserfs, but VFS tries to mount ext2 and fails.
My current guess is that my harddrive is not supported by default. However, being a newbie, I am unsure of how to check this.
The vmlinuz image installed when installing the extra 2.6.x.x kernels will not work as far as I know. There are instructions on how to use a vmlinuz image in this case on the disk.
I resolved this issue by using a separate boot partition, ext2, with the file system built into the kernel. The root partition is reiserfs and is modular. I use the bzImage and create a reiserfs initrd. This means compiling your own kernel.
This has worked on both IDE and now a SATA setup.
The solution above was recommended in a kernel howto, but I forget exactly where.
This may not be the exact solution that you are looking for, but I find it very reliable.
Last edited by The_Outlander; 11-21-2006 at 08:58 PM.
I just tried your suggestion, and it still didnt work. I copied the /boot partition, reformatted as ext2, then copied the files back and changed the fstab entry for the partition.
Are there specific options that need to be compiled in the kernel? My kernel has ext2, ext3, reiserfs, jfs, etc all compiled in.
Are there specific options (other than the ones specified in the initrd.readme) that you need to do when making the initrd? I specified reiserfs when I created the initrd.
I think this error has something to do with it.
Quote:
insmod: cannot insert '/lib/modules/2.6.18/reiserfs.ko': Invalid module format (-1): Exec format error
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,644
Rep:
If you compiled your own kernel, are you sure that no precompiled modules were left? I read your error the way that you have a module for 486 but a kernel for Pentium4. Maybe delete the /lib/modules/2.6.18 folder and compile it again? How did you compile your kernel -- did you a "make modules_install"?
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,644
Rep:
If you want to give the kernel and modules a different name you could use a kernel feature. If you call a kernel config (make menuconfig/xconfig) under "General Setup" --> "Local version" you can give your own appendix to the kernel's name.
So this way "make" "make modules_install" and "make install" should be enough if you create a lilo entry before or after compiling the kernel.
Sorry for the short reply - on my way to work.
I hope this is of help.
There are several things that need to be built in the kernel.
Loadable module support > automatic kernel module loading
Device Drivers > Block Devices> Ram disk support
>>Initial Ram filesystem and RAM disk support
File Systems ext2 built in and reiserfs compiled as a module.
After compiling the kernel
#make modules_install
(the next line will depend on your architecture i386 or whatever)
#cp /path to kernel source/arch/i386/boot/bzImage /boot/bzImage-name (The name you want to call it)
#cp /path to kernel source/System.map /boot/System.map
#cp /path to kernel source/System.map /boot/System.map-name (same name as the bzImage for consistency)
#ln -s -f /boot/System.map-name /boot/System.map (link the System.map)
#ls -l /boot/System.map (should see link to System.map)
#mkinitrd -c -k 2.6.x.x -m reiserfs (your kernel version)(creates /boot/initrd-tree/lib/modules/2.6.x.x/reiserfs.ko)
/etc/lilo.conf (example)
image=/boot/bzImage-name
initrd=/boot/initrd.gz
root=/dev/hdx
label=name
read-only
vga=(the value you want)
I just tried your suggestion, and I still get nowhere.
The last messages on the console are:
Code:
RAMDISK: Compressed image found at block 0
VFS: Mounted root {ext2 filesystem}
/boot/initrd.gz: Loading kernel modules from initrd image:
Using /lib/modules/2.6.18/reiserfs.ko
input: AT Translated Set 2 keyboard as /class/input/input0
VFS: Cannot open root device "306" or unknown-block(3,6)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,6)
My lilo config:
Code:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hda
message = /boot/boot_message.txt
prompt
timeout = 50
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# VESA framebuffer console @ 1024x768x256
vga = 773
# End LILO global section
# Windows bootable partition config begins
other = /dev/hda1
label = Windows
table = /dev/hda
# Windows bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz-ide-2.4.33.3
root = /dev/hda6
label = Linux_2.4
read-only
image = /boot/vmlinuz-2.6.18
initrd = /boot/initrd.gz
root = /dev/hda6
label = Linux_2.6.18
read-only
# Linux bootable partition config ends
When you set up lilo as described earlier you must use the bzImage.
From the previous example the bzImage is copied to the boot directory.
As below with your kernel version.
Quote:
#make modules_install (You already did this)
(the next line will depend on your architecture i386 or whatever)
#cp /path to kernel source/arch/i386/boot/bzImage /boot/bzImage-2.6.18
#cp /path to kernel source/System.map /boot/System.map
#cp /path to kernel source/System.map /boot/System.map-2.6.18
#ln -s -f /boot/System.map-2.6.18 /boot/System.map
#ls -l /boot/System.map
#mkinitrd -c -k 2.6.18 -m reiserfs
Finally run lilo. (The number of times I forgot to do this!)
The 'I' in bzImage is uppercase (occasionally a lower case typo would creep in and things would not boot).
Providing the kernel options are correctly set this will work.
Last edited by The_Outlander; 11-27-2006 at 07:41 PM.
OK you didn't indicate that in your previous post. I guess you changed the System.map name also? I tend to use the original names throughout to avoid confusion, but I guess it doesn't matter.
I checked my /boot files and yours look OK given the name differences.
Evidently the problem lies elsewhere. This is strange, I have no difficulties with this setup.
In detail to re-cap so far.
You have an ext2 /boot partition, size between 32-64M? the fs is built-in the kernel.
You have a reiserfs root partition the fs built as a module.
Silly question, you have the /boot partition entered in fstab?
I have rechecked my kernel options and I am sure all the necessary options are listed in the previous posts.
Last edited by The_Outlander; 11-27-2006 at 09:03 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.