[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: switch from 2.4.24 lvm1 to 2.6.10 lvm 2 problems



Pigeon wrote:
* then the test [-e /proc/lvm] || exit 1 produces a kernel panic so the /proc/lvm isn't there (because of lvm2 probably)


Well, that strongly suggests to me you've got something wrong with
your kernel... I've just tried it on a box running 2.6.6 that has no
LVM support, and it handles it just fine. Presumably you don't see
/proc/lvm in 'ls /proc'... possibly the module isn't loaded yet - it
seemed, when I was doing research for my own root LVM, that the
modules may not be loaded when you think they should have been - so
it's probably worth trying to modprobe it by hand, check for the
existence of /proc/lvm with ls, and try the test again.

I have compiled lvm2 into the kernel and to work around the bug of mkinitrd i make dm-mod a link to the dm-mirror module. That way i can still use mkinitrd with your script in. So i don't think the module is a problem. I recompiled yet another kernel where i didn't include the advanced partition support that i read could be a problem too. Because there might be other stuff broken, I will then first try to boot the system with root on /dev/hda2 instead of /dev/main/lv_root. If that also doesn't work, my kernel config is wrong. If it works, then i know it's ok and i can proceed getting lvm2 to work.

* anyway, i reboot and do not type that line again, so the next command is this: mkdir tmp/tmpetc

and this fails because "it's a readonly file system"


The linuxrc script produced by the standard mkinitrd process, on
woody, includes a line to mount a writable fs on /tmp:

mount -nt tmpfs tmpfs tmp || mount -nt ramfs ramfs /tmp

(obviously the kernel needs to support either tmpfs or ramfs). In my
setup, this has already been executed by the time we get to the point
where we need a writable /etc. Sounds like we need to look further
back in your initrd script, and make sure that there is something of
the sort happening; if it's there and it's not working, I'd guess your
kernel doesn't have tmpfs or ramfs support.

I'll make another kernel based on the 2.6.8 sources and based on the
config of 2.6.7 and an initrd for that. Then see if that produces the same results.

I've added a tarball of the initrd image my method produced (minus the
binaries and modules) to the page on my site, so it's clear what has
been done by my mkinitrd scripts.

OK, i'll have a look at it

I then tried to even remake the initrd with a script that makes a ext2 image instead of a cramfs but that fails too.

The ext2 image will still be mounted read-only. You need to include

mount -nt / -o remount,rw

at the start of the script to get it mounted read-write.

OK, thanks.

So i'm first off to compiling a new kernel and booting with root=/dev/hda2. If that works, i'll try again with lvm2.

Thanks,
Benedict



Reply to: