[linux-lvm] Patch for Miguel Cabeça's lvm2create_initrd script

Jeff Layton jtlayton at poochiereds.net
Tue Mar 9 21:03:04 UTC 2004


Hi all,
 I recently upgraded the kernel on my box and had an awful time getting
my old initrd image that relies on change_root() to work. I switched to
Miguel's new script and it works great, though I had to make a couple of
tweaks:

 The first one is pretty minor. I have /usr set up as a separate
partition, and debian puts chroot in /usr/sbin. Luckily, chroot is also
a busybox function, so I simply added /initrd/sbin and /initrd/bin to
the PATH so that it could find a working chroot after pivot_root occurs.

 The second one is an ugly hack, and I'm definitely open to better ways
of handling it. After my kernel upgrade (from 2.6.1 to 2.6.4-rc2), the
major number of the device mapper devices on my system changed. So, I
added a hack to copy the contents of the ramdisk /dev/mapper directory
to the /dev/mapper directory on the lvm2 root filesystem, prior to the
pivot_root. It works for me, but I'd love to hear about better ways of
handling this.

I've attached a patch to this email, or you can get the updated script
from:

http://poochiereds.net/svn/lvm2create_initrd

-- 
Jeff Layton <jtlayton at poochiereds.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2create_initrd.patch
Type: text/x-patch
Size: 998 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20040309/e6681a56/attachment.bin>


More information about the linux-lvm mailing list