Changeset 2462 in MondoRescue


Ignore:
Timestamp:
Oct 20, 2009, 4:07:00 PM (15 years ago)
Author:
Bruno Cornec
Message:

r3548@localhost: bruno | 2009-10-16 19:18:27 +0200

  • mindi now boots in a QEMU VM without busybox
  • mindi is now noarch as a consequence
  • MINDI_LIB becomes MINDI_DATA for coherency and as a consequence
  • CACHEDIR becomes MINDI_CACHE for coherency and it's a build parameter and not hardcoded anymore in mindi
  • THat variable is also used at restore time for mondorestore.cfg e.g.
  • FAILSAFE kernel is gone. Just use another kernel of your choice. Most std kernels work anyway
  • TurnTgzIntoRdz rewritten and now really computes data disk size and not suppose its size
  • Interface mondo/mindi changed again => incompatible
  • Non-bootable media not supported anymore.
  • Mondorescue adapted to these changes but not tested yet
  • Doc updated as well
Location:
branches/2.2.10
Files:
35 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mindi/deplist.d/minimal.conf

    r2445 r2462  
    1919/sbin/reboot
    2020/sbin/openvt
     21/usr/bin/openvt
    2122/usr/bin/tail
    2223/usr/bin/which
     
    2728/usr/bin/cut
    2829/usr/bin/basename
     30/bin/basename
    2931/usr/bin/find
    3032/bin/stty
    3133/bin/echo
     34/bin/chown
    3235/bin/mknod
    3336/bin/kill
  • branches/2.2.10/mindi/install.sh

    r2460 r2462  
    4343echo "mindi ${MINDIVER}-r${MINDIREV} will be installed under $local"
    4444
    45 if [ _"$CACHEDIR" = _"" ]; then
    46     CACHEDIR=$local/var/cache/mindi
     45if [ _"$MINDI_CACHE" = _"" ]; then
     46    localcache=$local/var/cache/mindi
    4747else
    48     CACHEDIR=${HEAD}$CACHEDIR
     48    localcache=${HEAD}$MINDI_CACHE
    4949fi
    5050if [ _"$MANDIR" = _"" ]; then
     
    5858    DOCDIR=${HEAD}$DOCDIR/mindi-$MINDIVER
    5959fi
    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"
     60if [ _"$DATADIR" = _"" ]; then
     61    localdata="$local/share"
     62    sublocaldata="$localdata/mindi"
    6563else
    66     locallib=${HEAD}$LIBDIR
    67     sublocallib="$LIBDIR/mindi"
     64    localdata=${HEAD}$DATADIR
     65    sublocaldata="$DATADIR/mindi"
    6866fi
    6967
    7068echo "Creating target directories ..."
    71 install -m 755 -d $conf $locallib/mindi $MANDIR $local/sbin $CACHEDIR $conf/deplist.d
     69install -m 755 -d $conf $localdata/mindi $MANDIR $local/sbin $localcache $conf/deplist.d
    7270
    7371echo "Copying files ..."
    74 cp -af rootfs $locallib/mindi
    75 chmod 755 $locallib/mindi/rootfs/sbin/*
    76 install -m 755 analyze-my-lvm $locallib/mindi
    77 install -m 644 msg-txt dev.tgz $locallib/mindi
     72cp -af rootfs $localdata/mindi
     73chmod 755 $localdata/mindi/rootfs/sbin/*
     74install -m 755 analyze-my-lvm $localdata/mindi
     75install -m 644 msg-txt dev.tgz $localdata/mindi
    7876install -m 644 deplist.conf deplist-minimal.conf udev.files proliant.files mindi.conf $conf
    7977for f in deplist.d/*.conf; do
     
    8583
    8684# 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
     85sed -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
     86sed -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
    8887chmod 755 $local/sbin/mindi $local/sbin/mindi-bkphw
    8988
     
    9493if [ "$ARCH" = "ia64" ] ; then
    9594    (cd $local/sbin && ln -sf parted2fdisk.pl parted2fdisk)
    96     install -s -m 755 $local/sbin/parted2fdisk.pl $locallib/mindi/rootfs/sbin/parted2fdisk
     95    install -s -m 755 $local/sbin/parted2fdisk.pl $localdata/mindi/rootfs/sbin/parted2fdisk
    9796else
    9897    # FHS requires fdisk under /sbin
    9998    (cd $local/sbin && ln -sf /sbin/fdisk parted2fdisk)
    10099    echo "Symlinking fdisk to parted2fdisk"
    101     ( cd $locallib/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk)
     100    ( cd $localdata/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk)
    102101fi
    103102
    104103if [ "$PKGBUILDMINDI" != "true" ]; then
    105     chown -R root:root $locallib/mindi $conf # $DOCDIR
    106     chown root:root $local/sbin/mindi $MANDIR/mindi.8 $locallib/mindi/analyze-my-lvm $local/sbin/parted2fdisk.pl
     104    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
    107106    if [ "$ARCH" = "ia64" ] ; then
    108107        chown root:root $local/sbin/parted2fdisk
  • branches/2.2.10/mindi/mindi

    r2460 r2462  
    2929MINDI_CONF=YYY
    3030MINDI_SBIN=${MINDI_PREFIX}/sbin
    31 MINDI_LIB=LLL
     31MINDI_DATA=LLL
     32MINDI_CACHE=CCC
    3233
    3334# Temporary directory for mindi
    3435TMPDIR=/tmp
    3536
    36 EXTRA_SPACE=60000       # increase if you run out of ramdisk space
     37EXTRA_SPACE=50000       # increase if you run out of ramdisk space
    3738BOOT_SIZE=24576         # size of the boot disk
    3839
     
    5859PCMCIA_MODS="pcmcia_core ds yenta_socket"
    5960USB_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"
     61NET_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"
    6162CDROM_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"
    6263# Those modules will only go on the backup media, not the boot media.
     
    6970
    7071LOGFILE=/var/log/mindi.log
    71 MINDI_CACHE=/var/cache/mindi
    7272BOOT_MEDIA_MESSAGE="\
    7373To format and restore all files automatically, type 'nuke' <enter>.\n\
     
    250250
    251251    # 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' '`
    253253    [ "$my_partitions" != "" ] && umount $my_partitions
    254254    # Clean temporary files only when standalone mindi
     
    433433
    434434FindSpecificModuleInPath() {
    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
    442437    if [ ! -e "$1" ] ; then
    443438        LogAll "WARNING - cannot search specific path '$1'"
     
    445440    fi
    446441    modpaths=`find $1 -name $2.*o -type f`
    447     #[ "$?" -ne "0" ] && Die "find $1 -name $2.o -type f --- failed"
    448442    [ "$modpaths" = "" ] && modpaths=`find $1 -name $2.o.gz -type f`
    449443    [ "$modpaths" = "" ] && modpaths=`find $1 -name $2.ko.gz -type f`
    450444    [ "$modpaths" = "" ] && modpaths=`find $1 -name $2 -type f`
    451445    echo "$modpaths"
    452     cd $pwd
    453446}
    454447
     
    694687
    695688
    696 HackPathsToFailsafe() {
    697     local incoming newpath stub i pwd
    698     incoming=`ReadLine`
    699     pwd=`pwd`
    700     cd $MINDI_TMP
    701     while [ "$incoming" != "" ] ; do
    702         stub=`basename $incoming`
    703         newpath=`FindSpecificModuleInPath lib/modules/$FAILSAFE_KVER $stub`
    704         for i in $newpath ; do
    705             echo "$i"
    706         done
    707         read incoming
    708     done
    709     cd $pwd
    710 }
    711 
    712 
    713689ListAllPartitions() {
    714690    local res currline partition all_partitions ap_orig remaining i j
     
    749725### Sq-Modification ... Use kernelname for module search path if specified
    750726###
    751     if [ "${kernelname}" != "" -a "${kernelname}" != "FAILSAFE" ]
     727    if [ "${kernelname}" != "" ]
    752728    then
    753729        kern=${kernelname}
     
    809785
    810786    for file in $incoming ; do
     787        if [ ! -f $file ]; then
     788            continue
     789        fi
    811790        echo "$file"
    812791        if [ ! -h $file ]; then
     
    907886
    908887
    909 # Called by TurnTgzIntoRdz, to make /tmp/mondo-restore.cfg
     888# Called by TurnTgzIntoRdz, to make mondorestore.cfg
    910889MakeMondoConfigFile() {
    911890    local outfile use_lzo use_comp use_star
     
    968947    if [ $LVM != "false" ]; then
    969948        LogFile "Analyzing LVM..."
    970         $MINDI_LIB/analyze-my-lvm > $MINDI_TMP/lvm.res
     949        $MINDI_DATA/analyze-my-lvm > $MINDI_TMP/lvm.res
    971950        if [ $? -ne 0 ]; then
    972951            LVM="false"
     
    980959    done
    981960    [ "$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 $LOGFILE
    983     printf "%-15s %-15s %-15s %-15s %15s\n" ------ ---------- ------  -------  ---------- | tee -a $LOGFILE
     961    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
    984963    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"
    985964    for c_p in $all_partitions ; do
     
    13431322    mkdir -p $MINDI_TMP/iso/{images,archives}
    13441323    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"
    13461325    for i in memdisk memtest.bin memtest.img ; do
    1347         j=$MINDI_LIB/$i
     1326        j=$MINDI_DATA/$i
    13481327        k=$MINDI_TMP/iso
    13491328        if [ -e "$j" ] ; then
     
    14241403    fi
    14251404    echo -en "."
    1426     LogFile "Unmounting $USBDEVICE just in case"
     1405    LogFile "Unmounting $USBPART just in case"
    14271406    umount $USBPART 2>> $LOGFILE 1>> $LOGFILE
    14281407    # If your key has no MBR it may cause an issue
     
    14541433    $FDISK -l $USBDEVICE 2>&1 | tee -a $LOGFILE
    14551434    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 "."
    14561439    LogFile "Creating a vfat filesystem on $USBPART"
    14571440    mkdosfs -F 32 $USBPART 2>&1 >> $LOGFILE
     
    14751458    cp -f $MINDI_CACHE/*.img $MINDI_CACHE/*.gz $MINDI_TMP/usb/images 2>> $LOGFILE || LogAll "OfferToMakeBootableUSB: Cannot copy $i to $MINDI_TMP/usb/images"
    14761459    echo -en "."
    1477     LogFile "mindi_lib = $MINDI_LIB"
     1460    LogFile "mindi_lib = $MINDI_DATA"
    14781461    for i in memdisk memtest.bin memtest.img ; do
    1479         j=$MINDI_LIB/$i
     1462        j=$MINDI_DATA/$i
    14801463        k=$MINDI_TMP/usb
    14811464        if [ -e "$j" ] ; then
     
    15281511        DESC=`head -1 $iss`
    15291512    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/"
    15311514    if [ _"$MONDO_SHARE" != _"" ]; then
    15321515        if [ "$CDRECOVERY" != "yes" ] ; then
     
    15351518            elif [ ! "$MINDI_TMP" ] ; then
    15361519                echo -en "FYI, this is _not_ a Mondo Rescue CD.\n"
    1537                 if [ -e "$MINDI_LIB/memtest.img" ] ; then
     1520                if [ -e "$MINDI_DATA/memtest.img" ] ; then
    15381521                 echo -en "Type 'memtest' <Enter> to test your PC's memory intensively.\nJust press <Enter> to go to the main test menu.\n"
    15391522                fi
     
    16181601    done
    16191602
    1620     if [ -e "$MINDI_LIB/memtest.img" ] ; then
     1603    if [ -e "$MINDI_DATA/memtest.img" ] ; then
    16211604        if [ "$type" = "elilo" ]; then
    16221605            echo -en "image=/memtest.bin\n\tlabel=memtest\n"
     
    16421625    [ ! -e "$kernelpath" ] && Die "PBDI - cannot find $kernelpath kernel"
    16431626    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?"
    16451628    echo -en "..."
    16461629    imagefile=$imagesdir/mindi-bootroot.$BOOT_SIZE.img
     
    16851668    fi
    16861669    MakeMessageFile > $mountpoint/message.txt
    1687 
    1688     mkdir -p $mountpoint/tmp
    1689     if [ -f "$MINDI_TMP/mondo-restore.cfg" ]; then
    1690         cp -f $MINDI_TMP/mondo-restore.cfg $mountpoint/tmp
    1691     fi
    16921670
    16931671    # copy the kernel across
     
    17141692    # make it bootable
    17151693    [ "$mountpoint" != "" ] && rm -f $mountpoint/zero
    1716     [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 2>> $LOGFILE
     1694    [ -e "$MINDI_DATA/memdisk" ] && cp -f $MINDI_DATA/memdisk $mountpoint 2>> $LOGFILE
    17171695    if [ "$KERN_DISK_MADE" ] ; then
    17181696        LogFile "Not running LILO. It's not that kind of disk."
     
    17481726    [ ! -e "$kernelpath" ] && Die "PBDI - cannot find $kernelpath kernel"
    17491727    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?"
    17511729    echo -en "..."
    17521730    imagefile=$MINDI_TMP/mindi-bootroot.$BOOT_SIZE.img
     
    17771755        LogAll "Cannot incorporate initrd.img in bootdisk (kernel / modules too big?)"
    17781756        retval=$(($retval+1))
    1779     fi
    1780 
    1781     mkdir -p $mountpoint/tmp
    1782     if [ -f "$MINDI_TMP/mondo-restore.cfg" ]; then
    1783         cp -f $MINDI_TMP/mondo-restore.cfg $mountpoint/tmp
    17841757    fi
    17851758
     
    18101783    [ "$mountpoint" != "" ] && rm -f $mountpoint/zero
    18111784    mkdir -p $mountpoint/etc
    1812     [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 2>> $LOGFILE
     1785    [ -e "$MINDI_DATA/memdisk" ] && cp -f $MINDI_DATA/memdisk $mountpoint 2>> $LOGFILE
    18131786    umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)"
    18141787    echo -en "..."
     
    18721845    res=$?
    18731846    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
    18961849    if [ "$res" -ne "0" ] ; then
    18971850        Die "You have $res files present in dependency list\nbut absent from filesystem."
     
    18991852    FindAndAddUserKeyboardMappingFile
    19001853    mkdir -p $bigdir/tmp
    1901     if [ _"$MONDO_SHARE" != _"" ]; then
    1902         MakeMondoConfigFile $MINDI_TMP/mondo-restore.cfg
    1903         cp -f $MINDI_TMP/mondo-restore.cfg $bigdir/tmp &> /dev/null
    1904     fi
    19051854    [ -d "/mnt/.boot.d" ] && echo "Oh Jebus" > $bigdir/tmp/DUMBASS-GENTOO
    19061855    DropOptimizedLibraries $needlist $bigdir
     
    19491898    echo -e "$DONE"
    19501899    TOTAL_BIGDIR_SIZE=`du -sk $bigdir | cut -f1`
    1951     MakeMountlist $MINDI_TMP/mountlist.txt
    1952     CheckMountlist $MINDI_TMP/mountlist.txt
    19531900    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" != _"" ]; then
    1956         cp -f $bigdir/tmp/mountlist.txt $MINDI_TMP/. 2>> $LOGFILE
    1957     fi
    19581901    if [ $LVM != "false" ]; then
    1959         $MINDI_LIB/analyze-my-lvm > $bigdir/tmp/i-want-my-lvm
     1902        $MINDI_DATA/analyze-my-lvm > $bigdir/tmp/i-want-my-lvm
    19601903        if [ "$?" -ne "0" ]; then
    19611904            LVM="false"
     
    19631906        fi
    19641907    fi
    1965     cat $bigdir/tmp/mountlist.txt >> $LOGFILE
    1966     LogFile "-----------------------------------"
    19671908
    19681909    LogFile -en "$FILES_IN_FILELIST" > $bigdir/FILES-IN-FILELIST
    1969     echo -en "$LAST_FILELIST_NUMBER" > $bigdir/LAST-FILELIST-NUMBER 2>> $LOGFILE
    19701910    if [ _"$MONDO_SHARE" != _"" ]; then
    19711911        for q in filelist.full.gz biggielist.txt ; do
     
    19781918    size_of_all_tools=`du -sk $bigdir | cut -f1`
    19791919    (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 "------------------------"
    19801922    du -sk $imagesdir/*gz >> $LOGFILE
     1923    LogFile "------------------------"
    19811924    echo -e "$DONE"
    19821925
     
    22112154
    22122155TurnTgzIntoRdz() {
    2213     local tgz_dir_fname rdz_fname tempfile mountpoint old_pwd nodes kernelsize maxsize res currsize not_copied j k s w needed_modules_path
     2156    local tgz_dir_fname rdz_fname tempfile mountpoint old_pwd nodes kernelsize res currsize not_copied j k s w needed_modules_path
    22142157
    22152158    tgz_dir_fname=$1
    22162159    rdz_fname=$2
    22172160    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
    22202306    tempfile=$MINDI_TMP/temp.rd
    22212307    mountpoint=$MINDI_TMP/mnt1
     
    22252311    echo -en "..."
    22262312    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"
    22282314    echo -en "..."
    22292315    mkdir -p $mountpoint
     
    22312317    echo -en "..."
    22322318    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
    22672335
    22682336    # Copy of files mandatory for ssh to automate mount if sshfs is used
    2269     mkdir $mountpoint/.ssh
    22702337    cp -rp ~root/.ssh/*.pub ~root/.ssh/config ~root/.ssh/known* $mountpoint/.ssh 2> /dev/null
    22712338    cat > $mountpoint/bin/myssh << EOF
     
    22742341    chmod 755 $mountpoint/bin/myssh
    22752342
    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
    24262350
    24272351    LogFile "---------------------------"
     
    25102434[ "$MINDI_PREFIX" = "XXX" ] && Die "Mindi has not been installed correctly."
    25112435LogFile "MONDO_SHARE = $MONDO_SHARE"
    2512 LogFile "MINDI_LIB = $MINDI_LIB"
     2436LogFile "MINDI_DATA = $MINDI_DATA"
    25132437LogFile "MINDI_SBIN = $MINDI_SBIN"
    25142438[ "$MINDI_CONF" = "YYY" ] && Die "Mindi has not been installed correctly."
     
    25472471    LogFile "However, you may wish to ask your vendor to provide a permanent fix..."
    25482472    LogFile " Or you might like to call 'su -' instead of 'su', for example."
    2549 fi
    2550 
    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" ]; then
    2553     source $MINDI_LIB/FindDistroFailsafe
    2554     # Log kernel image
    2555     LogAll "FAILSAFE kernel image to be used is: $FAILSAFE_KBIN ($FAILSAFE_KVER)"
    2556 else
    2557     [ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | grep -E "2\.[46]" | cut -d' ' -f1`
    25582473fi
    25592474
     
    27592674        LogAll "kernelname = $kernelname"
    27602675        LogAll "kernelpath = $kernelpath"
    2761         if [ ! -d "/lib/modules/$kernelname" ] && [ "$kernelpath" != "FAILSAFE" ]
     2676        if [ ! -d "/lib/modules/$kernelname" ]
    27622677        then
    27632678           LogAll "Module path for ${kernelpath} not found..."
     
    27842699    #       LogAll "LILO will use conservative settings, to be compatible with older BIOSes."
    27852700        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}"
    27972710        [ "$USE_COMP" = "" ] && USE_COMP=yes
    27982711        [ "$USE_GZIP" = "" ] && USE_GZIP=no
    27992712        [ "$USE_LZMA" = "" ] && USE_LZMA=no
    2800         [ "$NOT_BOOT" = "" ] && NOT_BOOT=no
    28012713        [ "$TAPEDEV" ] && LogAll "This is a tape-based backup. Fine."
    28022714        [ "$kernelpath" = "" ] && kernelpath=`TryToFindKernelPath`
    28032715        kernelname=`echo $kernelpath | cut -d'-' -f2-`
    2804         if [ ! -d "/lib/modules/$kernelname" ] && [ "$kernelpath" != "FAILSAFE" ]
     2716        if [ ! -d "/lib/modules/$kernelname" ]
    28052717        then
    28062718           LogAll "Module path for ${kernelpath} not found..."
     
    28302742[ "$CDRECOVERY" = "yes" ] || CDRECOVERY=no
    28312743
    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
     2744LogAll "Mindi Linux mini-distro generator v$MINDI_VERSION"
     2745LogAll "Latest Mindi is available from http://www.mondorescue.org"
     2746LogAll "------------------------------------------------------------------------------"
    28442747
    28452748KERN_DISK_MADE=""
     
    28472750LogFile "DIFFERENTIAL = $DIFFERENTIAL"
    28482751LogFile "INTERNAL TAPE BLOCK SIZE = $INTERNAL_TAPE_BLOCK_SIZE"
    2849 LogFile "NOT_BOOT = '$NOT_BOOT'"
    2850 if [ "$NOT_BOOT" != "" ] && [ "$NOT_BOOT" != "0" ] && [ "$NOT_BOOT" != "no" ] ; then
    2851     LogAll "Just creating mondo-restore.cfg and a small all.tar.gz for Mondo. Nothing else."
    2852     MakeMondoConfigFile $MINDI_TMP/mondo-restore.cfg
    2853     MakeMountlist $MINDI_TMP/mountlist.txt
    2854     CheckMountlist $MINDI_TMP/mountlist.txt
    2855     mkdir -p $MINDI_TMP/small-all/tmp
    2856     cd $MINDI_TMP/small-all
    2857     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/$$.log
    2859     sleep 2
    2860     LogAll "Done. Exiting."
    2861     MindiExit 0
    2862 fi
    28632752
    28642753if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ "$USBDEVICE" != "" ]; then
     
    28762765    fi
    28772766    if [ "$USE_OWN_KERNEL" = "yes" ]; then
    2878         YOUR_KERNEL_SUCKS=""
    28792767        kernelpath=`TryToFindKernelPath`
    28802768        if [ "$kernelpath" = "" ] ; then
     
    28822770            read kernelpath
    28832771        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
    29152773fi
    29162774LogFile "Mindi's temp dir=$MINDI_TMP"
     
    29182776[ "$(($RANDOM%64))" -eq "0" ] && LogAll "Dude, I've looked inside your computer and it's really dusty..."
    29192777
    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 
    29222778PrepareDataDiskImages
    29232779
    2924 ramdisk_size=$(($size_of_all_tools+$EXTRA_SPACE))
    2925 rds=$(($ramdisk_size-$((ramdisk_size%4096))))
    2926 export ramdisk_size=$rds
     2780export ramdisk_size=$(($size_of_all_tools+$EXTRA_SPACE))
    29272781
    29282782LogFile "Ramdisk will be $ramdisk_size KB"
     
    29332787fi
    29342788
    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\
    29362790...Or type 'memtest' to test your PC's RAM thoroughly.\n"
    29372791
  • branches/2.2.10/mindi/mindi-bkphw

    r2446 r2462  
    8989    close(SCRIPT);
    9090} else {
    91     print "\nWARNING: No Hardware support for $productname. Not a big issue, just less features and risks ;-)\n";
     91    print "\nWARNING: No Hardware support for $productname.\nNot a big issue, just less features and risks ;-)\n";
    9292    print "You may ask your manufacturer to contribute to the mindi project\n";
    9393}
  • branches/2.2.10/mindi/rootfs/sbin/find-and-mount-cdrom

    r2445 r2462  
    77    for device in /dev/hd? /dev/scd? /dev/rcd? /dev/sr? /dev/cd? /dev/ide/*/*/*/*/cd /dev/scsi/*/*/*/*/cd; do
    88        [ ! "$SECOND_TRY" ] && LogIt "Trying $device"
    9         if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg 2> /dev/null`" ]; then
     9        if [ "`grep "using-cdstream yes" $MINDI_CACHE/mondorestore.cfg 2> /dev/null`" ]; then
    1010            pwd=`pwd`
    1111            cd $GROOVY
     
    7575fi
    7676[ "$1" = "--second-try" ] && exit 1;
    77 if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg 2 > /dev/null`" ] ; then
     77if [ "`grep "using-cdstream yes" $MINDI_CACHE/mondorestore.cfg 2 > /dev/null`" ] ; then
    7878    LogIt "Because you are using cdstream, I won't try to mount CD."
    7979    exit 0
  • branches/2.2.10/mindi/rootfs/sbin/hack-cfg-if-necessary

    r1983 r2462  
    1616LogIt "OK, we've found /mnt/cdrom/archives/*; great."
    1717
    18 if ! grep "backup-media-type iso" /tmp/mondo-restore.cfg 2 > /dev/null ; then
     18if ! grep "backup-media-type iso" $MINDI_CACHE/mondorestore.cfg 2 > /dev/null ; then
    1919    LogIt "Config file is fine, BTW."
    2020    exit 0
    2121fi
    2222
    23 LogIt "Re-jigging mondo-restore.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/' /tmp/mondo-restore.cfg
     23LogIt "Re-jigging mondorestore.cfg because you backed up to ISOs and then burned them to CDs" 1
     24sed -i 's/backup-media-type iso/backup-media-type cdr/' $MINDI_CACHE/mondorestore.cfg
    2525LogIt "Done re-jigging. Yay."
    2626exit 0
  • branches/2.2.10/mindi/rootfs/sbin/init

    r2445 r2462  
    55# init script launched during the restore process
    66#------------------------------------------------------------
     7
     8export MINDI_CACHE=CCC
    79
    810if [ -e "/proc/cmdline" ]; then
     
    117119    cd $GROOVY
    118120    [ "$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`
    120122    mt -f $tapedev rewind
    121123    mt -f $tapedev fsf 2
     
    124126    if [ "$res" -eq "0" ] ; then
    125127        # Store the dev name in case we changed it interactively
    126         if [ -f "/tmp/mondo-restore.cfg" ]; then
    127             sed -i "s/^media-dev .*$/media-dev  $tapedev/" /tmp/mondo-restore.cfg
     128        if [ -f "$MINDI_CACHE/mondorestore.cfg" ]; then
     129            sed -i "s/^media-dev .*$/media-dev  $tapedev/" $MINDI_CACHE/mondorestore.cfg
    128130        fi
    129131    fi
     
    340342        return
    341343    fi
    342     if [ -x ./mindi-rsthw ]; then
     344    if [ -x $MINDI_CACHE/mindi-rsthw ]; then
    343345        grep -q RESTORE $CMDLINE
    344346        if [ "$?" -ne 0 ]; then
     
    354356        fi
    355357        if [ "$answer" = "YES" ] ; then
    356             ./mindi-rsthw
     358            $MINDI_CACHE/mindi-rsthw
    357359        fi
    358360    fi
     
    454456        return;
    455457    fi
    456     if [ "`grep mpath /tmp/mountlist.txt`" ]; then
     458    if [ "`grep mpath $MINDI_CACHE/mountlist.txt`" ]; then
    457459        if [ -x /sbin/multipath ]; then
    458460            echo "Starting Mpath..."
     
    478480    fi
    479481
    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`
    481483    if which raidstart > /dev/null 2> /dev/null ; then
    482484        for i in $raid_devices ; do
     
    537539    local res
    538540    mount | grep /mnt/cdrom && return 0
    539     [ "`grep "backup_media_type" /tmp/mondo-restore.cfg 2> /dev/null | grep "cdstream"`" ] && return
     541    [ "`grep "backup_media_type" $MINDI_CACHE/mondorestore.cfg 2> /dev/null | grep "cdstream"`" ] && return
    540542    LogIt "Trying to mount CD-ROM a 2nd time..."
    541543    find-and-mount-cdrom --second-try
     
    641643    # Retry failed udev events now that local filesystems are mounted read-write
    642644    # (useful for rules creating network ifcfg files)
    643     if [ -e "/tmp/USE-UDEV" ] ; then
     645    if [ -e "$MINDI_CACHE/USE-UDEV" ] ; then
    644646        if [ -x /sbin/udevadm ]; then
    645647            /sbin/udevadm trigger --retry-failed
     
    681683    export DENY_MODS=" "
    682684fi
    683 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg 2> /dev/null`" ]; then
     685if [ "`grep -i 'obdr ' $MINDI_CACHE/mondorestore.cfg 2> /dev/null`" ]; then
    684686    # Do not try to load usb storage when dealing with OBDR it makes the modprobe hang :-(
    685687    export DENY_MODS="usb-storage $DENY_MODS"
     
    702704fi
    703705
    704 if [ -e "/tmp/USE-UDEV" ] ; then
     706if [ -e "$MINDI_CACHE/USE-UDEV" ] ; then
    705707    RunUdevd
    706708fi
     
    719721#-------------------------------
    720722UseTmpfs
    721 if [ ! -e "/tmp/mondo-restore.cfg" ] ; then
    722     LogIt "Warning - /tmp/mondo-restore.cfg not found"
     723if [ ! -e "$MINDI_CACHE/mondorestore.cfg" ] ; then
     724    LogIt "Warning - $MINDI_CACHE/mondorestore.cfg not found"
    723725fi
    724726if [ "`grep -i pxe $CMDLINE`" ] || [ "`grep -i net $CMDLINE`" ]; then
     
    727729fi
    728730
    729 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg 2>/dev/null`" ] || [ "`grep -i ' udev' /tmp/mondo-restore.cfg 2>/dev/null`" ]; then
     731if [ "`grep -i 'obdr ' $MINDI_CACHE/mondorestore.cfg 2>/dev/null`" ] || [ "`grep -i ' udev' $MINDI_CACHE/mondorestore.cfg 2>/dev/null`" ]; then
    730732    HandleTape
    731733    ExtractDataDisksAndLoadModules
     
    736738    ExtractDataDisksAndLoadModules
    737739    # 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.cfg
    739 elif [ "`grep -i usb= $CMDLINE`" ] || [ "`grep -i usb /tmp/mondo-restore.cfg 2>/dev/null | grep media-type`" ]; then
     740    sed -i "s/backup-media-type.*/backup-media-type netfs/" $MINDI_CACHE/mondorestore.cfg
     741elif [ "`grep -i usb= $CMDLINE`" ] || [ "`grep -i usb $MINDI_CACHE/mondorestore.cfg 2>/dev/null | grep media-type`" ]; then
    740742    . /sbin/start-usb
    741743
     
    752754res=$?
    753755ConfigureLoggingDaemons
    754 if [ -e "/tmp/USE-DEVFS" ] ; then
     756if [ -e "$MINDI_CACHE/USE-DEVFS" ] ; then
    755757    umount /mnt/cdrom 2> /dev/null
    756758    mv /dev/cdrom /cdrom.lnk 2> /dev/null
     
    769771mkdir -p /tmp/tmpfs
    770772sleep 2
    771 if [ -e "/dev/md0" ] && [ ! -e "/dev/md/0" ] && [ "`grep /dev/md/ /tmp/mountlist.txt`" != "" ] ; then
     773if [ -e "/dev/md0" ] && [ ! -e "/dev/md/0" ] && [ "`grep /dev/md/ $MINDI_CACHE/mountlist.txt`" != "" ] ; then
    772774    LogIt "Creating /dev/md/* softlinks just in case." 1
    773775    mkdir -p /dev/md
     
    776778    cp -af /dev/md2 /dev/md/2 2> /dev/null
    777779fi
    778 [ -e "/tmp/mountlist.txt" ] && cp -f /tmp/mountlist.txt /tmp/mountlist.original
     780[ -e "$MINDI_CACHE/mountlist.txt" ] && cp -f $MINDI_CACHE/mountlist.txt $MINDI_CACHE/mountlist.original
    779781
    780782if ! [ "`grep -i "pxe" $CMDLINE`" ] ; then
     
    843845    fi
    844846fi
    845 if grep "backup-media-type" /tmp/mondo-restore.cfg > /dev/null 2> /dev/null ; then
     847if grep "backup-media-type" $MINDI_CACHE/mondorestore.cfg > /dev/null 2> /dev/null ; then
    846848    LogIt "backup-media-type is specified in config file - great."
    847849    LogIt "Calling post-init"
  • branches/2.2.10/mindi/rootfs/sbin/post-init

    r2378 r2462  
    77sleep 1
    88
    9 echo "Here is my /tmp/mountlist.txt" >> $LOGFILE
    10 cat /tmp/mountlist.txt >> $LOGFILE
     9echo "Here is my $MINDI_CACHE/mountlist.txt" >> $LOGFILE
     10cat $MINDI_CACHE/mountlist.txt >> $LOGFILE
     11echo "-----------------------------------" >> $LOGFILE
     12
    1113
    1214iso=`grep iso $CMDLINE`
     
    4547
    4648mondoopt=""
    47 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg 2> /dev/null`" ]; then
     49if [ "`grep -i 'obdr ' $MINDI_CACHE/mondorestore.cfg 2> /dev/null`" ]; then
    4850    mondoopt="$mondoopt -o -d $TAPEDEV"
    4951fi
     
    6062    mondorestore $mondoopt -Z nuke
    6163elif [ "$expert" ] ; then
    62     if [ "`grep tapedev /tmp/mondo-restore.cfg 2> /dev/null`" ] ; then
     64    if [ "`grep tapedev $MINDI_CACHE/mondorestore.cfg 2> /dev/null`" ] ; then
    6365    LogIt "-------------------TAPE MODE-------------------" 1
    6466    loc=`which mondorestore 2> /dev/null`
     
    7375            fi
    7476    fi
    75     elif [ "`grep using-cdstream /tmp/mondo-restore.cfg 2> /dev/null`" ] ; then
     77    elif [ "`grep using-cdstream $MINDI_CACHE/mondorestore.cfg 2> /dev/null`" ] ; then
    7678        LogIt "------------------CDSTREAM MODE------------------" 1
    7779        loc=`which mondorestore 2> /dev/null`
  • branches/2.2.10/mindi/rootfs/sbin/start-netfs

    r2444 r2462  
    1111
    1212# 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-`
     13ipdev=`grep netfs-dev $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     14ipaddress=`grep netfs-client-ipaddr $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     15ipnetmask=`grep netfs-client-netmask $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     16ipbroadcast=`grep netfs-client-broadcast $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     17ipgateway=`grep netfs-client-defgw $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     18proto=`grep netfs-proto $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
    1919ipconf=""
    2020pre=""
    2121post=""
    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-`
     22export netfsmount=`grep netfs-server-mount $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     23export imgname=`grep iso-prefix $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
    2424if [ "$imgname" = "" ]; then
    2525    export imgname="mondorescue"
    2626fi
    27 export dirimg=`grep netfs-server-path /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     27export dirimg=`grep netfs-server-path $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
    2828if [ "$dirimg" = "" ]; then
    2929    export dirimg="/"
  • branches/2.2.10/mindi/rootfs/sbin/start-usb

    r2329 r2462  
    77
    88# Get info from config file
    9 MRUSBDEV=`grep usb-dev /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     9MRUSBDEV=`grep usb-dev $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
    1010
    1111# info from cmdline are predominent
  • branches/2.2.10/mondo-doc/mondoarchive.8

    r2382 r2462  
    210210.TP
    211211.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.
     212Path of user's kernel, if you want to use another one than the running one.
    215213
    216214.TP
  • branches/2.2.10/mondo-doc/mondorescue-howto.sgml

    r2445 r2462  
    340340in the 'exclude directories' dialog box. Please put a space in
    341341between 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 users
    353 should in general say 'yes' because these vendors are good at
    354 producing reliable kernels. If you are using Gentoo or LFS
    355 then your kernel might be non-standard, in which case say 'no' to
    356 use Mondo's failsafe kernel (provided separately).
    357342</entry>
    358343</row>
     
    14111396</tbody></tgroup></informaltable>
    14121397
    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 2
    1422 
    1423 </entry>
    1424 </row>
    1425 </tbody></tgroup></informaltable>
    1426 
    1427 <para>If you have problems during the restore phase, due to your kernel
    1428         (which may be the case on some distributions), you may want to explore the Failsafe
    1429         approach, In order for this option to work you'll have to get
    1430         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/nfs
    1440 </entry>
    1441 </row>
    1442 <row>
    1443         <entry>
    1444         bash# mondoarchive -OVn nfs://192.168.1.3:/home/nfs -g -s 200m
    1445 </entry>
    1446 </row>
    1447 <row>
    1448         <entry>
    1449         bash# umount /mnt/nfs
    1450 
    1451 </entry>
    1452 </row>
    1453 </tbody></tgroup></informaltable>
    1454 
    1455 <para>The resultant ISO's can be burned to CD's if you want (which
    1456 isn't a good idea unless you're a Mondo expert because they'll try
    1457 to restore over a network by default, which is silly because the
    1458 archives are on the CD's). Or, you can boot from the Mindi media
    1459 (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 this
    1461         to work, please refer to the file README.pxe provided with
    1462         your mindi package.
    1463 </para>
    14641398</sect2>
    14651399</sect1>
     
    21562090<para>Mondo (technically, Mindi on behalf of Mondo) creates a file
    21572091called 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>
    21592093<para></para>
    21602094<informaltable><tgroup cols="1"><tbody>
     
    22692203automatically partition and format your disks for you, including
    22702204the RAID devices.</para>
    2271 <para>Once you have finished editing /tmp/mountlist.txt using
     2205<para>Once you have finished editing /var/cache/mindi/mountlist.txt using
    22722206mondorestore's built-in editor then you may choose 'OK'. Please
    22732207note that this will not write anything to your hard disk. You will
     
    26172551<qandaentry>
    26182552<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 Debian
    2620 distro. What do I do?</para></question>
    2621 <answer>
    2622 <para>A: Ask Debian's designers why they, unlike every other distro
    2623 I can find, have included cramfs and other 'goodies' with their
    2624 kernel. In the meantime, please use '-k FAILSAFE' in your command
    2625 line when calling Mondo.</para>
    2626 <para>A: From Sarge onwards, all stock Debian 2.6 kernels should work fine. If
    2627 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 really
    2630 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 something
    2636 similar. What do I do?</para></question>
    2637 <answer>
    2638 <para>A: Recompile your kernel (or use '-k FAILSAFE'). Take a look
    2639 at <link linkend="overview-sysrq-kernelreq">Linux Kernel support</link> to
    2640 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,
    26452553                it says, "UPGRADE YOUR RAM". What does that mean?</para></question>
    26462554<answer>
     
    26742582in lilo and speeds up booting, for more info see the lilo man
    26752583page.</para>
    2676 </answer>
    2677 </qandaentry>
    2678 <qandaentry>
    2679 <question><para>Q: I made a Mondo CD using the failsafe
    2680 kernel (i.e. I said 'no' when Mondo asked if I wanted to use my own
    2681 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 Mondo
    2684 (technically, with Mindi, which Mondo uses) to make sure that users
    2685 could use Mondo despite flaws in their own kernels. If you are
    2686 using Mondo/Mindi's kernel but still cannot boot from your Mondo CD
    2687 then please e-mail the &ML;.</para>
    26882584</answer>
    26892585</qandaentry>
     
    29632859        <para>
    29642860                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'
    29662862to see what Mindi says. Send the log to the &ML; if you get stuck.
    29672863</para>
  • branches/2.2.10/mondo/src/common/libmondo-archive.c

    r2460 r2462  
    513513    char *bootldr_str = NULL;
    514514    char *tape_device = NULL;
    515     char *last_filelist_number = NULL;
    516515    char *broken_bios_sz = NULL;
    517516    char *cd_recovery_sz = NULL;
     
    546545    }
    547546    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);
    552547    mr_free(tmp);
    553548
     
    805800            (bkpinfo->image_devs == NULL) ? "\"\"" : bkpinfo->image_devs,   // parameter #10
    806801            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)
    817811            MONDO_LOGFILE);
    818812
    819813    mr_free(tmp2);
    820     mr_free(last_filelist_number);
    821814    mr_free(tape_device);
    822815    mr_free(use_lzo_sz);
  • branches/2.2.10/mondo/src/common/libmondo-cli.c

    r2444 r2462  
    671671        mr_free(bkpinfo->kernel_path);
    672672        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)) {
    678674            retval++;
    679675            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  
    27312731                paranoid_fclose(fin);
    27322732            } else {
    2733                 if (does_file_exist("/tmp/mondo-restore.cfg")) {
     2733                if (does_file_exist(MINDI_CACHE"/mondorestore.cfg")) {
    27342734                    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");
    27362736                }
    27372737            }
     
    30753075            ("Will you want to verify your backups after Mondo has created them?");
    30763076
    3077 #ifndef __FreeBSD__
    3078         if (!ask_me_yes_or_no
    3079             ("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 #endif
    3081         {
    3082             mr_free(bkpinfo->kernel_path);
    3083             mr_asprintf(bkpinfo->kernel_path, "FAILSAFE");
    3084         }
    3085 
    30863077        if (!ask_me_yes_or_no
    30873078            ("Are you sure you want to proceed? Hit 'no' to abort.")) {
  • branches/2.2.10/mondo/src/common/libmondo-filelist.c

    r2444 r2462  
    322322    mr_free(biggie_fname);
    323323
    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);
    331326    mr_free(tmp);
    332     mr_free(outfname);
    333327
    334328    if (curr_set_no == 0) {
     
    708702    assert(bkpinfo != NULL);
    709703
    710     mr_asprintf(cfg_fname, "%s/mondo-restore.cfg", bkpinfo->tmpdir);
     704    mr_asprintf(cfg_fname, "%s/mondorestore.cfg", MINDI_CACHE);
    711705    val_sz = read_cfg_var(cfg_fname, "last-filelist-number");
    712706    mr_free(cfg_fname);
  • branches/2.2.10/mondo/src/common/libmondo-files.c

    r2406 r2462  
    705705
    706706/**
    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.
    708708 * @param tmpdir The tempdir where the mountlist is stored.
    709709 * @param dev The device to search for.
     
    717717    long file_len_K;
    718718
    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);
    721721    mr_free(mountlist);
    722722
     
    992992 * Copy the files that Mondo/Mindi need to run to the scratchdir or tempdir.
    993993 * Currently this includes: copy Mondo's home directory to scratchdir,
    994  * copy LAST-FILELIST-NUMBER to scratchdir, copy post-nuke.tgz (if it exists) to tmpdir,
     994 * copy post-nuke.tgz (if it exists) to tmpdir,
    995995 * and run "hostname > scratchdir/HOSTNAME".
    996996 * @param bkpinfo The backup information structure. Fields used:
     
    10201020    if (res) {
    10211021        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");
    10301022    }
    10311023
  • branches/2.2.10/mondo/src/common/libmondo-stream.c

    r2405 r2462  
    856856    (void) getcwd(old_cwd, MAX_STR_LEN);
    857857    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);
    859859    paranoid_system(tmp);
    860860    mr_free(tmp);
    861861
    862     paranoid_system("cp -f tmp/mondo-restore.cfg . 2> /dev/null");
     862    paranoid_system("cp -f ."MINDI_CACHE"/mondorestore.cfg . 2> /dev/null");
    863863    chdir(old_cwd);
    864864    unlink(outfname);
  • branches/2.2.10/mondo/src/common/libmondo-tools.c

    r2444 r2462  
    10711071/**
    10721072 * 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.
    10741074 * @param label What to read from the file.
    10751075 * @param value Where to put it.
     
    12941294 * Write a line to a configuration file. Writes a line of the form,
    12951295 * @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.
    12971297 * @param label What to call this bit of data you're writing.
    12981298 * @param value The bit of data you're writing.
  • branches/2.2.10/mondo/src/common/mondostructures.h

    r2428 r2462  
    557557
    558558  /**
    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.
    561560   */
    562561    char *kernel_path;
  • branches/2.2.10/mondo/src/include/my-stuff.h

    r2420 r2462  
    7474 * The location where mindi media images are stored.
    7575 */
    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
    7778
    7879/**
  • branches/2.2.10/mondo/src/mondorestore/mondo-prep.c

    r2405 r2462  
    15731573    if (pout_to_fdisk) {
    15741574        // 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");
    15761576        mr_asprintf(tmp, "a\n%s\n", tmp1);
    15771577        mr_free(tmp1);
  • branches/2.2.10/mondo/src/mondorestore/mondo-rstr-compare.c

    r2420 r2462  
    649649    chdir(bkpinfo->restore_path);
    650650
    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 
    655651    mvaddstr_and_log_it(g_currentY,
    656652                        0, "Verifying archives against filesystem");
     
    705701    getcwd(dir, MAX_STR_LEN);
    706702    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);
    710703
    711704    mvaddstr_and_log_it(g_currentY,
  • branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools.c

    r2451 r2462  
    2626 * The mountlist stub (appended to the directory where all.tar.gz was unpacked).
    2727 */
    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).
    3232 */
    33 #define MONDO_CFG_FILE_STUB "tmp/mondo-restore.cfg"
     33#define MONDO_CFG_FILE_STUB MINDI_CACHE_REL"/mondorestore.cfg"
    3434/**
    3535 * The i-want-my-lvm stub
     
    157157
    158158/**
    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.
    160160* @param bkpinfo The backup information structure. @c tmpdir is the only field used.
    161161* @param ramdisk_fname The filename of the @b compressed ramdisk to look in.
     
    167167
    168168/**
    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.
    170170*/
    171171void get_cfg_file_from_archive_or_bust()
     
    678678/**
    679679* 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.
    681681* @param bkpinfo The backup information structure to fill out with information
    682682* from @p cfg_file.
     
    15741574        if (!run_program_and_log_output("which grub-MR", FALSE)) {
    15751575            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);
    15771577            log_msg(1, "command = %s", command);
    15781578        } else {
     
    18721872    } else {
    18731873        /* 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);
    18751875        log_msg(2, "run_raw_mbr() --- command='%s'", command);
    18761876
     
    21282128
    21292129/**
    2130  * Extract mondo-restore.cfg and the mountlist from the tape inserted
     2130 * Extract mondorestore.cfg and the mountlist from the tape inserted
    21312131 * to the ./tmp/ directory.
    21322132 * @param dev The tape device to read from.
     
    22612261            mr_free(tmp);
    22622262
    2263             if (!does_file_exist("tmp/mondo-restore.cfg")) {
     2263            if (!does_file_exist(MINDI_CACHE_REL"/mondorestore.cfg")) {
    22642264                log_to_screen("Cannot find config info on media");
    22652265                return (1);
     
    23452345    }
    23462346
    2347     log_to_screen("Recovered mondo-restore.cfg");
     2347    log_to_screen("Recovered mondorestore.cfg");
    23482348    if (!does_file_exist(MOUNTLIST_FNAME_STUB)) {
    23492349        log_to_screen("...but not mountlist.txt - a pity, really...");
  • branches/2.2.10/mondo/src/mondorestore/mondorestore.c

    r2405 r2462  
    102102
    103103/**
    104  * The location of 'mondo-restore.cfg', containing the metadata
     104 * The location of 'mondorestore.cfg', containing the metadata
    105105 * information for this backup.
    106106 */
     
    162162    assert(raidlist != NULL);
    163163    if (!bkpinfo->disaster_recovery) {
    164         strcpy(g_mountlist_fname, "/tmp/mountlist.txt");
     164        strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt");
    165165        log_msg(2, "I guess you're testing edit_mountlist()");
    166166    }
     
    20742074
    20752075    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");
    20772077    if (g_current_media_number != 1) {
    20782078        log_msg(3, "OK, that's jacked up.");
     
    26952695        load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
    26962696        if (!does_file_exist(g_mountlist_fname)) {
    2697             strcpy(g_mountlist_fname, "/tmp/mountlist.txt");
     2697            strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt");
    26982698        }
    26992699        res = let_user_edit_the_mountlist(mountlist, raidlist);
     
    27952795        log_msg(0, "Partitioning only.");
    27962796        load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
    2797         strcpy(g_mountlist_fname, "/tmp/mountlist.txt");
     2797        strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt");
    27982798        load_mountlist(mountlist, g_mountlist_fname);
    27992799        res = partition_everything(mountlist);
     
    28042804        log_msg(0, "Formatting only.");
    28052805        load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
    2806         strcpy(g_mountlist_fname, "/tmp/mountlist.txt");
     2806        strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt");
    28072807        load_mountlist(mountlist, g_mountlist_fname);
    28082808        res = format_everything(mountlist, FALSE, raidlist);
     
    28132813        log_msg(0, "Stopping LVM and RAID");
    28142814        load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
    2815         strcpy(g_mountlist_fname, "/tmp/mountlist.txt");
     2815        strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt");
    28162816        load_mountlist(mountlist, g_mountlist_fname);
    28172817        res = do_my_funky_lvm_stuff(TRUE, FALSE);
  • branches/2.2.10/mondo/src/restore-scripts/mondo/format-and-kludge-vfat

    r2186 r2462  
    115115umount /mnt/tmpK || Die "Can't unmount /mnt/tmpK"
    116116
    117 ideal_size=`grep "$device " /tmp/mountlist.txt | tr -s ' ' ' ' | cut -d' ' -f4`
     117ideal_size=`grep "$device " $MINI_CACHE/mountlist.txt | tr -s ' ' ' ' | cut -d' ' -f4`
    118118if [ "$ideal_size" = "" ]; then
    119119    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  
    9393
    9494if [ "$#" -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"
    9696fi
    9797[ ! -f "$2" ] && Die "mountlist file not found"
  • branches/2.2.10/mondo/src/restore-scripts/mondo/label-partitions-as-necessary

    r2172 r2462  
    5555LogIt "Identifying your drives with tune2fs"
    5656if [ "$#" -ne "1" ] ; then
    57     LogIt "label-partitions-as-necessary /tmp/mountlist.txt < /tmp/fstab.new" 1
     57    LogIt "label-partitions-as-necessary $MINDI_CACHE/mountlist.txt < /tmp/fstab.new" 1
    5858    exit 1
    5959fi
  • branches/2.2.10/mondo/src/restore-scripts/mondo/mount-me

    r680 r2462  
    11#!/bin/sh
    22
    3 mountlist=/tmp/mountlist.txt
     3mountlist=$MINDI_CACHE/mountlist.txt
    44
    55if [ "$#" -ne "0" ] ;then
  • branches/2.2.10/mondo/src/restore-scripts/mondo/stabelilo-me

    r1567 r2462  
    122122
    123123WhatIsFirstDriveCalled() {
    124     cut -d' ' -f1 /tmp/mountlist.txt \
     124    cut -d' ' -f1 $MINDI_CACHE/mountlist.txt \
    125125| sed s/[0-9]// | sed s/[0-9]// \
    126126| sort -u | head -n 1
     
    133133LocateOldFstab
    134134LocateOldElilo
    135 old_mountlist=/tmp/mountlist.original
    136 new_mountlist=/tmp/mountlist.txt
     135old_mountlist=$MINDI_CACHE/mountlist.original
     136new_mountlist=$MINDI_CACHE/mountlist.txt
    137137QuitIfNotFound $old_mountlist
    138138QuitIfNotFound $new_mountlist
  • branches/2.2.10/mondo/src/restore-scripts/mondo/stabgrub-me

    r2451 r2462  
    116116LocateOldFstab
    117117LocateOldGrub
    118 old_mountlist=/tmp/mountlist.original
    119 new_mountlist=/tmp/mountlist.txt
     118old_mountlist=$MINDI_CACHE/mountlist.original
     119new_mountlist=$MINDI_CACHE/mountlist.txt
    120120QuitIfNotFound $old_mountlist
    121121QuitIfNotFound $new_mountlist
  • branches/2.2.10/mondo/src/restore-scripts/mondo/stablilo-me

    r567 r2462  
    9191
    9292WhatIsFirstDriveCalled() {
    93     cut -d' ' -f1 /tmp/mountlist.txt \
     93    cut -d' ' -f1 $MINDI_CACHE/mountlist.txt \
    9494| sed s/[0-9]// | sed s/[0-9]// \
    9595| sort -u | head -n 1
     
    101101LogIt "stablilo-me --- starting"
    102102LocateOldFstab
    103 old_mountlist=/tmp/mountlist.original
    104 new_mountlist=/tmp/mountlist.txt
     103old_mountlist=$MINDI_CACHE/mountlist.original
     104new_mountlist=$MINDI_CACHE/mountlist.txt
    105105QuitIfNotFound $old_mountlist
    106106QuitIfNotFound $new_mountlist
  • branches/2.2.10/mondo/src/restore-scripts/mondo/stabraw-me

    r1315 r2462  
    8282LogIt "stabraw-me --- starting"
    8383LocateOldFstab
    84 old_mountlist=/tmp/mountlist.original
    85 new_mountlist=/tmp/mountlist.txt
     84old_mountlist=$MINDI_CACHE/mountlist.original
     85new_mountlist=$MINDI_CACHE/mountlist.txt
    8686QuitIfNotFound $old_mountlist
    8787QuitIfNotFound $new_mountlist
  • branches/2.2.10/mondo/src/restore-scripts/mondo/unmount-me

    r567 r2462  
    11#!/bin/sh
    22
    3 mountlist=/tmp/mountlist.txt
     3mountlist=$MINDI_CACHE/mountlist.txt
    44
    55if [ "$#" -ne "0" ] ;then
  • branches/2.2.10/mondo/test/test-mountlist.c

    r2421 r2462  
    6868
    6969setup_newt_stuff();
    70 mr_asprintf(g_mountlist_fname, "/tmp/mountlist.txt");
     70mr_asprintf(g_mountlist_fname, MINDI_CACHE"/mountlist.txt");
    7171log_it("before mountlist");
    7272load_mountlist(mountlist, g_mountlist_fname);
Note: See TracChangeset for help on using the changeset viewer.