You are not logged in.
Hi,
I decided to repartition my hdd for dual boot and put my /boot into LVM. I installed grub2 to make it work from /boot in LVM. As I was already using LVM, I thought this will be easy. But I get kernel panics now.
I partitioned my disk like this:
/dev/sda1 LVM - /root and swap
/dev/sda2 ntfs - windows xp
/dev/sda3 ntfs - other m$ products
/dev/sda4 LVM - /home
I installed Arch using /arch/setup - traditional way - and put lvm2 into mkinitcpio hooks. I installed grub2, edited grub.cfg and rebooted. Then I got:
:: Initramfs Completed - control passing to kinit
IP-Config: no devices to configure
Waiting 0 s before mounting root device...
kinit: Cannot open root device dm-2(254,2)
kinit: init not found!
Kernel panic - not syncing: Attempt to kill init!
So, my config files:
grub.cfg
menuentry "Arch Linux Overlord" {
set root=(vg0-root)
linux /boot/vmlinuz26 root=/dev/mapper/vg0-root
initrd /boot/kernel26.img
}
menuentry "Arch Linux Overlord Fallback" {
set root=(vg0-root)
linux /boot/vmlinuz26 root=/dev/mapper/vg0-root
initrd /boot/kernel26-fallback.img
}
mkinitcpio.conf
MODULES="pata_acpi ata_generic scsi_mod ata_piix reiserfs dm-mod" # I tried adding dm-mod and reiserfs to see if it helps... it doesn't
HOOKS="base udev autodetect pata scsi sata usb keymap lvm2 filesystems" # lvm2 before filesystems
After first panic, I added reiserfs and dm-mod to modules using arch live cd:
$ mount /dev /mnt/dev --bind
$ mount /proc /mnt/proc --bind
$ mount /sys /mnt/sys --bind
$ chroot /mnt
$ mkinitcpio -p kernel26
I tried fallback image, same kernel panic happens. What might be wrong here? I have no clue right now...
Thanks
Edit: I solved the problem myself, but the cause is mystery to me. At the end of the init script, this gets executed:
exec /bin/kinit -- "root=${root}" ${kinit_params} "${runlevel}" > /dev/null 2>&1
Which actually expanded into:
exec /bin/kinit -- "root=/dev/mapper/vg0-root" rootfstype=gzip rootdelay=0 "" > /dev/null 2>&1
Where rootfstype=gzip was the problem. I hardcoded rootfstype=reiserfs into /lib/initcpio/init and rebuilt initramfs and rebooted. It worked! Now I have to found how it got there...
Last edited by dante4d (2008-08-09 21:57:17)
Offline
It's not a good idea to have /boot in an lvm. Put /boot as a seperate partition. What the problem is is that grub does not know how to read an lvm logical drive.
Offline
It's not a good idea to have /boot in an lvm. Put /boot as a seperate partition. What the problem is is that grub does not know how to read an lvm logical drive.
I decided to repartition my hdd for dual boot and put my /boot into LVM. I installed grub2 to make it work from /boot in LVM.
Maybe I should have written it more bold . If grub couldn't find my boot partition, how could kernel panic? I use grub2, which can see inside lvm volumes. Getting it to work is another story . Now I got it I want to keep it. Since grub2 sucessfully loads kernel image and passes control to it, this could fail the same way with /boot outside lvm, no? This is my first attempt with grub2 and /boot in lvm. I'm really not sure why it doesn't want to work... Cannot open root volume... If I can mount it with live cd, why kernel on hdd with initrd + lvm can't? Duting boot, kernel says that lvm volumes were sucessfully recognised and lists them out...
Offline