Slackware 8.1 requires no updating of boot time scripts in order to make LVM work.
For versions previous to Slackware 8.1, you should apply the following patch to /etc/rc.d/rc.S
cd /etc/rc.d cp -a rc.S rc.S.old patch -p0 < rc.S.diff |
----- snip snip file: rc.S.diff--------------- --- rc.S.or Tue Jul 17 18:11:20 2001 +++ rc.S Tue Jul 17 17:57:36 2001 @@ -4,6 +4,7 @@ # # Mostly written by: Patrick J. Volkerding, <volkerdi@slackware.com> # +# Added LVM support <tgs@iafrica.com> PATH=/sbin:/usr/sbin:/bin:/usr/bin @@ -28,19 +29,21 @@ READWRITE=yes fi + # Check the integrity of all filesystems if [ ! READWRITE = yes ]; then - /sbin/fsck -A -a + /sbin/fsck -a / + # Check only the root fs first, but no others # If there was a failure, drop into single-user mode. if [ ? -gt 1 ] ; then echo echo - echo "*******************************************************" - echo "*** An error occurred during the file system check. ***" - echo "*** You will now be given a chance to log into the ***" - echo "*** system in single-user mode to fix the problem. ***" - echo "*** Running 'e2fsck -v -y <partition>' might help. ***" - echo "*******************************************************" + echo "************************************************************" + echo "*** An error occurred during the root file system check. ***" + echo "*** You will now be given a chance to log into the ***" + echo "*** system in single-user mode to fix the problem. ***" + echo "*** Running 'e2fsck -v -y <partition>' might help. ***" + echo "************************************************************" echo echo "Once you exit the single-user shell, the system will reboot." echo @@ -82,6 +85,44 @@ echo -n "get into your machine and start looking for the problem. " read junk; fi + # okay / fs is clean, and mounted as rw + # This was an addition, limits vgscan to /proc thus + # speeding up the scan immensely. + /sbin/mount /proc + + # Initialize Logical Volume Manager + /sbin/vgscan + /sbin/vgchange -ay + + /sbin/fsck -A -a -R + #Check all the other filesystem, including the LVM's, excluding / + + # If there was a failure, drop into single-user mode. + if [ ? -gt 1 ] ; then + echo + echo + echo "*******************************************************" + echo "*** An error occurred during the file system check. ***" + echo "*** You will now be given a chance to log into the ***" + echo "*** system in single-user mode to fix the problem. ***" + echo "*** Running 'e2fsck -v -y <partition>' might help. ***" + echo "*** The root filesystem is ok and mounted readwrite ***" + echo "*******************************************************" + echo + echo "Once you exit the single-user shell, the system will reboot." + echo + + PS1="(Repair filesystem) #"; export PS1 + sulogin + + echo "Unmounting file systems." + umount -a -r + mount -n -o remount,ro / + echo "Rebooting system." + sleep 2 + reboot + fi + else echo "Testing filesystem status: read-write filesystem" if cat /etc/fstab | grep ' / ' | grep umsdos 1> /dev/null 2> /dev/null ; then @@ -111,14 +152,16 @@ echo -n "Press ENTER to continue. " read junk; fi + fi + # remove /etc/mtab* so that mount will create it with a root entry /bin/rm -f /etc/mtab* /etc/nologin /etc/shutdownpid # mount file systems in fstab (and create an entry for /) # but not NFS or SMB because TCP/IP is not yet configured -/sbin/mount -a -v -t nonfs,nosmbfs +/sbin/mount -a -v -t nonfs,nosmbfs,proc # Clean up temporary files on the /var volume: /bin/rm -f /var/run/utmp /var/run/*.pid /var/log/setup/tmp/* --snip snip snip end of file--------------- |