Changeset 2462 in MondoRescue
- Timestamp:
- Oct 20, 2009, 4:07:00 PM (15 years ago)
- Location:
- branches/2.2.10
- Files:
-
- 35 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mindi/deplist.d/minimal.conf
r2445 r2462 19 19 /sbin/reboot 20 20 /sbin/openvt 21 /usr/bin/openvt 21 22 /usr/bin/tail 22 23 /usr/bin/which … … 27 28 /usr/bin/cut 28 29 /usr/bin/basename 30 /bin/basename 29 31 /usr/bin/find 30 32 /bin/stty 31 33 /bin/echo 34 /bin/chown 32 35 /bin/mknod 33 36 /bin/kill -
branches/2.2.10/mindi/install.sh
r2460 r2462 43 43 echo "mindi ${MINDIVER}-r${MINDIREV} will be installed under $local" 44 44 45 if [ _"$ CACHEDIR" = _"" ]; then46 CACHEDIR=$local/var/cache/mindi45 if [ _"$MINDI_CACHE" = _"" ]; then 46 localcache=$local/var/cache/mindi 47 47 else 48 CACHEDIR=${HEAD}$CACHEDIR48 localcache=${HEAD}$MINDI_CACHE 49 49 fi 50 50 if [ _"$MANDIR" = _"" ]; then … … 58 58 DOCDIR=${HEAD}$DOCDIR/mindi-$MINDIVER 59 59 fi 60 if [ _"$LIBDIR" = _"" ]; then 61 echo $ARCH | grep -E '^i[0-9]86$' &> /dev/null && ARCH=i386 && locallib=$local/lib 62 echo $ARCH | grep -E '^x86_64$' &> /dev/null && locallib=$local/lib64 63 echo $ARCH | grep -E '^ia64$' &> /dev/null && locallib=$local/lib 64 sublocallib="$locallib/mindi" 60 if [ _"$DATADIR" = _"" ]; then 61 localdata="$local/share" 62 sublocaldata="$localdata/mindi" 65 63 else 66 local lib=${HEAD}$LIBDIR67 sublocal lib="$LIBDIR/mindi"64 localdata=${HEAD}$DATADIR 65 sublocaldata="$DATADIR/mindi" 68 66 fi 69 67 70 68 echo "Creating target directories ..." 71 install -m 755 -d $conf $local lib/mindi $MANDIR $local/sbin $CACHEDIR$conf/deplist.d69 install -m 755 -d $conf $localdata/mindi $MANDIR $local/sbin $localcache $conf/deplist.d 72 70 73 71 echo "Copying files ..." 74 cp -af rootfs $local lib/mindi75 chmod 755 $local lib/mindi/rootfs/sbin/*76 install -m 755 analyze-my-lvm $local lib/mindi77 install -m 644 msg-txt dev.tgz $local lib/mindi72 cp -af rootfs $localdata/mindi 73 chmod 755 $localdata/mindi/rootfs/sbin/* 74 install -m 755 analyze-my-lvm $localdata/mindi 75 install -m 644 msg-txt dev.tgz $localdata/mindi 78 76 install -m 644 deplist.conf deplist-minimal.conf udev.files proliant.files mindi.conf $conf 79 77 for f in deplist.d/*.conf; do … … 85 83 86 84 # Substitute variables for mindi 87 sed -e "s~^MINDI_PREFIX=XXX~MINDI_PREFIX=$sublocal~" -e "s~^MINDI_CONF=YYY~MINDI_CONF=$subconf~" -e "s~^MINDI_LIB=LLL~MINDI_LIB=$sublocallib~" mindi > $local/sbin/mindi 85 sed -e "s~^MINDI_PREFIX=XXX~MINDI_PREFIX=$sublocal~" -e "s~^MINDI_CONF=YYY~MINDI_CONF=$subconf~" -e "s~^MINDI_DATA=LLL~MINDI_DATA=$sublocaldata~" -e "s~^MINDI_CACHE=CCC~MINDI_CACHE=$MINDI_CACHE~" mindi > $local/sbin/mindi 86 sed -e "s~^MINDI_CONF=YYY~MINDI_CONF=$subconf~" -e "s~^export MINDI_CACHE=CCC~export MINDI_CACHE=$MINDI_CACHE~" rootfs/sbin/init > $localdata/mindi/rootfs/sbin/init 88 87 chmod 755 $local/sbin/mindi $local/sbin/mindi-bkphw 89 88 … … 94 93 if [ "$ARCH" = "ia64" ] ; then 95 94 (cd $local/sbin && ln -sf parted2fdisk.pl parted2fdisk) 96 install -s -m 755 $local/sbin/parted2fdisk.pl $local lib/mindi/rootfs/sbin/parted2fdisk95 install -s -m 755 $local/sbin/parted2fdisk.pl $localdata/mindi/rootfs/sbin/parted2fdisk 97 96 else 98 97 # FHS requires fdisk under /sbin 99 98 (cd $local/sbin && ln -sf /sbin/fdisk parted2fdisk) 100 99 echo "Symlinking fdisk to parted2fdisk" 101 ( cd $local lib/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk)100 ( cd $localdata/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk) 102 101 fi 103 102 104 103 if [ "$PKGBUILDMINDI" != "true" ]; then 105 chown -R root:root $local lib/mindi $conf # $DOCDIR106 chown root:root $local/sbin/mindi $MANDIR/mindi.8 $local lib/mindi/analyze-my-lvm $local/sbin/parted2fdisk.pl104 chown -R root:root $localdata/mindi $conf # $DOCDIR 105 chown root:root $local/sbin/mindi $MANDIR/mindi.8 $localdata/mindi/analyze-my-lvm $local/sbin/parted2fdisk.pl 107 106 if [ "$ARCH" = "ia64" ] ; then 108 107 chown root:root $local/sbin/parted2fdisk -
branches/2.2.10/mindi/mindi
r2460 r2462 29 29 MINDI_CONF=YYY 30 30 MINDI_SBIN=${MINDI_PREFIX}/sbin 31 MINDI_LIB=LLL 31 MINDI_DATA=LLL 32 MINDI_CACHE=CCC 32 33 33 34 # Temporary directory for mindi 34 35 TMPDIR=/tmp 35 36 36 EXTRA_SPACE= 60000 # increase if you run out of ramdisk space37 EXTRA_SPACE=50000 # increase if you run out of ramdisk space 37 38 BOOT_SIZE=24576 # size of the boot disk 38 39 … … 58 59 PCMCIA_MODS="pcmcia_core ds yenta_socket" 59 60 USB_MODS="usb-storage usb-ohci usb-uhci usbcore usb_storage input hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd ohci-hcd ohci_hcd usbkbd usbhid keybdev mousedev libusual scsi_mod ff-memless" 60 NET_MODS="auth_rpcgss sunrpc nfs nfs_acl lockd fscache loop mii 3c59x e100 bcm5700 bnx2 bnx2x e1000 e1000e igb eepro100 ne2k-pci tg3 libphy pcnet32 8139cp 8139too 8390 forcedeth vmxnet vmnet exportfs fuse libcrc32c "61 NET_MODS="auth_rpcgss sunrpc nfs nfs_acl lockd fscache loop mii 3c59x e100 bcm5700 bnx2 bnx2x e1000 e1000e igb eepro100 ne2k-pci tg3 libphy pcnet32 8139cp 8139too 8390 forcedeth vmxnet vmnet exportfs fuse libcrc32c crc32c" 61 62 CDROM_MODS="$TAPE_MODS $IDE_MODS $USB_MODS $PCMCIA_MODS $SCSI_MODS $NET_MODS af_packet cdrom isocd isofs inflate_fs nls_iso8859-1 nls_base nls_cp437 nls_utf8 sg sr_mod zlib_inflate iso9660" 62 63 # Those modules will only go on the backup media, not the boot media. … … 69 70 70 71 LOGFILE=/var/log/mindi.log 71 MINDI_CACHE=/var/cache/mindi72 72 BOOT_MEDIA_MESSAGE="\ 73 73 To format and restore all files automatically, type 'nuke' <enter>.\n\ … … 250 250 251 251 # Unmount what could remain mounted 252 my_partitions=`mount | grep -F $ $| cut -f1 -d' '`252 my_partitions=`mount | grep -F $MINDI_TMP | cut -f1 -d' '` 253 253 [ "$my_partitions" != "" ] && umount $my_partitions 254 254 # Clean temporary files only when standalone mindi … … 433 433 434 434 FindSpecificModuleInPath() { 435 local modpaths pwd line 436 pwd=`pwd` 437 if [ "$YOUR_KERNEL_SUCKS" ] ; then 438 cd $MINDI_TMP 439 else 440 cd / 441 fi 435 local modpaths line 436 442 437 if [ ! -e "$1" ] ; then 443 438 LogAll "WARNING - cannot search specific path '$1'" … … 445 440 fi 446 441 modpaths=`find $1 -name $2.*o -type f` 447 #[ "$?" -ne "0" ] && Die "find $1 -name $2.o -type f --- failed"448 442 [ "$modpaths" = "" ] && modpaths=`find $1 -name $2.o.gz -type f` 449 443 [ "$modpaths" = "" ] && modpaths=`find $1 -name $2.ko.gz -type f` 450 444 [ "$modpaths" = "" ] && modpaths=`find $1 -name $2 -type f` 451 445 echo "$modpaths" 452 cd $pwd453 446 } 454 447 … … 694 687 695 688 696 HackPathsToFailsafe() {697 local incoming newpath stub i pwd698 incoming=`ReadLine`699 pwd=`pwd`700 cd $MINDI_TMP701 while [ "$incoming" != "" ] ; do702 stub=`basename $incoming`703 newpath=`FindSpecificModuleInPath lib/modules/$FAILSAFE_KVER $stub`704 for i in $newpath ; do705 echo "$i"706 done707 read incoming708 done709 cd $pwd710 }711 712 713 689 ListAllPartitions() { 714 690 local res currline partition all_partitions ap_orig remaining i j … … 749 725 ### Sq-Modification ... Use kernelname for module search path if specified 750 726 ### 751 if [ "${kernelname}" != "" -a "${kernelname}" != "FAILSAFE"]727 if [ "${kernelname}" != "" ] 752 728 then 753 729 kern=${kernelname} … … 809 785 810 786 for file in $incoming ; do 787 if [ ! -f $file ]; then 788 continue 789 fi 811 790 echo "$file" 812 791 if [ ! -h $file ]; then … … 907 886 908 887 909 # Called by TurnTgzIntoRdz, to make /tmp/mondo-restore.cfg888 # Called by TurnTgzIntoRdz, to make mondorestore.cfg 910 889 MakeMondoConfigFile() { 911 890 local outfile use_lzo use_comp use_star … … 968 947 if [ $LVM != "false" ]; then 969 948 LogFile "Analyzing LVM..." 970 $MINDI_ LIB/analyze-my-lvm > $MINDI_TMP/lvm.res949 $MINDI_DATA/analyze-my-lvm > $MINDI_TMP/lvm.res 971 950 if [ $? -ne 0 ]; then 972 951 LVM="false" … … 980 959 done 981 960 [ "$IMAGE_DEVS" != "" ] && all_partitions="`echo "$all_partitions $IMAGE_DEVS" | tr ' ' '\n' | sort -u | tr '\n ' ' '`" 982 printf "%-15s %-15s %-15s %-15s % 15s\n" DEVICE MOUNTPOINT FORMAT "SIZE MB" LABEL/UUID | tee -a $LOGFILE983 printf "%-15s %-15s %-15s %-15s % 15s\n" ------ ---------- ------ ------- ---------- | tee -a $LOGFILE961 printf "%-15s %-15s %-15s %-15s %s\n" DEVICE MOUNTPOINT FORMAT "SIZE MB" LABEL/UUID | tee -a $LOGFILE 962 printf "%-15s %-15s %-15s %-15s %s\n" ------ ---------- ------ ------- ---------- | tee -a $LOGFILE 984 963 useless_dev="/dev/floppy /dev/fd0h1440 /dev/fd0H1440 /dev/cdrom /dev/cdrom/cdrom /dev/cdrom/cdrom1 /dev/cdrom/cdrom2 /dev/cdrom0 /dev/cdrom1 /dev/cdrom2 /dev/cdrom3 /dev/cdrw /dev/scd /dev/ram :/ /dev/sr0 /dev/sr1 /dev/cdrom1" 985 964 for c_p in $all_partitions ; do … … 1343 1322 mkdir -p $MINDI_TMP/iso/{images,archives} 1344 1323 cp -f $MINDI_CACHE/{*.gz,*.img} $MINDI_TMP/iso/images 2>> $LOGFILE || LogAll "OfferToMakeBootableISO: Cannot copy $MINDI_CACHE/*.gz to $MINDI_TMP/iso/images" 1345 LogFile "mindi_lib = $MINDI_ LIB"1324 LogFile "mindi_lib = $MINDI_DATA" 1346 1325 for i in memdisk memtest.bin memtest.img ; do 1347 j=$MINDI_ LIB/$i1326 j=$MINDI_DATA/$i 1348 1327 k=$MINDI_TMP/iso 1349 1328 if [ -e "$j" ] ; then … … 1424 1403 fi 1425 1404 echo -en "." 1426 LogFile "Unmounting $USB DEVICE just in case"1405 LogFile "Unmounting $USBPART just in case" 1427 1406 umount $USBPART 2>> $LOGFILE 1>> $LOGFILE 1428 1407 # If your key has no MBR it may cause an issue … … 1454 1433 $FDISK -l $USBDEVICE 2>&1 | tee -a $LOGFILE 1455 1434 echo -en "." 1435 # Some distro do auto mount at that point (Ubuntu) 1436 LogFile "Unmounting $USBPART just in case again" 1437 umount $USBPART 2>> $LOGFILE 1>> $LOGFILE 1438 echo -en "." 1456 1439 LogFile "Creating a vfat filesystem on $USBPART" 1457 1440 mkdosfs -F 32 $USBPART 2>&1 >> $LOGFILE … … 1475 1458 cp -f $MINDI_CACHE/*.img $MINDI_CACHE/*.gz $MINDI_TMP/usb/images 2>> $LOGFILE || LogAll "OfferToMakeBootableUSB: Cannot copy $i to $MINDI_TMP/usb/images" 1476 1459 echo -en "." 1477 LogFile "mindi_lib = $MINDI_ LIB"1460 LogFile "mindi_lib = $MINDI_DATA" 1478 1461 for i in memdisk memtest.bin memtest.img ; do 1479 j=$MINDI_ LIB/$i1462 j=$MINDI_DATA/$i 1480 1463 k=$MINDI_TMP/usb 1481 1464 if [ -e "$j" ] ; then … … 1528 1511 DESC=`head -1 $iss` 1529 1512 fi 1530 sed "s/ZZZZZ/$MINDI_VERSION/" $MINDI_ LIB/msg-txt | sed "s/KKKKK/Kernel $KERVER/" | sed "s/AAAAA/on a $ARCH architecture/" | sed "s/TTTTT/`LC_TIME=C date`/" | sed "s/MMMMM/`hostname`/" | sed "s/DDDDD/$DESC/"1513 sed "s/ZZZZZ/$MINDI_VERSION/" $MINDI_DATA/msg-txt | sed "s/KKKKK/Kernel $KERVER/" | sed "s/AAAAA/on a $ARCH architecture/" | sed "s/TTTTT/`LC_TIME=C date`/" | sed "s/MMMMM/`hostname`/" | sed "s/DDDDD/$DESC/" 1531 1514 if [ _"$MONDO_SHARE" != _"" ]; then 1532 1515 if [ "$CDRECOVERY" != "yes" ] ; then … … 1535 1518 elif [ ! "$MINDI_TMP" ] ; then 1536 1519 echo -en "FYI, this is _not_ a Mondo Rescue CD.\n" 1537 if [ -e "$MINDI_ LIB/memtest.img" ] ; then1520 if [ -e "$MINDI_DATA/memtest.img" ] ; then 1538 1521 echo -en "Type 'memtest' <Enter> to test your PC's memory intensively.\nJust press <Enter> to go to the main test menu.\n" 1539 1522 fi … … 1618 1601 done 1619 1602 1620 if [ -e "$MINDI_ LIB/memtest.img" ] ; then1603 if [ -e "$MINDI_DATA/memtest.img" ] ; then 1621 1604 if [ "$type" = "elilo" ]; then 1622 1605 echo -en "image=/memtest.bin\n\tlabel=memtest\n" … … 1642 1625 [ ! -e "$kernelpath" ] && Die "PBDI - cannot find $kernelpath kernel" 1643 1626 echo -en "Making "$BOOT_SIZE"KB boot disk..." 1644 TurnTgzIntoRdz $MINDI_ LIB/rootfs $MINDI_TMP/initrd.img `du -sk $kernelpath | cut -f1` || Die "Could not turn rootfs into initrd.img; are you SURE your kernel supports loopfs?"1627 TurnTgzIntoRdz $MINDI_DATA/rootfs $MINDI_TMP/initrd.img `du -sk $kernelpath | cut -f1` || Die "Could not turn rootfs into initrd.img; are you SURE your kernel supports loopfs?" 1645 1628 echo -en "..." 1646 1629 imagefile=$imagesdir/mindi-bootroot.$BOOT_SIZE.img … … 1685 1668 fi 1686 1669 MakeMessageFile > $mountpoint/message.txt 1687 1688 mkdir -p $mountpoint/tmp1689 if [ -f "$MINDI_TMP/mondo-restore.cfg" ]; then1690 cp -f $MINDI_TMP/mondo-restore.cfg $mountpoint/tmp1691 fi1692 1670 1693 1671 # copy the kernel across … … 1714 1692 # make it bootable 1715 1693 [ "$mountpoint" != "" ] && rm -f $mountpoint/zero 1716 [ -e "$MINDI_ LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 2>> $LOGFILE1694 [ -e "$MINDI_DATA/memdisk" ] && cp -f $MINDI_DATA/memdisk $mountpoint 2>> $LOGFILE 1717 1695 if [ "$KERN_DISK_MADE" ] ; then 1718 1696 LogFile "Not running LILO. It's not that kind of disk." … … 1748 1726 [ ! -e "$kernelpath" ] && Die "PBDI - cannot find $kernelpath kernel" 1749 1727 echo -en "Making "$BOOT_SIZE"KB boot disk..." 1750 TurnTgzIntoRdz $MINDI_ LIB/rootfs $MINDI_TMP/initrd.img `du -sk $kernelpath | cut -f1` || Die "Could not turn rootfs into initrd.img; are you SURE your kernel supports loopfs?"1728 TurnTgzIntoRdz $MINDI_DATA/rootfs $MINDI_TMP/initrd.img `du -sk $kernelpath | cut -f1` || Die "Could not turn rootfs into initrd.img; are you SURE your kernel supports loopfs?" 1751 1729 echo -en "..." 1752 1730 imagefile=$MINDI_TMP/mindi-bootroot.$BOOT_SIZE.img … … 1777 1755 LogAll "Cannot incorporate initrd.img in bootdisk (kernel / modules too big?)" 1778 1756 retval=$(($retval+1)) 1779 fi1780 1781 mkdir -p $mountpoint/tmp1782 if [ -f "$MINDI_TMP/mondo-restore.cfg" ]; then1783 cp -f $MINDI_TMP/mondo-restore.cfg $mountpoint/tmp1784 1757 fi 1785 1758 … … 1810 1783 [ "$mountpoint" != "" ] && rm -f $mountpoint/zero 1811 1784 mkdir -p $mountpoint/etc 1812 [ -e "$MINDI_ LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 2>> $LOGFILE1785 [ -e "$MINDI_DATA/memdisk" ] && cp -f $MINDI_DATA/memdisk $mountpoint 2>> $LOGFILE 1813 1786 umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)" 1814 1787 echo -en "..." … … 1872 1845 res=$? 1873 1846 rm -f $includefile 1874 if [ "$YOUR_KERNEL_SUCKS" ]; then 1875 pwd=`pwd` 1876 cd $MINDI_TMP 1877 rm -f lkm.lis 1878 ListKernelModulePaths lkm.lis 1879 for i in `cat lkm.lis | HackPathsToFailsafe` ; do 1880 tar cf - ./$i 2>> $MINDI_TMP/$$.log | (cd $bigdir ; tar xf -) || Die "PDDI can't copy $i->$bigdir" $MINDI_TMP/$$.log 1881 done 1882 rm -f lkm.lis 1883 for i in $EXTRA_MODS ; do 1884 j=`find lib/modules/$FAILSAFE_KVER -name $i.*o.gz 2> /dev/null` 1885 [ ! "$j" ] && LogFile "WARNING - cannot find failsafe module $i.o.gz" 1886 for k in $j ; do 1887 tar cf - $k 2>> $MINDI_TMP/$$.log | (cd $bigdir ; tar xf -) || LogAll "ERROR on module $k" $MINDI_TMP/$$.log 1888 LogFile "Added failsafe module $k to ramdisk" 1889 done 1890 done 1891 cd $pwd 1892 else 1893 # This function appends to the file passed in param 1894 ListKernelModulePaths $needlist 1895 fi 1847 # This function appends to the file passed in param 1848 ListKernelModulePaths $needlist 1896 1849 if [ "$res" -ne "0" ] ; then 1897 1850 Die "You have $res files present in dependency list\nbut absent from filesystem." … … 1899 1852 FindAndAddUserKeyboardMappingFile 1900 1853 mkdir -p $bigdir/tmp 1901 if [ _"$MONDO_SHARE" != _"" ]; then1902 MakeMondoConfigFile $MINDI_TMP/mondo-restore.cfg1903 cp -f $MINDI_TMP/mondo-restore.cfg $bigdir/tmp &> /dev/null1904 fi1905 1854 [ -d "/mnt/.boot.d" ] && echo "Oh Jebus" > $bigdir/tmp/DUMBASS-GENTOO 1906 1855 DropOptimizedLibraries $needlist $bigdir … … 1949 1898 echo -e "$DONE" 1950 1899 TOTAL_BIGDIR_SIZE=`du -sk $bigdir | cut -f1` 1951 MakeMountlist $MINDI_TMP/mountlist.txt1952 CheckMountlist $MINDI_TMP/mountlist.txt1953 1900 mkdir -p $bigdir/tmp 1954 cp -f $MINDI_TMP/mountlist.txt $bigdir/tmp/mountlist.txt 2>> $LOGFILE || Die "Cannot copy mountlist.txt from $MINDI_TMP to data disk"1955 if [ _"$MONDO_SHARE" != _"" ]; then1956 cp -f $bigdir/tmp/mountlist.txt $MINDI_TMP/. 2>> $LOGFILE1957 fi1958 1901 if [ $LVM != "false" ]; then 1959 $MINDI_ LIB/analyze-my-lvm > $bigdir/tmp/i-want-my-lvm1902 $MINDI_DATA/analyze-my-lvm > $bigdir/tmp/i-want-my-lvm 1960 1903 if [ "$?" -ne "0" ]; then 1961 1904 LVM="false" … … 1963 1906 fi 1964 1907 fi 1965 cat $bigdir/tmp/mountlist.txt >> $LOGFILE1966 LogFile "-----------------------------------"1967 1908 1968 1909 LogFile -en "$FILES_IN_FILELIST" > $bigdir/FILES-IN-FILELIST 1969 echo -en "$LAST_FILELIST_NUMBER" > $bigdir/LAST-FILELIST-NUMBER 2>> $LOGFILE1970 1910 if [ _"$MONDO_SHARE" != _"" ]; then 1971 1911 for q in filelist.full.gz biggielist.txt ; do … … 1978 1918 size_of_all_tools=`du -sk $bigdir | cut -f1` 1979 1919 (cd $bigdir ; tar -b 4096 -cf - . 2>> $MINDI_TMP/$$.log | gzip -9 > $imagesdir/all.tar.gz || LogAll "Problem creating all.tar.gz" $MINDI_TMP/$$.log) 1920 LogFile "Size of the data content" 1921 LogFile "------------------------" 1980 1922 du -sk $imagesdir/*gz >> $LOGFILE 1923 LogFile "------------------------" 1981 1924 echo -e "$DONE" 1982 1925 … … 2211 2154 2212 2155 TurnTgzIntoRdz() { 2213 local tgz_dir_fname rdz_fname tempfile mountpoint old_pwd nodes kernelsize maxsizeres currsize not_copied j k s w needed_modules_path2156 local tgz_dir_fname rdz_fname tempfile mountpoint old_pwd nodes kernelsize res currsize not_copied j k s w needed_modules_path 2214 2157 2215 2158 tgz_dir_fname=$1 2216 2159 rdz_fname=$2 2217 2160 kernelsize=$3 2218 maxsize=$(($BOOT_SIZE-$kernelsize)) 2219 maxsize=$(($maxsize*2)); # to allow for compression of 50% 2161 # Compute the list of all that should be copied/created on the final mountpoint under MINDI_TMP 2162 # mkdir.lis will contain the list of directries to create 2163 # cp.lis will contain the list of files/dirs to copy 2164 # ln.lis will contain the list of files to link to existing files 2165 # rm.lis will contain the list of files to remove after the copies 2166 # AL04Oct08: Check whether /lib64 is a link and if so explicitly create one in rootfs 2167 if [ -h "/lib64" ]; then 2168 echo lib >> $MINDI_TMP/mkdir.lis 2169 echo ln -s lib lib64 >> $MINDI_TMP/ln.lis 2170 fi 2171 2172 [ -e "/dev/.devfsd" ] && echo "/dev/.devfsd found" > $MINDI_CACHE/USE-DEVFS 2173 echo $MINDI_CACHE/USE-DEVFS >> $MIDI_TMP/cp.lis 2174 2175 # We need a minimal conf in the initial ramdisk 2176 mountlis=`grep -v "^#.*" $DEPLIST_FILE_MIN $DEPLIST_DIR/minimal*.conf | cut -d: -f2 | sort -u` 2177 ReadAllLink $mountlis >> $MINDI_TMP/mnt.lis 2178 LocateDeps `cat $MINDI_TMP/mnt.lis` >> $MINDI_TMP/deps.lis 2179 # Special for libs 2180 ReadAllLink `grep -E "/lib" $DEPLIST_FILE_MIN $DEPLIST_DIR/minimal*.conf | grep -v "^#.*" | cut -d: -f2` >> $MINDI_TMP/deps.lis 2181 2182 echo `cat $MINDI_TMP/mnt.lis` `sort -u $MINDI_TMP/deps.lis` >> $MINDI_TMP/cp.lis 2183 rm -f $MINDI_TMP/deps.lis $MINDI_TMP/mnt.lis 2184 2185 # Copy of files mandatory for ld.so 2186 echo /etc/ld.so.c* >> $MINDI_TMP/cp.lis 2187 2188 # Avoid an issue on some distro (RHEL5) 2189 echo ./etc/ld.so.conf.d/kernelcap* >> $MINDI_TMP/rm.lis 2190 2191 # Need for a tmp dir 2192 echo tmp >> $MINDI_TMP/mkdir.lis 2193 2194 # Management of udev (which includes modprobe in rules) 2195 ps auxww | grep -v grep | grep -qw udevd 2196 if [ $? -eq 0 ]; then 2197 echo "udev device manager found" > $MINDI_CACHE/USE-UDEV 2198 echo $MINDI_CACHE/USE-UDEV >> $MINDI_TMP/cp.lis 2199 LogFile "udev device manager found" 2200 echo /etc/udev /lib*/udev >> $MINDI_TMP/cp.lis 2201 # This avoids NIC remapping if on another machine at restore time on Debian at least 2202 echo ./etc/udev/rules.d/z[0-9][0-9]_persistent-net.rules >> $MINDI_TMP/rm.lis 2203 # This avoids NIC remapping if on another machine at restore time on Ubuntu at least 2204 echo ./etc/udev/rules.d/[0-9][0-9]-persistent-net.rules >> $MINDI_TMP/rm.lis 2205 if [ -x /sbin/udevd ]; then 2206 # Get only the files which exist in the udev.files list 2207 # and potentially their symlink structure and their deps 2208 mountlis=`grep -Ev "^#" $MINDI_CONF/udev.files` 2209 ReadAllLink $mountlis | sort -u >> $MINDI_TMP/udev.lis 2210 LocateDeps `cat $MINDI_TMP/udev.lis` | sort -u >> $MINDI_TMP/cp.lis 2211 cat $MINDI_TMP/udev.lis >> $MINDI_TMP/cp.lis 2212 rm -f $MINDI_TMP/udev.lis 2213 else 2214 LogAll "udevd daemon not in standard place (/sbin)" 2215 LogAll "mindi will use static devices which may cause problems" 2216 rm -f $MINDI_CACHE/USE-UDEV 2217 fi 2218 fi 2219 2220 # Management of potential HW info (Proliant only at the moment) 2221 rm -rf $MINDI_CACHE/bkphw 2222 mindi-bkphw $MINDI_CACHE $MINDI_CONF | tee -a $LOGFILE 2223 if [ -d $MINDI_CACHE/bkphw ]; then 2224 LogAll "Hardware Information found and saved ..." 2225 echo $MINDI_CACHE/bkphw >> $MIDNDI_TMP/cp.lis 2226 if [ -f $MINDI_CACHE/tools.files ]; then 2227 lis=`grep -Ev '^#' $MINDI_CACHE/tools.files` 2228 LocateDeps $lis > $MINDI_TMP/tools.lis 2229 echo $lis `sort -u $MINDI_TMP/tools.lis` >> $MINDI_TMP/cp.lis 2230 fi 2231 if [ -f $MINDI_CACHE/mindi-rsthw ]; then 2232 chmod 755 $MINDI_CACHE/mindi-rsthw 2233 echo $MINDI_CACHE/mindi-rsthw >> $MINDI_TMP/cp.lis 2234 fi 2235 rm -f $MINDI_TMP/tools.lis $MINDI_CACHE/tools.files 2236 fi 2237 2238 # Management of perl scripts delivered needed at restore time 2239 mindi-get-perl-modules `cat $MINDI_CONF/perl-scripts` >> $MINDI_TMP/cp.lis 2240 2241 for w in cdrom groovy-stuff ; do 2242 echo mnt/$w >> $MINDI_TMP/mkdir.lis 2243 done 2244 2245 ls /dev/fd0*[1,2][4,7,8]* >> $MINDI_TMP/cp.lis 2> /dev/null 2246 2247 if [ "${kernelname}" != "" ] 2248 then 2249 needed_modules_path=/lib/modules/${kernelname} 2250 else 2251 needed_modules_path=/lib/modules/$KERVERRUN 2252 fi 2253 2254 needed_modules="" 2255 list_of_groovy_mods="$CDROM_MODS $FORCE_MODS" 2256 2257 if [ -e "$MINDI_TMP/NETFS-DEV" ] ; then 2258 # For PXE boot 2259 list_of_groovy_mods="$list_of_groovy_mods $NET_MODS" 2260 fi 2261 if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ "$USBDEVICE" != "" ]; then 2262 list_of_groovy_mods="$list_of_groovy_mods $EXTRA_MODS" 2263 fi 2264 for i in $DENY_MODS; do 2265 LogFile "Removing $i from the list of modules to load" 2266 list_of_groovy_mods=`echo ${list_of_groovy_mods} | tr ' ' '\n' | grep -Ev "^${i}$" | tr '\n' ' '` 2267 done 2268 2269 [ -e "$needed_modules_path" ] || LogAll "path $needed_modules_path does not exist.\n If you're not using a modular kernel then you're NUTS." 2270 for i in $list_of_groovy_mods ; do 2271 needed_modules="$needed_modules `FindSpecificModuleInPath $needed_modules_path $i`" 2272 done 2273 2274 for i in $needed_modules ; do 2275 [ -e "$i" ] && s=`du -sk $i | cut -f1` || s="" 2276 LogFile "Adding $i ($s KB) to the rootfs" 2277 echo $i >> $MINDI_TMP/cp.lis 2278 done 2279 2280 # Also copy modules.dep in case of udev so that normal modprobe works 2281 echo $needed_modules_path/modules.dep >> $MINDI_TMP/cp.lis 2282 2283 # Manages mountlit.txt 2284 MakeMountlist $MINDI_CACHE/mountlist.txt 2285 CheckMountlist $MINDI_CACHE/mountlist.txt 2286 echo $MINDI_CACHE/mountlist.txt >> $MINDI_TMP/cp.lis 2287 cat $MINDI_CACHE/mountlist.txt >> $LOGFILE 2288 LogFile "-----------------------------------" 2289 2290 if [ ! -e "/sbin/devfsd" ] ; then 2291 LogFile "Deleting devfsd daemon from ramdisk because /sbin/devfsd not found" 2292 echo ./sbin/devfsd >> $MINDI_TMP/rm.lis 2293 fi 2294 2295 cd $old_pwd 2296 if [ _"$MONDO_SHARE" != _"" ]; then 2297 MakeMondoConfigFile $MINDI_CACHE/mondorestore.cfg 2298 echo $MINDI_CACHE/mondorestore.cfg >> $MINDI_TMP/cp.lis 2299 fi 2300 echo proc >> $MINDI_TMP/mkdir.lis 2301 2302 # Copy of files mandatory for ssh to automate mount if sshfs is used 2303 echo .ssh >> $MINDI_TMP/mkdir.lis 2304 2305 # Now create the container and do the job 2220 2306 tempfile=$MINDI_TMP/temp.rd 2221 2307 mountpoint=$MINDI_TMP/mnt1 … … 2225 2311 echo -en "..." 2226 2312 LogFile "Creating ext2 filesystem on $tempfile" 2227 mke2fs -b 1024 -m 1-i 2048 -F $tempfile >> $LOGFILE 2>> $LOGFILE || Die "Unable to create an ext2 file system on $tempfile"2313 mke2fs -b 1024 -m 0 -i 2048 -F $tempfile >> $LOGFILE 2>> $LOGFILE || Die "Unable to create an ext2 file system on $tempfile" 2228 2314 echo -en "..." 2229 2315 mkdir -p $mountpoint … … 2231 2317 echo -en "..." 2232 2318 old_pwd=`pwd` 2233 cd $mountpoint 2234 2235 # AL04Oct08: Check whether /lib64 is a link and if so explicitly create one in rootfs 2236 if [ -h "/lib64" ]; then 2237 mkdir -p lib || LogAll "Unable to create lib in $mountpoint." 2238 ln -s lib lib64 || LogAll "/lib64 is a symbolic link, but I couldn't create it in $mountpoint." 2239 fi 2240 2241 cp -Rdf $tgz_dir_fname/* . 2>&1 >> $LOGFILE 2242 2243 cd dev || Die "Can't cd to dev" 2244 tar -zxf dev-entries.tgz || Die "Cannot untar dev-entries.tgz" 2245 rm -f dev-entries.tgz 2246 cd .. 2247 2248 for w in insmod.static insmod.static.old ; do 2249 s=`which $w 2> /dev/null` 2250 if [ -e "$s" ] ; then 2251 tar cf - -C / $s 2> /dev/null | tar xf - 2252 fi 2253 done 2254 2255 [ -e "/dev/.devfsd" ] && echo "/dev/.devfsd found" > tmp/USE-DEVFS 2256 2257 # We need a minimal conf in the initial ramdisk 2258 mountlis=`grep -v "^#.*" $DEPLIST_FILE_MIN $DEPLIST_DIR/minimal*.conf | cut -d: -f2 | sort -u` 2259 ReadAllLink $mountlis > $MINDI_TMP/mnt.lis 2260 LocateDeps `cat $MINDI_TMP/mnt.lis` >> $MINDI_TMP/deps.lis 2261 # Special for libs 2262 ReadAllLink `grep -E "/lib" $DEPLIST_FILE_MIN $DEPLIST_DIR/minimal*.conf | grep -v "^#.*" | cut -d: -f2` >> $MINDI_TMP/deps.lis 2263 2264 # Initial / are trucated by tar 2265 tar cf - `cat $MINDI_TMP/mnt.lis` `sort -u $MINDI_TMP/deps.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Problem in mount analysis" $MINDI_TMP/$$.log 2266 rm -f $MINDI_TMP/deps.lis 2319 2320 # First create dirs 2321 for d in `cat $MINDI_TMP/mkdir.lis`; do 2322 mkdir -p $mountpoint/$d 2>&1 >> $LOGFILE 2323 done 2324 2325 # Then copy files needed 2326 LANGUAGE=C tar cf - `cat $MINDI_TMP/cp.lis` | (cd $mountpoint ; tar xf - ) 2>&1 | grep -Ev "tar: Removing.*/\'" >> $LOGFILE 2327 2328 # Then handle links 2329 if [ -f $MINDI_TMP/ln.lis ]; then 2330 (cd $mountpoint ; bash $MINDI_TMP/ln.lis) 2>&1 >> $LOGFILE 2331 fi 2332 2333 # Finally remove useless stff 2334 (cd $mountpoint ; rm -f `cat $MINDI_TMP/rm.lis`) 2>&1 >> $LOGFILE 2267 2335 2268 2336 # Copy of files mandatory for ssh to automate mount if sshfs is used 2269 mkdir $mountpoint/.ssh2270 2337 cp -rp ~root/.ssh/*.pub ~root/.ssh/config ~root/.ssh/known* $mountpoint/.ssh 2> /dev/null 2271 2338 cat > $mountpoint/bin/myssh << EOF … … 2274 2341 chmod 755 $mountpoint/bin/myssh 2275 2342 2276 # Copy of files mandatory for ld.so 2277 cp -rp /etc/ld.so.c* $mountpoint/etc 2278 2279 # Avoid an issue on some distro (RHEL5) 2280 rm -f $mountpoint/etc/ld.so.conf.d/kernelcap* 2281 2282 mkdir -p $mountpoint/tmp 2283 # Management of udev (which includes modprobe in rules) 2284 ps auxww | grep -v grep | grep -qw udevd 2285 if [ $? -eq 0 ]; then 2286 echo "udev device manager found" > $mountpoint/tmp/USE-UDEV 2287 LogFile "udev device manager found" 2288 tar cf - -C / /etc/udev 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Problem in /etc/udev analysis" $MINDI_TMP/$$.log 2289 # This avoids NIC remapping if on another machine at restore time on Debian at least 2290 rm -f ./etc/udev/rules.d/z[0-9][0-9]_persistent-net.rules 2291 # This avoids NIC remapping if on another machine at restore time on Ubuntu at least 2292 rm -f ./etc/udev/rules.d/[0-9][0-9]-persistent-net.rules 2293 tar cf - -C / /lib*/udev 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Problem in /lib/udev analysis" $MINDI_TMP/$$.log 2294 if [ -x /sbin/udevd ]; then 2295 lis2=`grep -Ev '^#' $MINDI_CONF/udev.files` 2296 lis="" 2297 # Get only the files which exist in that list 2298 # and potentially their symlink structure 2299 for i in $lis2; do 2300 if [ -h $i ]; then 2301 j=$i 2302 while [ -h $j ]; do 2303 lis="$lis $j" 2304 j=`readlink -f $j` 2305 done 2306 lis="$lis $j" 2307 elif [ -f $i ]; then 2308 lis="$lis $i" 2309 fi 2310 done 2311 # And their deps 2312 LocateDeps $lis > $MINDI_TMP/udev.lis 2313 for i in $lis; do 2314 if [ "`echo $i | cut -c1`" = "/" ]; then 2315 j=`echo $i | cut -c2-` 2316 [ "$j" != "" ] && rm -f $j 2317 fi 2318 done 2319 tar cf - -C / $lis `sort -u $MINDI_TMP/udev.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Problem in udev.lis analysis" $MINDI_TMP/$$.log 2320 rm -f $MINDI_TMP/udev.lis 2321 else 2322 LogAll "udevd daemon not in standard place (/sbin)" 2323 LogAll "mindi will use static devices which may cause problems" 2324 rm -f $mountpoint/tmp/USE-UDEV 2325 fi 2326 fi 2327 2328 # Management of potential HW info (Proliant only at the moment) 2329 rm -rf $MINDI_CACHE/bkphw 2330 mindi-bkphw $MINDI_CACHE $MINDI_CONF | tee -a $LOGFILE 2331 if [ -d $MINDI_CACHE/bkphw ]; then 2332 LogAll "Hardware Information found and saved ..." 2333 cp -rp $MINDI_CACHE/bkphw . 2334 if [ -f $MINDI_CACHE/tools.files ]; then 2335 lis=`grep -Ev '^#' $MINDI_CACHE/tools.files` 2336 LocateDeps $lis > $MINDI_TMP/tools.lis 2337 tar cf - $lis `sort -u $MINDI_TMP/tools.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Problem in tools.lis analysis" $MINDI_TMP/$$.log 2338 fi 2339 if [ -f $MINDI_CACHE/mindi-rsthw ]; then 2340 mv -f $MINDI_CACHE/mindi-rsthw . 2341 chmod 755 ./mindi-rsthw 2342 fi 2343 rm -f $MINDI_TMP/tools.lis $MINDI_CACHE/tools.files 2344 fi 2345 2346 # Management of perl scripts delivered needed at restore time 2347 mindi-get-perl-modules `cat $MINDI_CONF/perl-scripts` > $MINDI_TMP/perl.lis 2348 tar cf - `cat $MINDI_TMP/perl.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Problem in perl scripts analysis" $MINDI_TMP/$$.log 2349 2350 for w in cdrom groovy-stuff ; do 2351 mkdir -p mnt/$w 2352 done 2353 2354 tar cf - -C / /dev/fd0*[1,2][4,7,8]* 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Problem in fd dev analysis" $MINDI_TMP/$$.log 2355 2356 cd $old_pwd 2357 echo -en "..." 2358 old_pwd=`pwd` 2359 if [ "$YOUR_KERNEL_SUCKS" ] ; then 2360 cd $MINDI_TMP 2361 needed_modules_path=lib/modules/$FAILSAFE_KVER 2362 else 2363 cd / 2364 if [ "${kernelname}" != "" ] 2365 then 2366 needed_modules_path=lib/modules/${kernelname} 2367 else 2368 needed_modules_path=lib/modules/$KERVERRUN 2369 fi 2370 fi 2371 2372 needed_modules="" 2373 list_of_groovy_mods="$CDROM_MODS $FORCE_MODS" 2374 2375 if [ -e "$MINDI_TMP/NETFS-DEV" ] ; then 2376 # For PXE boot 2377 list_of_groovy_mods="$list_of_groovy_mods $NET_MODS" 2378 fi 2379 if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ "$USBDEVICE" != "" ]; then 2380 list_of_groovy_mods="$list_of_groovy_mods $EXTRA_MODS" 2381 fi 2382 for i in $DENY_MODS; do 2383 LogFile "Removing $i from the list of modules to load" 2384 list_of_groovy_mods=`echo ${list_of_groovy_mods} | tr ' ' '\n' | grep -Ev "^${i}$" | tr '\n' ' '` 2385 done 2386 2387 [ -e "$needed_modules_path" ] || LogAll "path $needed_modules_path does not exist.\n If you're not using a modular kernel then you're NUTS." 2388 for i in $list_of_groovy_mods ; do 2389 needed_modules="$needed_modules `FindSpecificModuleInPath $needed_modules_path $i`" 2390 done 2391 2392 for i in $needed_modules ; do 2393 [ -e "$i" ] && s=`du -sk $i | cut -f1` || s="" 2394 [ "$YOUR_KERNEL_SUCKS" ] && i=$MINDI_TMP/$i 2395 LogFile "Adding $i ($s KB) to the rootfs" 2396 tar cf - -C / $i 2>> $MINDI_TMP/$$.log | (cd $mountpoint ; tar xf -) || LogAll "Unable to copy $i to $mountpoint" $MINDI_TMP/$$.log 2397 # Uncompress modules if not using udev and native modprobe 2398 if [ ! -f $mountpoint/tmp/USE-UDEV ]; then 2399 if [ "`echo "$i" | grep -F ".gz"`" ]; then 2400 LogFile "Uncompressing $i" 2401 gunzip -f $mountpoint/$i 2402 fi 2403 fi 2404 done 2405 2406 # Also copy modules.dep in case of udev so that normal modprobe works 2407 tar cf - -C / /$needed_modules_path/modules.dep 2>> $MINDI_TMP/$$.log | (cd $mountpoint ; tar xf -) || LogAll "Unable to copy modules.dep to $mountpoint" $MINDI_TMP/$$.log 2408 2409 if [ ! -e "/sbin/devfsd" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then 2410 LogFile "Deleting devfsd daemon from ramdisk" 2411 [ ! -e "/sbin/devfsd" ] && LogFile "...because /sbin/devfsd not found" 2412 [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] && LogFile "...because kernel is failsafe" 2413 rm -f $mountpoint/sbin/devfsd 2414 fi 2415 cd $old_pwd 2416 dd if=/dev/zero of=$mountpoint/zero &> /dev/null 2417 rm -f $mountpoint/zero 2418 if [ _"$MONDO_SHARE" != _"" ]; then 2419 MakeMondoConfigFile $mountpoint/tmp/mondo-restore.cfg 2420 cp -f $mountpoint/tmp/mondo-restore.cfg $MINDI_TMP 2>> $LOGFILE || Die "Cannot copy mondo-restore.cfg to ramdisk" 2421 cp -f $MINDI_TMP/mountlist.txt $mountpoint/tmp/ 2>> $LOGFILE || Die "Cannot copy mountlist to ramdisk" 2422 echo -en "$LAST_FILELIST_NUMBER" > $mountpoint/tmp/LAST-FILELIST-NUMBER 2423 fi 2424 mkdir -p $mountpoint/proc 2425 echo "$BOOT_SIZE" > $mountpoint/tmp/$BOOT_SIZE.siz 2343 # Finally integrate what we provide statically as part of mindi 2344 (cd $tgz_dir_fname ; LANGUAGE=C tar cf - . ) | (cd $mountpoint ; tar xf - ) 2>&1 | grep -Ev "tar: Removing.*/\'" >> $LOGFILE 2345 2346 # Extracting devices 2347 bash 2348 (cd $mountpoint/dev ; tar -zxf dev-entries.tgz) || Die "Cannot untar dev-entries.tgz" 2349 rm -f $mountpoint/dev/dev-entries.tgz 2426 2350 2427 2351 LogFile "---------------------------" … … 2510 2434 [ "$MINDI_PREFIX" = "XXX" ] && Die "Mindi has not been installed correctly." 2511 2435 LogFile "MONDO_SHARE = $MONDO_SHARE" 2512 LogFile "MINDI_ LIB = $MINDI_LIB"2436 LogFile "MINDI_DATA = $MINDI_DATA" 2513 2437 LogFile "MINDI_SBIN = $MINDI_SBIN" 2514 2438 [ "$MINDI_CONF" = "YYY" ] && Die "Mindi has not been installed correctly." … … 2547 2471 LogFile "However, you may wish to ask your vendor to provide a permanent fix..." 2548 2472 LogFile " Or you might like to call 'su -' instead of 'su', for example." 2549 fi2550 2551 # If we have a distribution-specific script for finding a FAILSAFE kernel, use it.2552 if [ -f "$MINDI_LIB/FindDistroFailsafe" ] && [ ! "$1" = "--makemountlist" ] && [ "$kernelpath" = "FAILSAFE" ]; then2553 source $MINDI_LIB/FindDistroFailsafe2554 # Log kernel image2555 LogAll "FAILSAFE kernel image to be used is: $FAILSAFE_KBIN ($FAILSAFE_KVER)"2556 else2557 [ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | grep -E "2\.[46]" | cut -d' ' -f1`2558 2473 fi 2559 2474 … … 2759 2674 LogAll "kernelname = $kernelname" 2760 2675 LogAll "kernelpath = $kernelpath" 2761 if [ ! -d "/lib/modules/$kernelname" ] && [ "$kernelpath" != "FAILSAFE" ]2676 if [ ! -d "/lib/modules/$kernelname" ] 2762 2677 then 2763 2678 LogAll "Module path for ${kernelpath} not found..." … … 2784 2699 # LogAll "LILO will use conservative settings, to be compatible with older BIOSes." 2785 2700 fi 2786 LAST_FILELIST_NUMBER=${12} 2787 ESTIMATED_TOTAL_NOOF_SLICES=${13} 2788 export EXCLUDE_DEVS="${14}" 2789 USE_COMP="${15}" 2790 USE_LILO="${16}" 2791 USE_STAR="${17}" 2792 INTERNAL_TAPE_BLOCK_SIZE="${18}" 2793 DIFFERENTIAL="${19}" 2794 USE_GZIP="${20}" 2795 USE_LZMA="${21}" 2796 NOT_BOOT="${22}" 2701 ESTIMATED_TOTAL_NOOF_SLICES=${12} 2702 export EXCLUDE_DEVS="${13}" 2703 USE_COMP="${14}" 2704 USE_LILO="${15}" 2705 USE_STAR="${16}" 2706 INTERNAL_TAPE_BLOCK_SIZE="${17}" 2707 DIFFERENTIAL="${18}" 2708 USE_GZIP="${19}" 2709 USE_LZMA="${20}" 2797 2710 [ "$USE_COMP" = "" ] && USE_COMP=yes 2798 2711 [ "$USE_GZIP" = "" ] && USE_GZIP=no 2799 2712 [ "$USE_LZMA" = "" ] && USE_LZMA=no 2800 [ "$NOT_BOOT" = "" ] && NOT_BOOT=no2801 2713 [ "$TAPEDEV" ] && LogAll "This is a tape-based backup. Fine." 2802 2714 [ "$kernelpath" = "" ] && kernelpath=`TryToFindKernelPath` 2803 2715 kernelname=`echo $kernelpath | cut -d'-' -f2-` 2804 if [ ! -d "/lib/modules/$kernelname" ] && [ "$kernelpath" != "FAILSAFE" ]2716 if [ ! -d "/lib/modules/$kernelname" ] 2805 2717 then 2806 2718 LogAll "Module path for ${kernelpath} not found..." … … 2830 2742 [ "$CDRECOVERY" = "yes" ] || CDRECOVERY=no 2831 2743 2832 if [ _"$MONDO_SHARE" = _"" ]; then 2833 LogAll "Mindi Linux mini-distro generator v$MINDI_VERSION" 2834 LogAll "Latest Mindi is available from http://www.mondorescue.org" 2835 LogAll "------------------------------------------------------------------------------" 2836 else 2837 LogFile "You are using Mindi-Linux v$MINDI_VERSION to make boot+data disks" 2838 fi 2839 # for Mandrake 9.2, which comes with two aes.o.gz modules :-/ 2840 insmod /lib/modules/$KERVERRUN/*/*/misc/aes.*o.gz >> $LOGFILE 2>> $LOGFILE 2841 for i in loop cdrom ide-cd isofs linear raid0 raid1 raid5 ; do 2842 insmod $i >> $LOGFILE 2>> $LOGFILE 2843 done 2744 LogAll "Mindi Linux mini-distro generator v$MINDI_VERSION" 2745 LogAll "Latest Mindi is available from http://www.mondorescue.org" 2746 LogAll "------------------------------------------------------------------------------" 2844 2747 2845 2748 KERN_DISK_MADE="" … … 2847 2750 LogFile "DIFFERENTIAL = $DIFFERENTIAL" 2848 2751 LogFile "INTERNAL TAPE BLOCK SIZE = $INTERNAL_TAPE_BLOCK_SIZE" 2849 LogFile "NOT_BOOT = '$NOT_BOOT'"2850 if [ "$NOT_BOOT" != "" ] && [ "$NOT_BOOT" != "0" ] && [ "$NOT_BOOT" != "no" ] ; then2851 LogAll "Just creating mondo-restore.cfg and a small all.tar.gz for Mondo. Nothing else."2852 MakeMondoConfigFile $MINDI_TMP/mondo-restore.cfg2853 MakeMountlist $MINDI_TMP/mountlist.txt2854 CheckMountlist $MINDI_TMP/mountlist.txt2855 mkdir -p $MINDI_TMP/small-all/tmp2856 cd $MINDI_TMP/small-all2857 cp -f $MINDI_TMP/{mountlist.txt,mondo-restore.cfg,filelist.full.gz,biggielist.txt} tmp 2>> $LOGFILE || Die "Cannot copy small all.tar.gz"2858 tar -cv ./tmp | gzip -9 > $MINDI_TMP/all.tar.gz 2>> $MINDI_TMP/$$.log || Die "Cannot make small all.tar.gz" $MINDI_TMP/$$.log2859 sleep 22860 LogAll "Done. Exiting."2861 MindiExit 02862 fi2863 2752 2864 2753 if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ "$USBDEVICE" != "" ]; then … … 2876 2765 fi 2877 2766 if [ "$USE_OWN_KERNEL" = "yes" ]; then 2878 YOUR_KERNEL_SUCKS=""2879 2767 kernelpath=`TryToFindKernelPath` 2880 2768 if [ "$kernelpath" = "" ] ; then … … 2882 2770 read kernelpath 2883 2771 fi 2884 else 2885 YOUR_KERNEL_SUCKS="That's why you're using mine, dude. :-)" 2886 fi 2887 fi 2888 if [ "$YOUR_KERNEL_SUCKS" != "" ] || [ "$kernelpath" = "" ] || [ "$kernelpath" = "SUCKS" ] || [ "$kernelpath" = "FAILSAFE" ] ; then 2889 # If we have a distribution-specific script for finding a FAILSAFE kernel, use it. 2890 if [ -f "$MINDI_LIB/FindDistroFailsafe" ] && [ ! "$1" = "--makemountlist" ]; then 2891 source $MINDI_LIB/FindDistroFailsafe 2892 # Log kernel image 2893 LogAll "FAILSAFE kernel image to be used is: $FAILSAFE_KBIN ($FAILSAFE_KVER)" 2894 kernelpath="$FAILSAFE_KBIN" 2895 LogAll "I shall include a failsafe kernel, not your kernel, in the boot disks.\n" 2896 LogAll "The failsafe kernel is $kernelpath.\n" 2897 LogAll "However, you are still running your kernel. If Mindi fails to create your\n" 2898 LogAll "disks then it may still be a result of a problem with your kernel.\n" 2899 pwd=`pwd` 2900 cd $MINDI_TMP 2901 mkdir -p lib/modules 2902 cp -a "/lib/modules/$FAILSAFE_KVER" "lib/modules/$FAILSAFE_KVER" || Die "Cannot copy kernel modules." 2903 cd $pwd 2904 else 2905 kernelpath=$MINDI_LIB/vmlinuz 2906 LogAll "I shall include Mindi's failsafe kernel, not your kernel, in the boot disks." 2907 LogAll "However, you are still running your kernel. If Mindi fails to create your" 2908 LogAll "disks then it may still be a result of a problem with your kernel." 2909 pwd=`pwd` 2910 cd $MINDI_TMP 2911 bzip2 -dc $MINDI_LIB/lib.tar.bz2 | tar -x || Die "Cannot unzip lib.tar.bz2" 2912 cd $pwd 2913 fi 2914 YOUR_KERNEL_SUCKS="Your kernel sucks" 2772 fi 2915 2773 fi 2916 2774 LogFile "Mindi's temp dir=$MINDI_TMP" … … 2918 2776 [ "$(($RANDOM%64))" -eq "0" ] && LogAll "Dude, I've looked inside your computer and it's really dusty..." 2919 2777 2920 [ "$YOUR_KERNEL_SUCKS" ] && [ ! "$FAILSAFE_KVER" ] && Die "Please install mindi-kernel package. You need it.\nGo to http://www.mondorescue.org and download it, then install it."2921 2922 2778 PrepareDataDiskImages 2923 2779 2924 ramdisk_size=$(($size_of_all_tools+$EXTRA_SPACE)) 2925 rds=$(($ramdisk_size-$((ramdisk_size%4096)))) 2926 export ramdisk_size=$rds 2780 export ramdisk_size=$(($size_of_all_tools+$EXTRA_SPACE)) 2927 2781 2928 2782 LogFile "Ramdisk will be $ramdisk_size KB" … … 2933 2787 fi 2934 2788 2935 [ -e "$MINDI_ LIB/memtest.img" ] && BOOT_MEDIA_MESSAGE="$BOOT_MEDIA_MESSAGE\n\2789 [ -e "$MINDI_DATA/memtest.img" ] && BOOT_MEDIA_MESSAGE="$BOOT_MEDIA_MESSAGE\n\ 2936 2790 ...Or type 'memtest' to test your PC's RAM thoroughly.\n" 2937 2791 -
branches/2.2.10/mindi/mindi-bkphw
r2446 r2462 89 89 close(SCRIPT); 90 90 } else { 91 print "\nWARNING: No Hardware support for $productname. 91 print "\nWARNING: No Hardware support for $productname.\nNot a big issue, just less features and risks ;-)\n"; 92 92 print "You may ask your manufacturer to contribute to the mindi project\n"; 93 93 } -
branches/2.2.10/mindi/rootfs/sbin/find-and-mount-cdrom
r2445 r2462 7 7 for device in /dev/hd? /dev/scd? /dev/rcd? /dev/sr? /dev/cd? /dev/ide/*/*/*/*/cd /dev/scsi/*/*/*/*/cd; do 8 8 [ ! "$SECOND_TRY" ] && LogIt "Trying $device" 9 if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg 2> /dev/null`" ]; then9 if [ "`grep "using-cdstream yes" $MINDI_CACHE/mondorestore.cfg 2> /dev/null`" ]; then 10 10 pwd=`pwd` 11 11 cd $GROOVY … … 75 75 fi 76 76 [ "$1" = "--second-try" ] && exit 1; 77 if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg 2 > /dev/null`" ] ; then77 if [ "`grep "using-cdstream yes" $MINDI_CACHE/mondorestore.cfg 2 > /dev/null`" ] ; then 78 78 LogIt "Because you are using cdstream, I won't try to mount CD." 79 79 exit 0 -
branches/2.2.10/mindi/rootfs/sbin/hack-cfg-if-necessary
r1983 r2462 16 16 LogIt "OK, we've found /mnt/cdrom/archives/*; great." 17 17 18 if ! grep "backup-media-type iso" /tmp/mondo-restore.cfg 2 > /dev/null ; then18 if ! grep "backup-media-type iso" $MINDI_CACHE/mondorestore.cfg 2 > /dev/null ; then 19 19 LogIt "Config file is fine, BTW." 20 20 exit 0 21 21 fi 22 22 23 LogIt "Re-jigging mondo -restore.cfg because you backed up to ISOs and then burned them to CDs" 124 sed -i 's/backup-media-type iso/backup-media-type cdr/' /tmp/mondo-restore.cfg23 LogIt "Re-jigging mondorestore.cfg because you backed up to ISOs and then burned them to CDs" 1 24 sed -i 's/backup-media-type iso/backup-media-type cdr/' $MINDI_CACHE/mondorestore.cfg 25 25 LogIt "Done re-jigging. Yay." 26 26 exit 0 -
branches/2.2.10/mindi/rootfs/sbin/init
r2445 r2462 5 5 # init script launched during the restore process 6 6 #------------------------------------------------------------ 7 8 export MINDI_CACHE=CCC 7 9 8 10 if [ -e "/proc/cmdline" ]; then … … 117 119 cd $GROOVY 118 120 [ "$1" != "" ] && tapedev=$1 119 [ ! "$tapedev" ] && tapedev=`grep media-dev /tmp/mondo-restore.cfg 2>/dev/null | tr -s ' ' ' ' | cut -d' ' -f2`121 [ ! "$tapedev" ] && tapedev=`grep media-dev $MINDI_CACHE/mondorestore.cfg 2>/dev/null | tr -s ' ' ' ' | cut -d' ' -f2` 120 122 mt -f $tapedev rewind 121 123 mt -f $tapedev fsf 2 … … 124 126 if [ "$res" -eq "0" ] ; then 125 127 # Store the dev name in case we changed it interactively 126 if [ -f " /tmp/mondo-restore.cfg" ]; then127 sed -i "s/^media-dev .*$/media-dev $tapedev/" /tmp/mondo-restore.cfg128 if [ -f "$MINDI_CACHE/mondorestore.cfg" ]; then 129 sed -i "s/^media-dev .*$/media-dev $tapedev/" $MINDI_CACHE/mondorestore.cfg 128 130 fi 129 131 fi … … 340 342 return 341 343 fi 342 if [ -x ./mindi-rsthw ]; then344 if [ -x $MINDI_CACHE/mindi-rsthw ]; then 343 345 grep -q RESTORE $CMDLINE 344 346 if [ "$?" -ne 0 ]; then … … 354 356 fi 355 357 if [ "$answer" = "YES" ] ; then 356 ./mindi-rsthw358 $MINDI_CACHE/mindi-rsthw 357 359 fi 358 360 fi … … 454 456 return; 455 457 fi 456 if [ "`grep mpath /tmp/mountlist.txt`" ]; then458 if [ "`grep mpath $MINDI_CACHE/mountlist.txt`" ]; then 457 459 if [ -x /sbin/multipath ]; then 458 460 echo "Starting Mpath..." … … 478 480 fi 479 481 480 raid_devices=`grep /dev/md /tmp/mountlist.txt | cut -d' ' -f1`482 raid_devices=`grep /dev/md $MINDI_CACHE/mountlist.txt | cut -d' ' -f1` 481 483 if which raidstart > /dev/null 2> /dev/null ; then 482 484 for i in $raid_devices ; do … … 537 539 local res 538 540 mount | grep /mnt/cdrom && return 0 539 [ "`grep "backup_media_type" /tmp/mondo-restore.cfg 2> /dev/null | grep "cdstream"`" ] && return541 [ "`grep "backup_media_type" $MINDI_CACHE/mondorestore.cfg 2> /dev/null | grep "cdstream"`" ] && return 540 542 LogIt "Trying to mount CD-ROM a 2nd time..." 541 543 find-and-mount-cdrom --second-try … … 641 643 # Retry failed udev events now that local filesystems are mounted read-write 642 644 # (useful for rules creating network ifcfg files) 643 if [ -e " /tmp/USE-UDEV" ] ; then645 if [ -e "$MINDI_CACHE/USE-UDEV" ] ; then 644 646 if [ -x /sbin/udevadm ]; then 645 647 /sbin/udevadm trigger --retry-failed … … 681 683 export DENY_MODS=" " 682 684 fi 683 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg 2> /dev/null`" ]; then685 if [ "`grep -i 'obdr ' $MINDI_CACHE/mondorestore.cfg 2> /dev/null`" ]; then 684 686 # Do not try to load usb storage when dealing with OBDR it makes the modprobe hang :-( 685 687 export DENY_MODS="usb-storage $DENY_MODS" … … 702 704 fi 703 705 704 if [ -e " /tmp/USE-UDEV" ] ; then706 if [ -e "$MINDI_CACHE/USE-UDEV" ] ; then 705 707 RunUdevd 706 708 fi … … 719 721 #------------------------------- 720 722 UseTmpfs 721 if [ ! -e " /tmp/mondo-restore.cfg" ] ; then722 LogIt "Warning - /tmp/mondo-restore.cfg not found"723 if [ ! -e "$MINDI_CACHE/mondorestore.cfg" ] ; then 724 LogIt "Warning - $MINDI_CACHE/mondorestore.cfg not found" 723 725 fi 724 726 if [ "`grep -i pxe $CMDLINE`" ] || [ "`grep -i net $CMDLINE`" ]; then … … 727 729 fi 728 730 729 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg 2>/dev/null`" ] || [ "`grep -i ' udev' /tmp/mondo-restore.cfg 2>/dev/null`" ]; then731 if [ "`grep -i 'obdr ' $MINDI_CACHE/mondorestore.cfg 2>/dev/null`" ] || [ "`grep -i ' udev' $MINDI_CACHE/mondorestore.cfg 2>/dev/null`" ]; then 730 732 HandleTape 731 733 ExtractDataDisksAndLoadModules … … 736 738 ExtractDataDisksAndLoadModules 737 739 # Fake the conf file to force it to NFS mode, even if we made originally a CD (mandatory for mondorestore to work correctly) 738 sed -i "s/backup-media-type.*/backup-media-type netfs/" /tmp/mondo-restore.cfg739 elif [ "`grep -i usb= $CMDLINE`" ] || [ "`grep -i usb /tmp/mondo-restore.cfg 2>/dev/null | grep media-type`" ]; then740 sed -i "s/backup-media-type.*/backup-media-type netfs/" $MINDI_CACHE/mondorestore.cfg 741 elif [ "`grep -i usb= $CMDLINE`" ] || [ "`grep -i usb $MINDI_CACHE/mondorestore.cfg 2>/dev/null | grep media-type`" ]; then 740 742 . /sbin/start-usb 741 743 … … 752 754 res=$? 753 755 ConfigureLoggingDaemons 754 if [ -e " /tmp/USE-DEVFS" ] ; then756 if [ -e "$MINDI_CACHE/USE-DEVFS" ] ; then 755 757 umount /mnt/cdrom 2> /dev/null 756 758 mv /dev/cdrom /cdrom.lnk 2> /dev/null … … 769 771 mkdir -p /tmp/tmpfs 770 772 sleep 2 771 if [ -e "/dev/md0" ] && [ ! -e "/dev/md/0" ] && [ "`grep /dev/md/ /tmp/mountlist.txt`" != "" ] ; then773 if [ -e "/dev/md0" ] && [ ! -e "/dev/md/0" ] && [ "`grep /dev/md/ $MINDI_CACHE/mountlist.txt`" != "" ] ; then 772 774 LogIt "Creating /dev/md/* softlinks just in case." 1 773 775 mkdir -p /dev/md … … 776 778 cp -af /dev/md2 /dev/md/2 2> /dev/null 777 779 fi 778 [ -e " /tmp/mountlist.txt" ] && cp -f /tmp/mountlist.txt /tmp/mountlist.original780 [ -e "$MINDI_CACHE/mountlist.txt" ] && cp -f $MINDI_CACHE/mountlist.txt $MINDI_CACHE/mountlist.original 779 781 780 782 if ! [ "`grep -i "pxe" $CMDLINE`" ] ; then … … 843 845 fi 844 846 fi 845 if grep "backup-media-type" /tmp/mondo-restore.cfg > /dev/null 2> /dev/null ; then847 if grep "backup-media-type" $MINDI_CACHE/mondorestore.cfg > /dev/null 2> /dev/null ; then 846 848 LogIt "backup-media-type is specified in config file - great." 847 849 LogIt "Calling post-init" -
branches/2.2.10/mindi/rootfs/sbin/post-init
r2378 r2462 7 7 sleep 1 8 8 9 echo "Here is my /tmp/mountlist.txt" >> $LOGFILE 10 cat /tmp/mountlist.txt >> $LOGFILE 9 echo "Here is my $MINDI_CACHE/mountlist.txt" >> $LOGFILE 10 cat $MINDI_CACHE/mountlist.txt >> $LOGFILE 11 echo "-----------------------------------" >> $LOGFILE 12 11 13 12 14 iso=`grep iso $CMDLINE` … … 45 47 46 48 mondoopt="" 47 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg 2> /dev/null`" ]; then49 if [ "`grep -i 'obdr ' $MINDI_CACHE/mondorestore.cfg 2> /dev/null`" ]; then 48 50 mondoopt="$mondoopt -o -d $TAPEDEV" 49 51 fi … … 60 62 mondorestore $mondoopt -Z nuke 61 63 elif [ "$expert" ] ; then 62 if [ "`grep tapedev /tmp/mondo-restore.cfg 2> /dev/null`" ] ; then64 if [ "`grep tapedev $MINDI_CACHE/mondorestore.cfg 2> /dev/null`" ] ; then 63 65 LogIt "-------------------TAPE MODE-------------------" 1 64 66 loc=`which mondorestore 2> /dev/null` … … 73 75 fi 74 76 fi 75 elif [ "`grep using-cdstream /tmp/mondo-restore.cfg 2> /dev/null`" ] ; then77 elif [ "`grep using-cdstream $MINDI_CACHE/mondorestore.cfg 2> /dev/null`" ] ; then 76 78 LogIt "------------------CDSTREAM MODE------------------" 1 77 79 loc=`which mondorestore 2> /dev/null` -
branches/2.2.10/mindi/rootfs/sbin/start-netfs
r2444 r2462 11 11 12 12 # Get info from config file 13 ipdev=`grep netfs-dev /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`14 ipaddress=`grep netfs-client-ipaddr /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`15 ipnetmask=`grep netfs-client-netmask /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`16 ipbroadcast=`grep netfs-client-broadcast /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`17 ipgateway=`grep netfs-client-defgw /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`18 proto=`grep netfs-proto /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`13 ipdev=`grep netfs-dev $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 14 ipaddress=`grep netfs-client-ipaddr $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 15 ipnetmask=`grep netfs-client-netmask $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 16 ipbroadcast=`grep netfs-client-broadcast $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 17 ipgateway=`grep netfs-client-defgw $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 18 proto=`grep netfs-proto $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 19 19 ipconf="" 20 20 pre="" 21 21 post="" 22 export netfsmount=`grep netfs-server-mount /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`23 export imgname=`grep iso-prefix /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`22 export netfsmount=`grep netfs-server-mount $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 23 export imgname=`grep iso-prefix $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 24 24 if [ "$imgname" = "" ]; then 25 25 export imgname="mondorescue" 26 26 fi 27 export dirimg=`grep netfs-server-path /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`27 export dirimg=`grep netfs-server-path $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 28 28 if [ "$dirimg" = "" ]; then 29 29 export dirimg="/" -
branches/2.2.10/mindi/rootfs/sbin/start-usb
r2329 r2462 7 7 8 8 # Get info from config file 9 MRUSBDEV=`grep usb-dev /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`9 MRUSBDEV=`grep usb-dev $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 10 10 11 11 # info from cmdline are predominent -
branches/2.2.10/mondo-doc/mondoarchive.8
r2382 r2462 210 210 .TP 211 211 .BI "-k " "path" 212 Path of user's kernel. If you are a Debian (<3.0) or Gentoo (<1.4) user then specify 213 .B -k FAILSAFE 214 as your kernel. Otherwise, you will rarely need this option. 212 Path of user's kernel, if you want to use another one than the running one. 215 213 216 214 .TP -
branches/2.2.10/mondo-doc/mondorescue-howto.sgml
r2445 r2462 340 340 in the 'exclude directories' dialog box. Please put a space in 341 341 between each path, e.g. /shared/private /scratch /nfs /windows 342 </entry>343 </row>344 <row>345 <entry>346 <ulink url="images/makernel.png"><inlinemediaobject><imageobject>347 <imagedata fileref="images/makernel-mini">348 </imageobject></inlinemediaobject>349 </ulink>350 </entry>351 <entry>352 Is your kernel sane? Red Hat, Mandrake, SuSE, Debian and Slackware users353 should in general say 'yes' because these vendors are good at354 producing reliable kernels. If you are using Gentoo or LFS355 then your kernel might be non-standard, in which case say 'no' to356 use Mondo's failsafe kernel (provided separately).357 342 </entry> 358 343 </row> … … 1411 1396 </tbody></tgroup></informaltable> 1412 1397 1413 </sect2>1414 <sect2 id="backup-cmd-failsafe">1415 <title>Standard Example With Failsafe kernel</title>1416 <para></para>1417 <informaltable><tgroup cols="1"><tbody>1418 <row>1419 <entry>1420 1421 bash# mondoarchive -k FAILSAFE -Ow 21422 1423 </entry>1424 </row>1425 </tbody></tgroup></informaltable>1426 1427 <para>If you have problems during the restore phase, due to your kernel1428 (which may be the case on some distributions), you may want to explore the Failsafe1429 approach, In order for this option to work you'll have to get1430 the mindi-kernel tarball or package for your distribution.</para>1431 </sect2>1432 <sect2 id="backup-cmd-network">1433 <title>Standard Example With Network Backup</title>1434 <para></para>1435 <informaltable><tgroup cols="1"><tbody>1436 <row>1437 <entry>1438 1439 bash# mount nfs://192.168.1.3:/home/nfs -t nfs /mnt/nfs1440 </entry>1441 </row>1442 <row>1443 <entry>1444 bash# mondoarchive -OVn nfs://192.168.1.3:/home/nfs -g -s 200m1445 </entry>1446 </row>1447 <row>1448 <entry>1449 bash# umount /mnt/nfs1450 1451 </entry>1452 </row>1453 </tbody></tgroup></informaltable>1454 1455 <para>The resultant ISO's can be burned to CD's if you want (which1456 isn't a good idea unless you're a Mondo expert because they'll try1457 to restore over a network by default, which is silly because the1458 archives are on the CD's). Or, you can boot from the Mindi media1459 (or mondorescue.iso) and hit ENTER a few times to restore.</para>1460 <para>Those ISO images can also be used for a PXE restore. For this1461 to work, please refer to the file README.pxe provided with1462 your mindi package.1463 </para>1464 1398 </sect2> 1465 1399 </sect1> … … 2156 2090 <para>Mondo (technically, Mindi on behalf of Mondo) creates a file 2157 2091 called a mountlist. This can be found on the ramdisk at 2158 / tmp/mountlist.txt; it looks something like this:</para>2092 /var/cache/mindi/mountlist.txt; it looks something like this:</para> 2159 2093 <para></para> 2160 2094 <informaltable><tgroup cols="1"><tbody> … … 2269 2203 automatically partition and format your disks for you, including 2270 2204 the RAID devices.</para> 2271 <para>Once you have finished editing / tmp/mountlist.txt using2205 <para>Once you have finished editing /var/cache/mindi/mountlist.txt using 2272 2206 mondorestore's built-in editor then you may choose 'OK'. Please 2273 2207 note that this will not write anything to your hard disk. You will … … 2617 2551 <qandaentry> 2618 2552 <question><para>Q: When I try to boot from the Mondo CD, 2619 it says, "VFS: Unable to mount root fs." I am using an old Debian2620 distro. What do I do?</para></question>2621 <answer>2622 <para>A: Ask Debian's designers why they, unlike every other distro2623 I can find, have included cramfs and other 'goodies' with their2624 kernel. In the meantime, please use '-k FAILSAFE' in your command2625 line when calling Mondo.</para>2626 <para>A: From Sarge onwards, all stock Debian 2.6 kernels should work fine. If2627 you are still using stock Debian 2.4 kernels, FAILSAFE is the way to go.2628 Of course, if you have compiled your own kernel and experience problems,2629 FAILSAFE is the way to go as well, but this is not really2630 Debian-specific.</para>2631 </answer>2632 </qandaentry>2633 <qandaentry>2634 <question><para>Q: When I try to boot from the Mondo CD,2635 it says, "Cannot mount root fs - kernel panic," or something2636 similar. What do I do?</para></question>2637 <answer>2638 <para>A: Recompile your kernel (or use '-k FAILSAFE'). Take a look2639 at <link linkend="overview-sysrq-kernelreq">Linux Kernel support</link> to2640 see what your kernel must support.</para>2641 </answer>2642 </qandaentry>2643 <qandaentry>2644 <question><para>Q: When I try to boot from the Mondo CD,2645 2553 it says, "UPGRADE YOUR RAM". What does that mean?</para></question> 2646 2554 <answer> … … 2674 2582 in lilo and speeds up booting, for more info see the lilo man 2675 2583 page.</para> 2676 </answer>2677 </qandaentry>2678 <qandaentry>2679 <question><para>Q: I made a Mondo CD using the failsafe2680 kernel (i.e. I said 'no' when Mondo asked if I wanted to use my own2681 kernel). It still doesn't boot. Help!</para></question>2682 <answer>2683 <para>A: OK, now that is a bug. :-) I included a kernel with Mondo2684 (technically, with Mindi, which Mondo uses) to make sure that users2685 could use Mondo despite flaws in their own kernels. If you are2686 using Mondo/Mindi's kernel but still cannot boot from your Mondo CD2687 then please e-mail the &ML;.</para>2688 2584 </answer> 2689 2585 </qandaentry> … … 2963 2859 <para> 2964 2860 A: Look at <filename>/var/log/mindi.log</filename> and see what it 2965 says. Also, try typing 'mindi --makemountlist /tmp/mountlist.txt'2861 says. Also, try typing 'mindi --makemountlist /var/cache/mindi/mountlist.txt' 2966 2862 to see what Mindi says. Send the log to the &ML; if you get stuck. 2967 2863 </para> -
branches/2.2.10/mondo/src/common/libmondo-archive.c
r2460 r2462 513 513 char *bootldr_str = NULL; 514 514 char *tape_device = NULL; 515 char *last_filelist_number = NULL;516 515 char *broken_bios_sz = NULL; 517 516 char *cd_recovery_sz = NULL; … … 546 545 } 547 546 lines_in_filelist = count_lines_in_file(tmp); 548 mr_free(tmp);549 550 mr_asprintf(tmp, "%s/LAST-FILELIST-NUMBER", bkpinfo->tmpdir);551 last_filelist_number = last_line_of_file(tmp);552 547 mr_free(tmp); 553 548 … … 805 800 (bkpinfo->image_devs == NULL) ? "\"\"" : bkpinfo->image_devs, // parameter #10 806 801 broken_bios_sz, // parameter #11 807 last_filelist_number, // parameter #12 (STRING) 808 estimated_total_noof_slices, // parameter #13 (INT) 809 (bkpinfo->exclude_devs == NULL) ? "\"\"" : bkpinfo->exclude_devs, // parameter #14 810 use_comp_sz, // parameter #15 811 use_lilo_sz, // parameter #16 812 use_star_sz, // parameter #17 813 bkpinfo->internal_tape_block_size, // parameter #18 (LONG) 814 bkpinfo->differential, // parameter #19 (INT) 815 use_gzip_sz, // parameter #20 (STRING) 816 use_lzma_sz, // parameter #21 (STRING) 802 estimated_total_noof_slices, // parameter #12 (INT) 803 (bkpinfo->exclude_devs == NULL) ? "\"\"" : bkpinfo->exclude_devs, // parameter #13 804 use_comp_sz, // parameter #14 805 use_lilo_sz, // parameter #15 806 use_star_sz, // parameter #16 807 bkpinfo->internal_tape_block_size, // parameter #17 (LONG) 808 bkpinfo->differential, // parameter #18 (INT) 809 use_gzip_sz, // parameter #19 (STRING) 810 use_lzma_sz, // parameter #20 (STRING) 817 811 MONDO_LOGFILE); 818 812 819 813 mr_free(tmp2); 820 mr_free(last_filelist_number);821 814 mr_free(tape_device); 822 815 mr_free(use_lzo_sz); -
branches/2.2.10/mondo/src/common/libmondo-cli.c
r2444 r2462 671 671 mr_free(bkpinfo->kernel_path); 672 672 mr_asprintf(bkpinfo->kernel_path, "%s", flag_val['k']); 673 if (!strcmp(bkpinfo->kernel_path, "failsafe")) { 674 mr_free(bkpinfo->kernel_path); 675 mr_asprintf(bkpinfo->kernel_path, "FAILSAFE"); 676 } 677 if (strcmp(bkpinfo->kernel_path, "FAILSAFE") && !does_file_exist(bkpinfo->kernel_path)) { 673 if (!does_file_exist(bkpinfo->kernel_path)) { 678 674 retval++; 679 675 log_to_screen("You specified kernel '%s', which does not exist\n", bkpinfo->kernel_path); -
branches/2.2.10/mondo/src/common/libmondo-devices.c
r2460 r2462 2731 2731 paranoid_fclose(fin); 2732 2732 } else { 2733 if (does_file_exist( "/tmp/mondo-restore.cfg")) {2733 if (does_file_exist(MINDI_CACHE"/mondorestore.cfg")) { 2734 2734 mr_free(bkpinfo->media_device); 2735 bkpinfo->media_device = read_cfg_var( "/tmp/mondo-restore.cfg", "media-dev");2735 bkpinfo->media_device = read_cfg_var(MINDI_CACHE"/mondorestore.cfg", "media-dev"); 2736 2736 } 2737 2737 } … … 3075 3075 ("Will you want to verify your backups after Mondo has created them?"); 3076 3076 3077 #ifndef __FreeBSD__3078 if (!ask_me_yes_or_no3079 ("Are you confident that your kernel is a sane, sensible, standard Linux kernel? Say 'no' if you are using a Gentoo <1.4 or Debian <3.0, please."))3080 #endif3081 {3082 mr_free(bkpinfo->kernel_path);3083 mr_asprintf(bkpinfo->kernel_path, "FAILSAFE");3084 }3085 3086 3077 if (!ask_me_yes_or_no 3087 3078 ("Are you sure you want to proceed? Hit 'no' to abort.")) { -
branches/2.2.10/mondo/src/common/libmondo-filelist.c
r2444 r2462 322 322 mr_free(biggie_fname); 323 323 324 mr_asprintf(outfname, "%s/LAST-FILELIST-NUMBER", bkpinfo->tmpdir); 325 mr_asprintf(tmp, "%ld", curr_set_no); 326 if (write_one_liner_data_file(outfname, tmp)) { 327 log_OS_error 328 ("Unable to echo write one-liner to LAST-FILELIST-NUMBER"); 329 err = 1; 330 } 324 mr_asprintf(tmp, "echo 'last-filelist-number %ld' >> "MINDI_CACHE"/mondorestore.cfg", curr_set_no); 325 paranoid_system(tmp); 331 326 mr_free(tmp); 332 mr_free(outfname);333 327 334 328 if (curr_set_no == 0) { … … 708 702 assert(bkpinfo != NULL); 709 703 710 mr_asprintf(cfg_fname, "%s/mondo -restore.cfg", bkpinfo->tmpdir);704 mr_asprintf(cfg_fname, "%s/mondorestore.cfg", MINDI_CACHE); 711 705 val_sz = read_cfg_var(cfg_fname, "last-filelist-number"); 712 706 mr_free(cfg_fname); -
branches/2.2.10/mondo/src/common/libmondo-files.c
r2406 r2462 705 705 706 706 /** 707 * Determine the size (in KB) of @p dev in the mountlist in <tt>tmpdir</tt>/mountlist.txt.707 * Determine the size (in KB) of @p dev in the mountlist in mountlist.txt. 708 708 * @param tmpdir The tempdir where the mountlist is stored. 709 709 * @param dev The device to search for. … … 717 717 long file_len_K; 718 718 719 mr_asprintf(mountlist, "%s/mountlist.txt", tmpdir);720 mr_asprintf(command, "grep \"%s \" %s/mountlist.txt | head -n1 | awk '{print $4}'", dev, tmpdir);719 mr_asprintf(mountlist, "%s/mountlist.txt", MINDI_CACHE); 720 mr_asprintf(command, "grep \"%s \" %s/mountlist.txt | head -n1 | awk '{print $4}'", dev, MINDI_CACHE); 721 721 mr_free(mountlist); 722 722 … … 992 992 * Copy the files that Mondo/Mindi need to run to the scratchdir or tempdir. 993 993 * Currently this includes: copy Mondo's home directory to scratchdir, 994 * copy LAST-FILELIST-NUMBER to scratchdir, copypost-nuke.tgz (if it exists) to tmpdir,994 * copy post-nuke.tgz (if it exists) to tmpdir, 995 995 * and run "hostname > scratchdir/HOSTNAME". 996 996 * @param bkpinfo The backup information structure. Fields used: … … 1020 1020 if (res) { 1021 1021 fatal_error("Failed to copy Mondo's stuff to scratchdir"); 1022 }1023 1024 mr_asprintf(command, "cp -f %s/LAST-FILELIST-NUMBER %s", bkpinfo->tmpdir, bkpinfo->scratchdir);1025 res = run_program_and_log_output(command, FALSE);1026 mr_free(command);1027 1028 if (res) {1029 fatal_error("Failed to copy LAST-FILELIST-NUMBER to scratchdir");1030 1022 } 1031 1023 -
branches/2.2.10/mondo/src/common/libmondo-stream.c
r2405 r2462 856 856 (void) getcwd(old_cwd, MAX_STR_LEN); 857 857 chdir(bkpinfo->tmpdir); 858 mr_asprintf(tmp, "tar -zxf %s . /tmp/mondo-restore.cfg 2> /dev/null", outfname);858 mr_asprintf(tmp, "tar -zxf %s ."MINDI_CACHE"/mondorestore.cfg 2> /dev/null", outfname); 859 859 paranoid_system(tmp); 860 860 mr_free(tmp); 861 861 862 paranoid_system("cp -f tmp/mondo-restore.cfg . 2> /dev/null");862 paranoid_system("cp -f ."MINDI_CACHE"/mondorestore.cfg . 2> /dev/null"); 863 863 chdir(old_cwd); 864 864 unlink(outfname); -
branches/2.2.10/mondo/src/common/libmondo-tools.c
r2444 r2462 1071 1071 /** 1072 1072 * Retrieve the line containing @p label from the config file. 1073 * @param config_file The file to read from, usually @c /tmp/mondo-restore.cfg.1073 * @param config_file The file to read from, usually @c mondorestore.cfg. 1074 1074 * @param label What to read from the file. 1075 1075 * @param value Where to put it. … … 1294 1294 * Write a line to a configuration file. Writes a line of the form, 1295 1295 * @c label @c value. 1296 * @param config_file The file to write to. Usually @c mondo -restore.cfg.1296 * @param config_file The file to write to. Usually @c mondorestore.cfg. 1297 1297 * @param label What to call this bit of data you're writing. 1298 1298 * @param value The bit of data you're writing. -
branches/2.2.10/mondo/src/common/mondostructures.h
r2428 r2462 557 557 558 558 /** 559 * Path to the user's kernel, or "FAILSAFE" or "SUCKS" to use the kernel 560 * included with Mindi. 559 * Path to the user's kernel included with Mindi. 561 560 */ 562 561 char *kernel_path; -
branches/2.2.10/mondo/src/include/my-stuff.h
r2420 r2462 74 74 * The location where mindi media images are stored. 75 75 */ 76 #define MINDI_CACHE "/var/cache/mindi" 76 #define MINDI_CACHE_REL "var/cache/mindi" /* Should be coherent with mindi */ 77 #define MINDI_CACHE "/"MINDI_CACHE_REL 77 78 78 79 /** -
branches/2.2.10/mondo/src/mondorestore/mondo-prep.c
r2405 r2462 1573 1573 if (pout_to_fdisk) { 1574 1574 // mark relevant partition as bootable 1575 tmp1 = call_program_and_get_last_line_of_output ("make-me-bootable /tmp/mountlist.txt dummy");1575 tmp1 = call_program_and_get_last_line_of_output ("make-me-bootable "MINDI_CACHE"/mountlist.txt dummy"); 1576 1576 mr_asprintf(tmp, "a\n%s\n", tmp1); 1577 1577 mr_free(tmp1); -
branches/2.2.10/mondo/src/mondorestore/mondo-rstr-compare.c
r2420 r2462 649 649 chdir(bkpinfo->restore_path); 650 650 651 mr_asprintf(command, "cp -f /tmp/LAST-FILELIST-NUMBER %s/tmp", bkpinfo->restore_path);652 run_program_and_log_output(command, FALSE);653 mr_free(command);654 655 651 mvaddstr_and_log_it(g_currentY, 656 652 0, "Verifying archives against filesystem"); … … 705 701 getcwd(dir, MAX_STR_LEN); 706 702 chdir(bkpinfo->restore_path); 707 mr_asprintf(command, "cp -f /tmp/LAST-FILELIST-NUMBER %s/tmp", bkpinfo->restore_path);708 run_program_and_log_output(command, FALSE);709 mr_free(command);710 703 711 704 mvaddstr_and_log_it(g_currentY, -
branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools.c
r2451 r2462 26 26 * The mountlist stub (appended to the directory where all.tar.gz was unpacked). 27 27 */ 28 #define MOUNTLIST_FNAME_STUB "tmp/mountlist.txt"29 30 /** 31 * The mondo -restore.cfg stub (appended to the directory where all.tar.gz was unpacked).28 #define MOUNTLIST_FNAME_STUB MINDI_CACHE_REL"/mountlist.txt" 29 30 /** 31 * The mondorestore.cfg stub (appended to the directory where all.tar.gz was unpacked). 32 32 */ 33 #define MONDO_CFG_FILE_STUB "tmp/mondo-restore.cfg"33 #define MONDO_CFG_FILE_STUB MINDI_CACHE_REL"/mondorestore.cfg" 34 34 /** 35 35 * The i-want-my-lvm stub … … 157 157 158 158 /** 159 * Extract @c mondo -restore.cfg and @c mountlist.txt from @p ramdisk_fname.159 * Extract @c mondorestore.cfg and @c mountlist.txt from @p ramdisk_fname. 160 160 * @param bkpinfo The backup information structure. @c tmpdir is the only field used. 161 161 * @param ramdisk_fname The filename of the @b compressed ramdisk to look in. … … 167 167 168 168 /** 169 * Keep trying to get mondo -restore.cfg from the archive, until the user gives up.169 * Keep trying to get mondorestore.cfg from the archive, until the user gives up. 170 170 */ 171 171 void get_cfg_file_from_archive_or_bust() … … 678 678 /** 679 679 * Fill out @p bkpinfo based on @p cfg_file. 680 * @param cfg_file The mondo -restore.cfg file to read into @p bkpinfo.680 * @param cfg_file The mondorestore.cfg file to read into @p bkpinfo. 681 681 * @param bkpinfo The backup information structure to fill out with information 682 682 * from @p cfg_file. … … 1574 1574 if (!run_program_and_log_output("which grub-MR", FALSE)) { 1575 1575 log_msg(1, "Yay! grub-MR found..."); 1576 mr_asprintf(command, "grub-MR %s /tmp/mountlist.txt", boot_device);1576 mr_asprintf(command, "grub-MR %s "MINDI_CACHE"/mountlist.txt", boot_device); 1577 1577 log_msg(1, "command = %s", command); 1578 1578 } else { … … 1872 1872 } else { 1873 1873 /* nuke mode */ 1874 mr_asprintf(command, "raw-MR %s /tmp/mountlist.txt", boot_device);1874 mr_asprintf(command, "raw-MR %s "MINDI_CACHE"/mountlist.txt", boot_device); 1875 1875 log_msg(2, "run_raw_mbr() --- command='%s'", command); 1876 1876 … … 2128 2128 2129 2129 /** 2130 * Extract mondo -restore.cfg and the mountlist from the tape inserted2130 * Extract mondorestore.cfg and the mountlist from the tape inserted 2131 2131 * to the ./tmp/ directory. 2132 2132 * @param dev The tape device to read from. … … 2261 2261 mr_free(tmp); 2262 2262 2263 if (!does_file_exist( "tmp/mondo-restore.cfg")) {2263 if (!does_file_exist(MINDI_CACHE_REL"/mondorestore.cfg")) { 2264 2264 log_to_screen("Cannot find config info on media"); 2265 2265 return (1); … … 2345 2345 } 2346 2346 2347 log_to_screen("Recovered mondo -restore.cfg");2347 log_to_screen("Recovered mondorestore.cfg"); 2348 2348 if (!does_file_exist(MOUNTLIST_FNAME_STUB)) { 2349 2349 log_to_screen("...but not mountlist.txt - a pity, really..."); -
branches/2.2.10/mondo/src/mondorestore/mondorestore.c
r2405 r2462 102 102 103 103 /** 104 * The location of 'mondo -restore.cfg', containing the metadata104 * The location of 'mondorestore.cfg', containing the metadata 105 105 * information for this backup. 106 106 */ … … 162 162 assert(raidlist != NULL); 163 163 if (!bkpinfo->disaster_recovery) { 164 strcpy(g_mountlist_fname, "/tmp/mountlist.txt");164 strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt"); 165 165 log_msg(2, "I guess you're testing edit_mountlist()"); 166 166 } … … 2074 2074 2075 2075 mvaddstr_and_log_it(g_currentY, 0, "Restoring from archives"); 2076 log_msg(2, "Insisting on 1st CD , so that I can have a look at LAST-FILELIST-NUMBER");2076 log_msg(2, "Insisting on 1st CD"); 2077 2077 if (g_current_media_number != 1) { 2078 2078 log_msg(3, "OK, that's jacked up."); … … 2695 2695 load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME); 2696 2696 if (!does_file_exist(g_mountlist_fname)) { 2697 strcpy(g_mountlist_fname, "/tmp/mountlist.txt");2697 strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt"); 2698 2698 } 2699 2699 res = let_user_edit_the_mountlist(mountlist, raidlist); … … 2795 2795 log_msg(0, "Partitioning only."); 2796 2796 load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME); 2797 strcpy(g_mountlist_fname, "/tmp/mountlist.txt");2797 strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt"); 2798 2798 load_mountlist(mountlist, g_mountlist_fname); 2799 2799 res = partition_everything(mountlist); … … 2804 2804 log_msg(0, "Formatting only."); 2805 2805 load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME); 2806 strcpy(g_mountlist_fname, "/tmp/mountlist.txt");2806 strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt"); 2807 2807 load_mountlist(mountlist, g_mountlist_fname); 2808 2808 res = format_everything(mountlist, FALSE, raidlist); … … 2813 2813 log_msg(0, "Stopping LVM and RAID"); 2814 2814 load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME); 2815 strcpy(g_mountlist_fname, "/tmp/mountlist.txt");2815 strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt"); 2816 2816 load_mountlist(mountlist, g_mountlist_fname); 2817 2817 res = do_my_funky_lvm_stuff(TRUE, FALSE); -
branches/2.2.10/mondo/src/restore-scripts/mondo/format-and-kludge-vfat
r2186 r2462 115 115 umount /mnt/tmpK || Die "Can't unmount /mnt/tmpK" 116 116 117 ideal_size=`grep "$device " /tmp/mountlist.txt | tr -s ' ' ' ' | cut -d' ' -f4`117 ideal_size=`grep "$device " $MINI_CACHE/mountlist.txt | tr -s ' ' ' ' | cut -d' ' -f4` 118 118 if [ "$ideal_size" = "" ]; then 119 119 LogIt "format-and-kludge-vfat --- can't find $device in mountlist" 1 -
branches/2.2.10/mondo/src/restore-scripts/mondo/grub-MR
r2451 r2462 93 93 94 94 if [ "$#" -ne "2" ] ; then 95 Die "grub-MR <MBR drive> <mountlist filename>; e.g. grub-MR /dev/hda /tmp/mountlist.txt"95 Die "grub-MR <MBR drive> <mountlist filename>; e.g. grub-MR /dev/hda $MINDI_CACHE/mountlist.txt" 96 96 fi 97 97 [ ! -f "$2" ] && Die "mountlist file not found" -
branches/2.2.10/mondo/src/restore-scripts/mondo/label-partitions-as-necessary
r2172 r2462 55 55 LogIt "Identifying your drives with tune2fs" 56 56 if [ "$#" -ne "1" ] ; then 57 LogIt "label-partitions-as-necessary /tmp/mountlist.txt < /tmp/fstab.new" 157 LogIt "label-partitions-as-necessary $MINDI_CACHE/mountlist.txt < /tmp/fstab.new" 1 58 58 exit 1 59 59 fi -
branches/2.2.10/mondo/src/restore-scripts/mondo/mount-me
r680 r2462 1 1 #!/bin/sh 2 2 3 mountlist= /tmp/mountlist.txt3 mountlist=$MINDI_CACHE/mountlist.txt 4 4 5 5 if [ "$#" -ne "0" ] ;then -
branches/2.2.10/mondo/src/restore-scripts/mondo/stabelilo-me
r1567 r2462 122 122 123 123 WhatIsFirstDriveCalled() { 124 cut -d' ' -f1 /tmp/mountlist.txt \124 cut -d' ' -f1 $MINDI_CACHE/mountlist.txt \ 125 125 | sed s/[0-9]// | sed s/[0-9]// \ 126 126 | sort -u | head -n 1 … … 133 133 LocateOldFstab 134 134 LocateOldElilo 135 old_mountlist= /tmp/mountlist.original136 new_mountlist= /tmp/mountlist.txt135 old_mountlist=$MINDI_CACHE/mountlist.original 136 new_mountlist=$MINDI_CACHE/mountlist.txt 137 137 QuitIfNotFound $old_mountlist 138 138 QuitIfNotFound $new_mountlist -
branches/2.2.10/mondo/src/restore-scripts/mondo/stabgrub-me
r2451 r2462 116 116 LocateOldFstab 117 117 LocateOldGrub 118 old_mountlist= /tmp/mountlist.original119 new_mountlist= /tmp/mountlist.txt118 old_mountlist=$MINDI_CACHE/mountlist.original 119 new_mountlist=$MINDI_CACHE/mountlist.txt 120 120 QuitIfNotFound $old_mountlist 121 121 QuitIfNotFound $new_mountlist -
branches/2.2.10/mondo/src/restore-scripts/mondo/stablilo-me
r567 r2462 91 91 92 92 WhatIsFirstDriveCalled() { 93 cut -d' ' -f1 /tmp/mountlist.txt \93 cut -d' ' -f1 $MINDI_CACHE/mountlist.txt \ 94 94 | sed s/[0-9]// | sed s/[0-9]// \ 95 95 | sort -u | head -n 1 … … 101 101 LogIt "stablilo-me --- starting" 102 102 LocateOldFstab 103 old_mountlist= /tmp/mountlist.original104 new_mountlist= /tmp/mountlist.txt103 old_mountlist=$MINDI_CACHE/mountlist.original 104 new_mountlist=$MINDI_CACHE/mountlist.txt 105 105 QuitIfNotFound $old_mountlist 106 106 QuitIfNotFound $new_mountlist -
branches/2.2.10/mondo/src/restore-scripts/mondo/stabraw-me
r1315 r2462 82 82 LogIt "stabraw-me --- starting" 83 83 LocateOldFstab 84 old_mountlist= /tmp/mountlist.original85 new_mountlist= /tmp/mountlist.txt84 old_mountlist=$MINDI_CACHE/mountlist.original 85 new_mountlist=$MINDI_CACHE/mountlist.txt 86 86 QuitIfNotFound $old_mountlist 87 87 QuitIfNotFound $new_mountlist -
branches/2.2.10/mondo/src/restore-scripts/mondo/unmount-me
r567 r2462 1 1 #!/bin/sh 2 2 3 mountlist= /tmp/mountlist.txt3 mountlist=$MINDI_CACHE/mountlist.txt 4 4 5 5 if [ "$#" -ne "0" ] ;then -
branches/2.2.10/mondo/test/test-mountlist.c
r2421 r2462 68 68 69 69 setup_newt_stuff(); 70 mr_asprintf(g_mountlist_fname, "/tmp/mountlist.txt");70 mr_asprintf(g_mountlist_fname, MINDI_CACHE"/mountlist.txt"); 71 71 log_it("before mountlist"); 72 72 load_mountlist(mountlist, g_mountlist_fname);
Note:
See TracChangeset
for help on using the changeset viewer.