LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-21-2006, 03:02 PM   #1
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Rep: Reputation: 16
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.

Any ideas on what is going wrong?
 
Old 11-21-2006, 05:19 PM   #2
binomine
LQ Newbie
 
Registered: Nov 2006
Location: Michigan, USA
Distribution: Slackware v11
Posts: 4

Rep: Reputation: 0
I'm having a simular problem.

Here's my message:
Quote:
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.
 
Old 11-21-2006, 08:22 PM   #3
The_Outlander
Member
 
Registered: Aug 2004
Location: Australia
Distribution: Slackware 12.1
Posts: 235

Rep: Reputation: 30
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.
 
Old 11-22-2006, 10:56 AM   #4
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Original Poster
Rep: Reputation: 16
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
 
Old 11-22-2006, 11:51 AM   #5
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,644

Rep: Reputation: 145Reputation: 145
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"?
 
Old 11-22-2006, 11:55 AM   #6
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Original Poster
Rep: Reputation: 16
I did change the processor type from the generic to Pentium4. When I compiled, I did: make bzImage, make modules, make modules_install.

I'll try deleting the modules dir and re-compiling.
 
Old 11-22-2006, 11:58 AM   #7
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,644

Rep: Reputation: 145Reputation: 145
And make install? Or did you copy the kernel yourself to /boot?
 
Old 11-22-2006, 12:01 PM   #8
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Original Poster
Rep: Reputation: 16
Copied myself because I renamed it.

When I tried to compile the modules, I got a bunch of errors, so I bet somewhere something got screwed up.
 
Old 11-22-2006, 12:06 PM   #9
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,644

Rep: Reputation: 145Reputation: 145
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.
 
Old 11-22-2006, 07:45 PM   #10
The_Outlander
Member
 
Registered: Aug 2004
Location: Australia
Distribution: Slackware 12.1
Posts: 235

Rep: Reputation: 30
Hi, my suggestion will only work if reiserfs is compiled as a module; not built in.
 
Old 11-23-2006, 07:19 AM   #11
The_Outlander
Member
 
Registered: Aug 2004
Location: Australia
Distribution: Slackware 12.1
Posts: 235

Rep: Reputation: 30
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)

Run lilo otherwise it won't work.
#lilo

Some resources.
The slackware forum kernel compile guide, alienbob's kernel howto, and
http://www.digitalhermit.com/linux/K...ild-HOWTO.html
 
Old 11-27-2006, 06:50 PM   #12
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Original Poster
Rep: Reputation: 16
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
 
Old 11-27-2006, 07:31 PM   #13
The_Outlander
Member
 
Registered: Aug 2004
Location: Australia
Distribution: Slackware 12.1
Posts: 235

Rep: Reputation: 30
Smile

Hi shubb,

The first line of your lilo.conf for the 2.6.18 kernel is incorrect.
Quote:
image = /boot/vmlinuz-2.6.18
initrd = /boot/initrd.gz
root = /dev/hda6
label = Linux_2.6.18
read-only
It should be
Quote:
image=/boot/bzImage-2.6.18
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.
 
Old 11-27-2006, 08:06 PM   #14
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Original Poster
Rep: Reputation: 16
I changed the image to the correct name before I ran lilo. The config file points to the correct image.

Code:
root@dellslack:~# ls /boot
total 8851
drwxr-xr-x  4 root root    1024 2006-11-24 12:43 .
drwxr-xr-x 20 root root     456 2006-11-21 23:12 ..
lrwxrwxrwx  1 root root      37 2006-11-21 23:14 README.initrd -> /usr/doc/mkinitrd-1.0.1/README.initrd
lrwxrwxrwx  1 root root      27 2006-11-24 12:37 System.map -> /boot/System.map-ide-2.6.18
-rw-r--r--  1 root root  629105 2006-11-21 23:14 System.map-ide-2.4.33.3
-rw-r--r--  1 root root  805552 2006-11-24 12:42 System.map-ide-2.6.18
-rw-r--r--  1 root root  629105 2006-11-21 23:14 System.old
-rw-r--r--  1 root root     512 2006-11-21 23:14 boot.0300
-rw-r--r--  1 root root     209 2006-11-21 23:14 boot_message.txt
-rw-r--r--  1 root root   41810 2006-11-21 23:14 config
-rw-r--r--  1 root root   41810 2006-11-21 23:14 config-ide-2.4.33.3
-rw-r--r--  1 root root    5032 2006-11-21 23:14 diag1.img
drwxr-xr-x  8 root root    1024 2006-11-24 12:42 initrd-tree
-rw-------  1 root root  390465 2006-11-24 12:42 initrd.gz
drwx------  2 root root   12288 2006-11-21 23:14 lost+found
-rw-------  1 root root   54784 2006-11-24 12:43 map
-rw-r--r--  1 root root 1925383 2006-11-22 11:27 vmlinuz
-rw-r--r--  1 root root 1841524 2006-11-24 12:36 vmlinuz-2.6.18
-rw-r--r--  1 root root 1313255 2006-11-21 23:15 vmlinuz-ide-2.4.33.3
-r--------  1 root root 1313255 2006-11-21 23:14 vmlinuz.old
 
Old 11-27-2006, 08:45 PM   #15
The_Outlander
Member
 
Registered: Aug 2004
Location: Australia
Distribution: Slackware 12.1
Posts: 235

Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
another kernel panic not synching vfs unknown block xcoldfyrex Linux - General 1 05-29-2006 09:07 AM
kernel 2.6--unable to mount fs on unknown-block verbose Linux - Kernel 8 05-10-2006 07:18 PM
Kernel panic: VFS: cannot mount root fs on unknown-block headrift Slackware 1 02-07-2006 11:59 AM
Kernel Panic:VFS:Unable to mount root fs on Unknown block dinesha Linux - Software 2 02-27-2004 12:37 PM
kernel panic VFS: unable to mount root fs on unknown-block (0,0) demmylls Linux - General 2 02-08-2004 10:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration