Changeset 2462 in MondoRescue for branches/2.2.10/mindi/mindi


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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.