Subversion Repositories livecd

Rev

Rev 227 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 227 Rev 228
Line 815... Line 815...
815
        echo "done."; echo
815
        echo "done."; echo
816
    fi
816
    fi
817
fi
817
fi
818
 
818
 
819
 
819
 
-
 
820
### umount /dev /sys /proc from chroot
-
 
821
### -----------------------------------------------------------
-
 
822
umount $NEW/dev
-
 
823
umount $NEW/sys
-
 
824
umount $NEW/proc
-
 
825
 
-
 
826
 
820
### install grub for the 2. time, if it failed before 
827
### install grub for the 2. time, if it failed before 
821
### (happens on xfs filesystem), to be sure run it twice.
828
### (happens on xfs filesystem), to be sure run it twice.
822
### -----------------------------------------------------------
829
### -----------------------------------------------------------
823
if [ ! $NOGRUB ] && [ $GRUB_FAILED ]; then
830
if [ ! $NOGRUB ] && [ $GRUB_FAILED ]; then
824
 
831
 
825
    echo "Run grub-install once more ... "
832
    echo "Run grub-install once more ... "
826
 
833
 
827
    [ ! $FLOPPY ] && NO_FLOPPY_OPT="--no-floppy"
834
    [ ! $FLOPPY ] && NO_FLOPPY_OPT="--no-floppy"
828
 
835
 
829
    cd /
-
 
830
    # remount partition
836
    # remount partition
831
    if [ $MOUNTED = "0" ]; then
837
    if [ $MOUNTED = "0" ]; then
832
	umount $NEW
838
	umount $NEW
833
	mount $INSTALL_PART $NEW
839
	mount $INSTALL_PART $NEW
834
    fi
840
    fi
Line 838... Line 844...
838
    if [ $MOUNTED = "0" ]; then
844
    if [ $MOUNTED = "0" ]; then
839
	umount $NEW
845
	umount $NEW
840
	mount $INSTALL_PART $NEW
846
	mount $INSTALL_PART $NEW
841
    fi
847
    fi
842
    grub-install $NO_FLOPPY_OPT --root-directory=$NEW $MBR_DEV
848
    grub-install $NO_FLOPPY_OPT --root-directory=$NEW $MBR_DEV
843
    if [ "$?" =! "0" ]; then
849
    if [ "$?" != "0" ]; then
844
	echo "grub-install failed again."
850
	echo "grub-install failed again."
845
	echo "You can try to run grub-install manually as root with:"
851
	echo "You can try to run grub-install manually as root with:"
846
	echo
852
	echo
847
	echo " mount $INSTALL_PART $NEW"
853
	echo " mount $INSTALL_PART $NEW"
848
	echo " grub-install $NO_FLOPPY_OPT --root-directory=$NEW $MBR_DEV"
854
	echo " grub-install $NO_FLOPPY_OPT --root-directory=$NEW $MBR_DEV"
Line 852... Line 858...
852
 
858
 
853
    echo "done."; echo
859
    echo "done."; echo
854
 
860
 
855
fi
861
fi
856
 
862
 
-
 
863
 
857
### umount $INSTALL_PART
864
### umount $INSTALL_PART
858
### -----------------------------------------------------------
865
### -----------------------------------------------------------
859
umount $NEW/dev
-
 
860
umount $NEW/sys
-
 
861
umount $NEW/proc
-
 
862
UMOUNT_LIST=`df -l | grep "$NEW" | sed -e 's/  */ /g' | cut -d" " -f6 | sort -r`
866
UMOUNT_LIST=`df -l | grep "$NEW" | sed -e 's/  */ /g' | cut -d" " -f6 | sort -r`
863
umount $UMOUNT_LIST
867
umount $UMOUNT_LIST
864
 
868
 
865
 
869
 
866
### print summary
870
### print summary