[linux-lvm] LVM
Andreas Dilger
adilger at turbolabs.com
Wed Sep 19 22:51:34 UTC 2001
On Sep 19, 2001 13:12 +0200, Arkadiusz Miskiewicz wrote:
> > you MUST run lvmcreate_initrd and use the initrd it creates if you run
> > an LVM root fs.
> btw. lvmcreate_initrd is broken. It copies /bin/bash and /bin/sh while
> on some systems /bin/sh is link to /bin/othershell (like /bin/ksh on
> my systems), so initrd created by lvmcreate_initrd is not usable on
> these machines.
Please try the below patch. If it works I can check it into CVS.
Cheers, Andreas
==================== initrd-1.0.1.diff ==========================
diff -u -r1.12 lvmcreate_initrd
--- tools/lvmcreate_initrd 2001/08/30 18:57:31 1.12
+++ tools/lvmcreate_initrd 2001/09/19 22:50:03
@@ -135,7 +135,7 @@
# The size of the ramdisk is automatically calculated unless this is set
#INITRDSIZE=
-INITRDFILES="/sbin/vgchange /sbin/vgscan /bin/bash /bin/mount /bin/umount /bin/sh /bin/rm"
+INITRDFILES="/sbin/vgchange /sbin/vgscan /bin/mount /bin/umount /bin/rm"
if [ "$USEMOD" ]; then
# Check for an LVM module, otherwise it must be compiled into the kernel
@@ -343,6 +343,13 @@
find $INITRDFILES | cpio -pdm $OPT_Q $TMPMNT
if [ $? -ne 0 ]; then
echo "$cmd -- ERROR cpio to ram disk"
+ cleanup 1
+fi
+
+# Copy /bin/sh directly to avoid issues with symlinks
+cp -p /bin/sh $TMPMNT/bin/sh
+if [ $? -ne 0 ]; then
+ echo "$cmd -- ERROR copying /bin/sh to ram disk"
cleanup 1
fi
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
More information about the linux-lvm
mailing list