You are not logged in.
I'm using an EEE 1000h with LVM root (don't ask me why I decided to do this). It works fine with the stock kernel, but the eee custom kernel doesn't have lvm support by default. So I thought I'd get around this by creating a new initramfs for it.
I run
mkinitcpio -g /boot/eee-pc-image.img -k /boot/vmlinuzeee
and mkinitcpio does successfully generate an initramfs for the kernel. However, when it tries to parse the lvm2 hook it says it can't find dm[-_]mod. And naturally when I try to boot with the custom kernel and initramfs it can't find my lvm volumes and throws me into an emergency shell. I used the same mkinitcpio.conf as I used when I installed the system the first time, so it does have the lvm2 hook. mkinitcpio also returns a bunch of "error opening alias file: No such file or directory" when it tries to parse the autodetect hook. I don't know if that's related or relevant.
The relevant line in my menu.lst is
title Arch Linux - kernel-eee
root (hd0,0)
kernel /vmlinuzeee root=/dev/mapper/kirei-archroot ro resume=/dev/mapper/kirei-swap
initrd /eeepc.img
which is based on the same line for the working stock kernel grub entry.
Offline
EDIT: Come to think of it, it shouldn't break boot... Do you have the udev hook in there as well? Otherwise, lvm has no devices to play with...
Still, the following should take out the message about dm-mod not being found /EDIT
You got two option:
1. Compile dm-mod as a module (the prefered and easier to maintain option)
2. Change the two files that comprise the lvm-part of mkinitcpio:
# /lib/initcpio/install/lvm2
# vim: set ft=sh:
install ()
{
# MODULES=" dm-mod " <- original
MODULES="" # <- changed
BINARIES=""
FILES=""
SCRIPT="lvm2"
add_dir "/dev/mapper"
add_file "/sbin/lvm.static" "/bin/lvm"
}
help ()
{
cat<<HELPEOF
This hook loads the necessary modules for an LVM2 root device.
HELPEOF
}
# /lib/initcpio/hooks/lvm2
# vim:set ft=sh:
run_hook ()
{
# /sbin/modprobe -q dm-mod >/dev/null 2>&1 <- commented out this line
if [ -e "/sys/class/misc/device-mapper" ]; then
read dev_t < /sys/class/misc/device-mapper/dev
if [ ! -e "/dev/mapper/control" ]; then
/bin/mknod "/dev/mapper/control" c $(/bin/replace "${dev_t}" ':')
fi
[ "${quiet}" = "y" ] && LVMQUIET=">/dev/null"
msg "Scanning logical volumes..."
eval /bin/lvm vgscan --ignorelockingfailure $LVMQUIET
msg "Activating logical volumes..."
eval /bin/lvm vgchange --ignorelockingfailure -ay $LVMQUIET
fi
}
The reason why option one is preferred is that, if you'd choose option 2, you'd have to redo the changes every time you get an update to the lvm package.
Last edited by klixon (2009-08-24 09:07:22)
Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!
Offline
Yeah, the udev hook is in my mkinitcpio.conf, and it is listed before the lvm2 hook.
What do you mean, compile dm_mod as a module? Is the problem that the dm_mod I currently have for the stock kernel is incompatible with the eee kernel, and mkinitcpio can figure this out? If that's the case how do I go about compiling dm_mod for the eee kernel and putting it in the kernel at boot?
Offline
hmm... Did you use this PKGBUILD from AUR?
If so, somewhere during the build, you get to the "make menuconfig" portion of kernel building. A blue screen with a menu appears...
In that screen go to "Device drivers -> Multiple device support (RAID and LVM)"
Now, press the spacebar on the "[ ] Multiple devices driver support (RAID and LVM)" option
And press 'm' on the "< > Device mapper support" option
Now you have LVM enabled in you kernel configuration (as a module).
Press <esc> several times and save the kernel config when asked. Your kernel will be rebuild. After it's been rebuilt, install it and rebuild your initcpio.
All should be fine now
Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!
Offline
Ah, no, I'm using toofishes' kernel-eee from git, as per this wiki page: http://wiki.archlinux.org/index.php/Ins … eee_tweaks. I added the make menuconfig line into the PKGBUILD for that and rebuilt the kernel. But device mapper support as a module was already configured in the menuconfig by default. I rebuilt the kernel anyway with device mapper support built-in, tried booting with it and it still couldn't find my lvm root. The dm-mod.ko file does exist in /lib/modules/2.6.30.5eee/kernel/drivers/md, so I don't see why mkinitcpio wouldn't be able to find it and include it in the initramfs. So neither way of getting root lvm support seems to be working, unless I am doing something wrong somewhere.
Offline