making initrd for sarge 2.6 kernel, error using mkinitrd)
Hi,
i'm having trouble making an initrd (that works) for a custom compiled
kernel. If i use the 2.6.7 sarge kernel and using lvm2 (only boot not on
lvm2)all is well. I wanted to compile the 2.6.8 kernel & activate the
framebuffer amongst other things. I can compile a kernel fine it gave me a
Kernel panic: VFS: Unable to mount root fs on unknown-block(0,0)
I then restarted the whole process and copied over the config of the 2.6.7
without changing
anything, yet the resulting error is the same
"Kernel panic: VFS: Unable to mount root fs on unknown-block(0,0)"
So i thought the initrd is the problem and tried making my own initrd:
mkinitrd -o /boot/initrd.img-2.6.8.10sep2004 2.6.8.10sep2004
This returns with an error:
/usr/sbin/mkinitrd: /dev/mapper/main-lv_swap: Kernel does not support LVM
Weird because the standard 2.6.7 kernel in debian does support it and mine
as well:
CONFIG_BLK_DEV_DM=y
Also, when running mkinitrd, does it run necessary commands to load a root
on LVM?
This would be at least vgscan followed by vgchange -a y
Some more info:
1) I compiled the kernel with this line:
make-kpkg --initrd --append-to-version=.10sep2004 kernel_image modules_image
then installed without problems
2) grub
title Debian GNU/Linux, kernel 2.6.8.10sept2004
root (hd0,0)
kernel /vmlinuz-2.6.8.10sep2004 root=/dev/mapper/main-lv_root ro
ramdisk_size=100000
initrd /initrd.img-2.6.8.10sep2004
savedefault
boot
If first thought the error might be due to not having enough ramdisk_size
or specifying the root disk the wrong way. But it should be the same as
the standard installed kernel.
* cat /proc/partitions
major minor #blocks name
3 0 14668416 hda
3 1 97744 hda1
3 2 14570640 hda2
254 0 258048 dm-0
254 1 258048 dm-1
254 2 8388608 dm-2
254 3 1048576 dm-3
254 4 512000 dm-4
254 5 258048 dm-5
* cat /proc/devices
Block devices:
1 ramdisk
3 ide0
22 ide1
254 device-mapper
* ls -la /dev/mapper/main-lv_root
brw------- 1 root root 254, 0 Sep 3 19:16 /dev/mapper/main-lv_root
* perl -e 'printf "%02x\n", 254'
-> fe
So i tried using fe00 as the root device in grub but that doesn't work
either as i then get this error:
Kernel panic: VFS: Unable to mount root fs on unknown-block(254,0)
I then tried something like this as kernel line:
kernel /vmlinuz-2.6.8.07sep2004 ro root=fe00 devfs=mount ramdisk_size=100000
because i thought that maybe devfs was to blame but again, no go.
So why is this kernel unable to load the root file system while it has the
same config as the standard kernel?
Thanks,
Benedict
Reply to: