Changeset 1885 in MondoRescue for branches/2.2.5/mindi/mindi


Ignore:
Timestamp:
Mar 2, 2008, 12:38:35 AM (16 years ago)
Author:
Bruno Cornec
Message:
  • Remove floppy support from mindi and mondo and adapt docs
  • Align more mindi with the version from stable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mindi/mindi

    r1883 r1885  
    4343BOOT_SIZE=16384         # size of the boot disk
    4444MAX_DISKS=99
    45 WRITE_BOOT_FLOPPIES="yes"   # do you want to be propted to write floppy images
    46 PROMPT_WRITE_BOOT_FLOPPIES="yes"
    47     # do you want to be prompted to write
    48     # floppy images out to floppy disks?
    49     # if 'no', images will not be written to floppies
    5045
    5146PROMPT_MAKE_CD_IMAGE="yes"
     
    6358
    6459MY_FSTAB=/etc/fstab
    65 FLOPPY_MODS="ide-floppy floppy"
    6660TAPE_MODS="ht st osst ide-tape ide_tape"
    6761SCSI_MODS="3w-xxxx 3w_xxxx 3w_9xxx 3w-9xxx 53c7,8xx a100u2w a320raid aacraid adpahci advansys aha152x aha1542 aha1740 aic79xx aic79xx_mod aic7xxx aic7xxx_mod aic7xxx_old AM53C974 atp870u BusLogic cciss cpqfc dmx3191d dpt_i2o dtc eata eata_dma eata_pio fdomain gdth g_NCR5380 i2o_block i2o_core ide-scsi ieee1394 imm in2000 initio ips iscsi isp megaraid megaraid_mm megaraid_mbox megaraid_sas mptbase mptscsih mptsas mptspi mptfc mptscsi mptctl NCR53c406a ncr53c8xx nsp32 pas16 pci2000 pci2220i pcmcia ppa psi240i qla1280 qla2200 qla2300 qlogicfas qlogicfc qlogicisp raw1394 scsi_debug scsi_mod scsi_transport_sas scsi_transport_spi sd_mod seagate sg sim710 sr_mod sym53c416 sym53c8xx sym53c8xx_2 t128 tmscsim u14-34f ultrastor wd7000 vmhgfs"
    6862
    6963# ide-probe-mod
    70 IDE_MODS="ide ide-generic ide-detect ide-mod ide-disk ide-cd ide_cd ide-cs ide-core ide_core edd paride ata_generic ata_piix libata via82cxxx generic nvidia ahci sata_nv cmd64x pata_amd pata_marvell pata_serverworks"
     64IDE_MODS="ide ide-floppy floppy ide-generic ide-detect ide-mod ide-disk ide-cd ide_cd ide-cs ide-core ide_core edd paride ata_generic ata_piix libata via82cxxx generic nvidia ahci sata_nv cmd64x pata_amd pata_marvell pata_serverworks"
    7165PCMCIA_MODS="pcmcia_core ds yenta_socket"
    7266USB_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"
    73 CDROM_MODS="$TAPE_MODS $FLOPPY_MODS $IDE_MODS af_packet cdrom isocd isofs inflate_fs nls_iso8859-1 nls_cp437 nls_utf8 sg sr_mod zlib_inflate $USB_MODS $PCMCIA_MODS"
     67CDROM_MODS="$TAPE_MODS $IDE_MODS af_packet cdrom isocd isofs inflate_fs nls_iso8859-1 nls_cp437 nls_utf8 sg sr_mod zlib_inflate $USB_MODS $PCMCIA_MODS"
    7468NET_MODS="sunrpc nfs nfs_acl lockd fscache loop mii 3c59x e100 bcm5700 bnx2 e1000 eepro100 ne2k-pci tg3 pcnet32 8139cp 8139too 8390 forcedeth vmxnet vmnet"
    7569EXTRA_MODS="$CDROM_MODS vfat fat loop md-mod linear raid0 raid1 xor raid5 raid456 lvm-mod dm-mod dm-snapshot dm-zero dm-mirror jfs xfs xfs_support pagebuf reiserfs ext2 ext3 minix nfs nfs_acl nfsd lockd sunrpc jbd mbcache"
     
    8175
    8276LOGFILE=/var/log/mindi.log
    83 FDDEVICE=/dev/fd0             ; # 1.44MB floppy #0
    8477MINDI_CACHE=/var/cache/mindi
    85 FORCE_DUAL_FLOPPIES=no
    8678BOOT_MEDIA_MESSAGE="\
    8779To format and restore all files automatically, type 'nuke' <enter>.\n\
     
    10698    . $MINDI_CONFIG
    10799fi
     100DEPLIST_FILE="$MINDI_CONF/deplist.txt"
     101ISO_CMD="/usr/bin/mkisofs"
     102ISO_OPT="-J -r -v -p Mindi -publisher http://www.mondorescue.org -A Mindi"
    108103
    109104# Now we can create what we need
    110105export MINDI_TMP=`mktemp -d $TMPDIR/mindi.XXXXXXXXXX`
    111 mkdir -p $MINDI_TMP
    112 
    113 # Purge from potential old run
    114 rm -rf $MINDI_CACHE/* 2> /dev/null
    115 mkdir -p $MINDI_CACHE
     106
    116107# ----------------------------------------------------------------------------
    117108
     
    249240    biggienumber=$4
    250241
    251     [ -d "$filename" ] && Die "Cannot chop up $filename: it's a directory. Please amend deplist.txt accordingly."
     242    [ -d "$filename" ] && Die "Cannot chop up $filename: it's a directory. Please amend $DEPLIST_FILE accordingly."
    252243    mkdir -p $outdir
    253244
     
    361352        Die "Please install either fdformat or superformat."
    362353    fi
    363     echo -en "\rWriting $comment"
     354    echo -en "\nWriting $comment"
    364355    if echo $image | grep "mindi-[r|b]oot\.1440" &> /dev/null ; then
    365356        cat $image > $dev &
     
    10391030                if echo "$MODULES" | grep lvm &> /dev/null ; then
    10401031                    echo "I think you are, so please take heed!" >> $LOGFILE
    1041 #                   LogIt "Where is liblvm? You need it."
    10421032                else
    10431033                    echo "I don't think you are, so don't worry about it." >> $LOGFILE
     
    12571247    [ "$mountlist" != "" ] && rm -Rf $mountlist
    12581248    > $mountlist
    1259     echo -en "\rHang on...\r"
    12601249    all_partitions=""
    12611250   
    12621251    if [ $LVM != "false" ]; then
    1263         echo -en "\rAnalyzing LVM...\r"
     1252        echo -en "Analyzing LVM...\n"
    12641253        $MINDI_LIB/analyze-my-lvm > $MINDI_TMP/lvm.res
    12651254        if [ $? -ne 0 ]; then
     
    13671356                current_partition=$actual_dev
    13681357            else
    1369                 Die "Your system uses a LABEL partition ($current_partition), but you lack the tool to support it.\nPlease replace labels with their correct devices in /etc/fstab or install findfs|blkid|vol_id"
     1358                Die "Your system uses a LABEL partition ($current_partition), but you lack the tool to support it.\nPlease replace labels with their correct devices in $MY_FSTAB or install findfs|blkid|vol_id"
    13701359            fi
    13711360        # This part tries to retrieve the correct device from a UUID line in /etc/fstab
     
    16431632
    16441633
    1645 
    1646 OfferToCopyImagesToDisks() {
    1647     local imagesdir i imagename dev count boot_dev data_dev
    1648     imagesdir=$1
    1649     boot_dev=$2
    1650     data_dev=$3
    1651 
    1652     echo -en "Would you like to create boot+data floppy disks now (y/[n]) ?"
    1653     read i
    1654     [ "$i" != "y" ] && [ "$i" != "Y" ] && return
    1655     mount | grep -F /dev/fd > /dev/null && Die "Please unmount your floppies first."
    1656     echo "WARNING! THIS WILL ERASE YOUR FLOPPY DISKS."
    1657     [ ! -e "$boot_dev" ] && Die "Cannot find $boot_dev - is your Linux distro broken?"
    1658     [ ! -e "$data_dev" ] && Die "Cannot find $data_dev - is your Linux distro broken?"
    1659     i=`find $imagesdir -type f | grep -F "/mindi-root.1" 2> /dev/null`
    1660     j=`find $imagesdir -type f | grep -F "/mindi-boot" | grep -Ev "2880|$BOOT_SIZE"`
    1661     if [ "$i" ] ; then
    1662         CopyImageToDisk $j $data_dev "boot disk"
    1663         CopyImageToDisk $i $data_dev "root disk"
    1664     else
    1665         CopyImageToDisk $j $boot_dev "boot/root disk"
    1666     fi
    1667     count=1
    1668     for i in `find $imagesdir | grep -F mindi-data` ; do
    1669         CopyImageToDisk $i $data_dev "data disk #$count"
    1670         count=$(($count+1))
    1671     done
    1672 }
    1673 
    1674 
    16751634OfferToMakeBootableISO() {
    16761635    local i old_pwd
     
    16801639        [ "$i" != "y" ] && [ "$i" != "Y" ] && return 0
    16811640    fi
    1682     if [ ! "$MINDI_TMP" ] ; then
    1683         LogIt "NB: Mindi's bootable CD always uses isolinux."
    1684         LogIt "For a bootable CD w/LILO, please use Mondo."
     1641    if [ _"$MINDI_TMP" = _"" ]; then
     1642        Die "MINDI_TMP undefined"
    16851643    fi
    16861644    rm -Rf $MINDI_TMP/iso
     
    16971655            cp -f $j $k 2> /dev/null || Die "Failed to copy $j to $k"
    16981656            cp -f $j $MINDI_TMP 2> /dev/null || Die "Failed to copy $j to $MINDI_TMP"
    1699             cp -f $j $MONDO_ROOT 2>> $LOGFILE || Die "Failed to copy $j to $MONDO_ROOT"
     1657            if [ _"$MONDO_SHARE" != _"" ]; then
     1658                cp -f $j $MONDO_ROOT 2>> $LOGFILE || Die "Failed to copy $j to $MONDO_ROOT"
     1659            fi
    17001660        fi
    17011661    done
    17021662    MakeSyslinuxMessageFile $MINDI_TMP/iso/isolinux/message.txt
    1703     cp $kernelpath $MINDI_TMP/iso/isolinux/vmlinuz 2> /dev/null || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MINDI_TMP/iso/isolinux/vmlinuz). Did you run out of disk space?"
    1704     cp $kernelpath $MONDO_ROOT/vmlinuz 2> /dev/null || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MONDO_ROOT/vmlinuz). Did you run out of disk space?"
     1663    cp $kernelpath $MINDI_TMP/iso/isolinux/vmlinuz 2>> $LOGFILE || Die "Cannot copy vmlinuz ($kernelpath) to mindi tmp ($MINDI_TMP/iso/isolinux/vmlinuz). Did you run out of disk space?"
    17051664    cp $MINDI_TMP/mindi.rdz $MINDI_TMP/iso/isolinux/initrd.img 2>> $LOGFILE
    1706     cp $MINDI_TMP/mindi.rdz $MONDO_ROOT/initrd.img 2>> $LOGFILE
     1665    if [ _"$MONDO_SHARE" != _"" ]; then
     1666        cp $kernelpath $MONDO_ROOT/vmlinuz 2>> $LOGFILE || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MONDO_ROOT/vmlinuz). Did you run out of disk space?"/dev/null
     1667        cp $MINDI_TMP/mindi.rdz $MONDO_ROOT/initrd.img 2>> $LOGFILE || Die "Cannot copy mindi.rdz ($MINDI_TMP/mindi.rdz) to mondo root ($MONDO_ROOT/vmlinuz). Did you run out of disk space?"
     1668
     1669    fi
    17071670    [ -e "$iso_cfg_file" ] || Die "FIXME - unable to find $iso_cfg_file - this should never occur"
    17081671    cd $MINDI_TMP/iso/isolinux
    1709     cat $iso_cfg_file | HackSyslinuxFile $ramdisk_size $MINDI_TMP/iso > isolinux.cfg || Die "Cannot copy isolinux.cfg from mindi_home to tmp_root - did you run out of disk space?"
     1672    cat $iso_cfg_file | HackSyslinuxFile $ramdisk_size $MINDI_TMP/iso > isolinux.cfg || Die "Cannot copy isolinux.cfg to $MINDI_TMP/iso/isolinux - did you run out of disk space?"
    17101673    if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
    1711         mv isolinux.cfg isolinux.cfg.old
    1712         sed s/interactive/iso/ isolinux.cfg.old > isolinux.cfg
     1674        perl -pi -e 's/interactive/iso/' isolinux.cfg
    17131675    fi
    17141676    if [ "$ARCH" != "ia64" ] ; then
    1715         cp $ISOLINUX isolinux.bin 2> /dev/null || Die "Cannot copy isolinux.bin ($ISOLINUX) to tmp_root - did you run out of disk space?"
     1677        cp $ISOLINUX isolinux.bin 2> /dev/null || Die "Cannot copy isolinux.bin ($ISOLINUX) to $MINDI_TMP/iso/isolinux - did you run out of disk space?"
    17161678        cp $ISOLINUX ../ 2>> $LOGFILE
    17171679    fi
    17181680    cd $MINDI_TMP/iso
    17191681    if [ "$ARCH" != "ia64" ] ; then
    1720         cp -f $MINDI_TMP/iso/isolinux/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt} $MONDO_ROOT 2> /dev/null || Die "Cannot copy core files to ramdisk for boot disk. Did you run out of disk space?"
    1721     fi
    1722     [ "$MONDO_SHARE" ] && cp -f $MONDO_SHARE/autorun .    2>> $LOGFILE
    1723     if [ "$ARCH" != "ia64" ] ; then
    1724         mkisofs -U -J -r -o $MINDI_CACHE/mindi.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table . > /dev/null 2> $MINDI_TMP/mkisofs.log
    1725     else
    1726         mkisofs -J -r -o $MINDI_CACHE/mindi.iso -b images/mindi-bootroot.$BOOT_SIZE.img -c isolinux/boot.cat -no-emul-boot . > /dev/null 2> $MINDI_TMP/mkisofs.log
     1682        if [ _"$MONDO_SHARE" != _"" ]; then
     1683            cp -f $MINDI_TMP/iso/isolinux/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt} $MONDO_ROOT 2> /dev/null || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_ROOT). Did you run out of disk space?"
     1684            cp -f $MONDO_SHARE/autorun . 2>> $LOGFILE
     1685        fi
     1686        $ISO_CMD -U $ISO_OPT -V Mindi_Image -o $MINDI_CACHE/mindi.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table . > /dev/null 2> $MINDI_TMP/mkisofs.log
     1687    else
     1688        $ISO_CMD $ISO_OPT -V Mindi_Image -o $MINDI_CACHE/mindi.iso -b images/mindi-bootroot.$BOOT_SIZE.img -c isolinux/boot.cat -no-emul-boot . > /dev/null 2> $MINDI_TMP/mkisofs.log
    17271689    fi
    17281690    if [ "$?" -ne "0" ] ; then
    1729         echo "----------- mkisofs's errors --------------" >> $LOGFILE
     1691        echo "----------- $ISO_CMD's errors --------------" >> $LOGFILE
    17301692        cat $MINDI_TMP/mkisofs.log >> $LOGFILE
    1731         echo "mkisofs returned the following errors:-"
     1693        echo "$ISO_CMD returned the following errors:-"
    17321694        cat $MINDI_TMP/mkisofs.log
    17331695        LogIt "Failed to create ISO image."
     
    18721834
    18731835MakeMessageFile() {
    1874     local disksize
    1875     disksize=$1
    18761836    if [ "`grep -Fi "debian" /etc/issue.net 2> /dev/null`" ] ; then
    18771837        sed s/ZZZZZ/$MINDI_VERSION/ $MINDI_LIB/msg-txt | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s%DDDDD%"Debian GNU\/`uname -s` `cut -d ' ' -f 3 /etc/issue.net` `hostname`"% | sed s/KKKKK/"Kernel `uname  -r` on a `uname -m`"/ | sed s/TTTTT/"`LC_TIME=C date`"/
     
    18791839        sed s/ZZZZZ/$MINDI_VERSION/ $MINDI_LIB/msg-txt | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s/DDDDD/"`grep -i "linux" /etc/issue.net | head -n1 | tr -s ' ' ' '`"/ | sed s/KKKKK/"`grep -i "kernel" /etc/issue.net | head -n1 | tr -s ' ' ' '`"/ | sed s/TTTTT/"`LC_TIME=C date`"/ | sed s/' 'r' 'on' 'an' 'm/' '`uname -r`' 'on' 'an' '`uname -m`/
    18801840    fi
    1881     if [ "$disksize" -gt "2880" ] ; then
    1882         if [ _"$MONDO_SHARE" != _"" ] ; then
    1883             if [ "$CDRECOVERY" != "yes" ] ; then
    1884                 if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
    1885                     echo -en "Press <enter> to continue.\n"
    1886                 elif [ ! "$MINDI_TMP" ] ; then
    1887                     echo -en "FYI, this is _not_ a Mondo Rescue CD.\n"
    1888                 else
    1889                     echo -en "$BOOT_MEDIA_MESSAGE"
    1890                 fi
     1841    if [ _"$MONDO_SHARE" != _"" ]; then
     1842        if [ "$CDRECOVERY" != "yes" ] ; then
     1843            if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
     1844                echo -en "Press <enter> to continue.\n"
     1845            elif [ ! "$MINDI_TMP" ] ; then
     1846                echo -en "FYI, this is _not_ a Mondo Rescue CD.\n"
     1847            else
     1848                echo -en "$BOOT_MEDIA_MESSAGE"
    18911849            fi
    18921850        fi
     
    19011859
    19021860
    1903 write_full_floppy_of_kernel() {
    1904     local mtpt image old_pwd res disksize
    1905 
    1906     res=0
    1907     old_pwd=`pwd`
    1908     KERN_DISK_MADE=1
    1909     disksize=$3
    1910     rand1=$RANDOM
    1911     rand2=$RANDOM
    1912     image=$MINDI_TMP/$rand1.$rand2.img
    1913     mtpt=$MINDI_TMP/$rand1.$rand2.mtpt
    1914     dd if=/dev/zero of=$image bs=1k count=$disksize &> /dev/null
    1915     mke2fs -N 26 -F $image &> /dev/null
    1916     mkdir -p $mtpt
    1917     mount -o loop $image $mtpt
    1918     cd $mtpt
    1919     mkdir -p {dev,tmp,boot}
    1920     cp -f $1 vmlinuz 2>> $LOGFILE
    1921     if [ "$?" -ne "0" ] ; then
    1922         LogIt "Failed to copy $1 to ramdisk"
    1923         cd $old_pwd
    1924         umount $mtpt
    1925         rmdir $mtpt
    1926         rm $image
    1927         return 1
    1928     fi
    1929 
    1930     rdev vmlinuz 2,0
    1931     rdev -R vmlinuz 0
    1932     rdev -r vmlinuz 49152
    1933 
    1934     tar -zxf $MINDI_LIB/dev.tgz || LogIt "Cannot untar dev.tgz"
    1935     # BERLIOS : Useless and generating errors on CentOS ? (losetup miss a param)
    1936     #losetup /dev/loop0 > /dev/null 2> /dev/null
    1937     #[ "$?" -eq "0" ] || losetup /dev/loop0 -d || Die "Please free up /dev/loop0 by typing 'losetup /dev/loop0 -d'.\nReboot if necessary."
    1938     CopyBootBFile $mtpt/boot.b
    1939 
    1940     MakeLiloConfFile $disksize >> bdlilo.conf
    1941 
    1942     chmod 644 bdlilo.conf
    1943     MakeMessageFile $disksize > message
    1944     lilo -v -C bdlilo.conf -r $mtpt
    1945     res=$?
    1946 
    1947     cd $old_pwd
    1948     umount $mtpt
    1949     mv -f $image $2
    1950     rmdir $mtpt
    1951 
    1952     return $res
    1953 }
    1954 
    1955 
    19561861MakeLiloConfFile() {
    1957     local disksize options i ooo
    1958     disksize=$1
     1862    local options i ooo
    19591863    options=""
    19601864
    19611865    if [ "$ARCH" != "ia64" ] ; then
    19621866        echo -en "boot=/dev/loop0\ndisk=/dev/loop0\n"
    1963     fi
    1964     if [ "$disksize" -eq "2880" ] ; then
    1965         echo -en "bios=0x00\nsectors=36\nheads=2\ncylinders=80\n"
    1966     elif [ "$disksize" -eq "1722" ] ; then
    1967         echo -en "bios=0x00\nsectors=21\nheads=2\ncylinders=82\n"
    1968     elif [ "$disksize" -gt "2880" ] ; then
    1969         /bin/true
    1970     else
    1971         echo -en "bios=0x00\nsectors=18\nheads=2\ncylinders=80\n"
    1972     fi
    1973     if [ "$ARCH" != "ia64" ] ; then
    19741867        echo -en "install=/boot.b\nmap=/boot.map\n"
    19751868    fi
    19761869    if [ "$CDRECOVERY" = "yes" ] ; then
    19771870        echo -en "default=RESTORE\n"
    1978     elif [ "$disksize" -gt "2880" ] && [ _"$MONDO_SHARE" != _"" ] ; then
     1871    elif [ _"$MONDO_SHARE" != _"" ]; then
    19791872        if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
    19801873            echo -en "default=iso\n"
     
    19961889    if [ "$CDRECOVERY" = "yes" ] ; then
    19971890        options="RESTORE expert"
    1998     elif [ "$disksize" -gt "2880" ] ; then
    1999         if [ _"$MONDO_SHARE" != _"" ] ; then
     1891    else
     1892        if [ _"$MONDO_SHARE" != _"" ]; then
    20001893            if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
    20011894                options="iso"
     
    20071900            options="expert"
    20081901        fi
    2009     else
    2010         options="expert"
    20111902    fi
    20121903    for i in $options ; do
     
    20221913        outstr=$outstr" $ooo_mode"
    20231914        outstr=$outstr"\"\n"
    2024         if [ "$disksize" = "1440" ] ; then
    2025             echo -en "$outstr" | sed s/initrd=.*// | grep -v root=
    2026         else
    2027             echo -en "$outstr"
    2028         fi
     1915        echo -en "$outstr"
    20291916    done
    20301917}
     
    20321919
    20331920PrepareBootDiskImage_LILO() {
    2034     local disksize imagesdir dev imagefile mountpoint fname i kernelpath ramdisksize cfg_file testpath options retval outstr old_pwd ooo max_kernel_size liloconf
     1921    local imagesdir dev imagefile mountpoint fname i kernelpath ramdisksize cfg_file testpath options retval outstr old_pwd ooo max_kernel_size liloconf
    20351922    imagesdir=$1
    2036     disksize=$2
    2037     kernelpath=$3
    2038     ramdisksize=$4
     1923    kernelpath=$2
     1924    ramdisksize=$3
    20391925
    20401926    retval=0
    20411927    [ ! -e "$kernelpath" ] && Die "PBDI - cannot find $kernelpath kernel"
    2042     echo -en "Making "$disksize"KB boot disk..."
    2043     TurnTgzIntoRdz $MINDI_LIB/rootfs $MINDI_TMP/mindi.rdz $ramdisksize $disksize `du -sk $kernelpath | cut -f1` || Die "Could not turn rootfs into mindi.rdz; are you SURE your kernel supports loopfs?"
    2044     if [ "$ARCH" != "ia64" ] ; then
    2045         [ "$disksize" != "1722" ] && [ "$disksize" != "2880" ] && [ "$disksize" != "$BOOT_SIZE" ] && Die "PDBI - disksize is $disksize - bad size"
    2046     fi
     1928    echo -en "Making "$BOOT_SIZE"KB boot disk..."
     1929    TurnTgzIntoRdz $MINDI_LIB/rootfs $MINDI_TMP/mindi.rdz $ramdisksize `du -sk $kernelpath | cut -f1` || Die "Could not turn rootfs into mindi.rdz; are you SURE your kernel supports loopfs?"
    20471930    echo -en "..."
    2048     imagefile=$imagesdir/mindi-bootroot.$disksize.img
     1931    imagefile=$imagesdir/mindi-bootroot.$BOOT_SIZE.img
    20491932    mountpoint=$MINDI_TMP/mountpoint.$$
    20501933    mkdir -p $mountpoint
    2051     dd if=/dev/zero of=$imagefile bs=1k count=$disksize &> /dev/null || Die "Cannot dd blank file"
     1934    dd if=/dev/zero of=$imagefile bs=1k count=$BOOT_SIZE &> /dev/null || Die "Cannot dd blank file"
    20521935    if [ "$ARCH" = "ia64" ] ; then
    20531936        mkdosfs $imagefile >> $LOGFILE 2>> $LOGFILE
     
    20771960    CopyBootBFile $mountpoint/boot.b
    20781961
    2079     MakeLiloConfFile $disksize > $liloconf
     1962    MakeLiloConfFile > $liloconf
    20801963
    20811964    # Copy it so that CD-ROM menu entry is satisfied
     
    21091992        retval=$(($retval+1))
    21101993    fi
    2111     MakeMessageFile $disksize > $mountpoint/message
     1994    MakeMessageFile > $mountpoint/message
    21121995
    21131996    mkdir -p $mountpoint/tmp
     
    21242007    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
    21252008    cp -f $kernelpath $mountpoint/vmlinuz > /dev/null 2> /dev/null
    2126     if [ "$?" -ne "0" ] || [ "$FORCE_DUAL_FLOPPIES" = "yes" ] ; then
     2009    if [ "$?" -ne "0" ] ; then
    21272010        echo "Files at mountpoint ($mountpoint) :-" >> $LOGFILE
    21282011        du -sk $mountpoint/* >> $LOGFILE
    21292012        echo "--- end of list of files ---" >> $LOGFILE
    21302013        echo -en "Kernel size = `du -sk $kernelpath | cut -f1` K\nRamdisk free = $free_space K\n\
    2131 Sorry, your kernel is too big for a boot/root floppy.\nI'll try the new boot/root two-disk thingy.\n" >> $LOGFILE
     2014Sorry, your kernel is too big for your image.\n" >> $LOGFILE
    21322015        rm -f $mountpoint/vmlinuz
    21332016        cd $old_pwd
     
    21352018        rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)"
    21362019    #   losetup /dev/loop0 -d
    2137         res=0
    2138         write_full_floppy_of_kernel $kernelpath $imagesdir/mindi-boot.1440.img 1440
    2139         res=$(($res+$?))
    2140         cp -f $MINDI_TMP/mindi.rdz $imagesdir/mindi-root.1440.img 2>> $LOGFILE
    2141         res=$(($res+$?))
    21422020        rm -f $imagefile
    2143         if [ "$res" -ne "0" ]; then
    2144             LogIt "WARNING - failed to create 1.44MB boot/root floppies"
    2145             rm -f $imagesdir/mindi-*.1440.img
    2146         fi
    2147         return $res
     2021        return 0
    21482022    fi
    21492023    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
    21502024    max_kernel_size=$(($free_space+`du -sk $kernelpath | cut -f1`))
    2151     echo "Free space left on floppy = $free_space KB" >> $LOGFILE
    2152     echo "Max kernel size on $disksize KB floppy (est'd) = $max_kernel_size K" >> $LOGFILE
     2025    echo "Free space left on image = $free_space KB" >> $LOGFILE
     2026    echo "Max kernel size on $BOOT_SIZE KB image (est'd) = $max_kernel_size K" >> $LOGFILE
    21532027    # make it bootable
    21542028    rm -f $mountpoint/zero
    21552029    [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 2>> $LOGFILE
    2156     if [ "$disksize" -gt "2880" ] && [ ! "$KERN_DISK_MADE" ] ; then
     2030    if [ ! "$KERN_DISK_MADE" ] ; then
    21572031        if [ "$ARCH" != "ia64" ] ; then
    21582032            $LILO_EXE $LILO_OPTIONS -r $mountpoint >> $LOGFILE 2>> $LOGFILE
     
    21602034            /bin/true
    21612035        fi
    2162     elif [ ! "$KERN_DISK_MADE" ] ; then
    2163         # 12/28/2001 - if 1.72MB floppy then don't use LILO's optimizations at all
    2164         $LILO_EXE -r $mountpoint >> $LOGFILE 2>> $LOGFILE
    21652036    else
    21662037        echo "Not running LILO. It's not that kind of disk." >> $LOGFILE
     
    21872058    rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)"
    21882059    if [ "$retval" -eq "0" ] ; then
    2189         echo -en "...$DONE\r"
     2060        echo -en "...$DONE\n"
    21902061        if [ "$KERN_DISK_MADE" ] ; then
    2191             LogIt "... $disksize KB boot disks were created OK\r"
    2192         fi
    2193     else
    2194         echo -en "...failed\r"
    2195         LogIt $disksize"KB boot disk was NOT created\r"
     2062            LogIt "$BOOT_SIZE KB boot disks were created OK\n"
     2063        fi
     2064    else
     2065        echo -en "...failed\n"
     2066        LogIt $BOOT_SIZE"KB boot disk was NOT created\n"
    21962067        rm -f $imagefile
    21972068    fi
     
    22022073
    22032074PrepareBootDiskImage_SYSLINUX() {
    2204     local disksize imagesdir dev imagefile mountpoint fname i kernelpath ramdisksize cfg_file testpath options retval outstr old_pwd ooo max_kernel_size bootimage
     2075    local imagesdir dev imagefile mountpoint fname i kernelpath ramdisksize cfg_file testpath options retval outstr old_pwd ooo max_kernel_size bootimage
    22052076    imagesdir=$1
    2206     disksize=$2
    2207     kernelpath=$3
    2208     ramdisksize=$4
     2077    kernelpath=$2
     2078    ramdisksize=$3
    22092079    do_boot_root_thingy=""
    22102080    local retval old_pwd
     
    22122082
    22132083    [ ! -e "$kernelpath" ] && Die "PBDI - cannot find $kernelpath kernel"
    2214     echo -en "Making "$disksize"KB boot disk..."
    2215     TurnTgzIntoRdz $MINDI_LIB/rootfs $MINDI_TMP/mindi.rdz $ramdisksize $disksize `du -sk $kernelpath | cut -f1` || Die "Could not turn rootfs into mindi.rdz; are you SURE your kernel supports loopfs?"
    2216     [ "$disksize" != "1722" ] && [ "$disksize" != "2880" ] && [ "$disksize" != "$BOOT_SIZE" ] && Die "PDBI - disksize is $disksize - bad size"
     2084    echo -en "Making "$BOOT_SIZE"KB boot disk..."
     2085    TurnTgzIntoRdz $MINDI_LIB/rootfs $MINDI_TMP/mindi.rdz $ramdisksize `du -sk $kernelpath | cut -f1` || Die "Could not turn rootfs into mindi.rdz; are you SURE your kernel supports loopfs?"
    22172086    echo -en "..."
    2218     imagefile=$imagesdir/mindi-bootroot.$disksize.img
     2087    imagefile=$imagesdir/mindi-bootroot.$BOOT_SIZE.img
    22192088    mountpoint=$MINDI_TMP/mountpoint.$$
    22202089    mkdir -p $mountpoint
    2221 # If I format a 1722KB data file & run syslinux on it, the resultant image
    2222 # won't boot. So, I have formatted a floppy, called syslinux on/to it, and
    2223 # used 'dd' to copy it to sys-disk.raw (zipped to sys-disk.raw.gz).
    2224 # If I extract it, mount it, copy my files to it, etc. then the resultant
    2225 # image _is_ bootable. I don't know why syslinux and/or mkfs.vfat won't
    2226 # play nicely and I don't care. :) I have worked around the problem. -Hugo, 06/27/2002
    2227     if [ "$disksize" = "1722" ] ; then
    2228         gzip -dc $MINDI_LIB/sys-disk.raw.gz > $imagefile || Die "Cannot dd blank file"
    2229     else
    2230         dd if=/dev/zero of=$imagefile bs=1k count=$disksize &> /dev/null || Die "Cannot dd blank file"
    2231         mkfs.vfat $imagefile >> $LOGFILE 2>> $LOGFILE
    2232         syslinux $imagefile >> $LOGFILE 2>> $LOGFILE
    2233     fi
     2090    dd if=/dev/zero of=$imagefile bs=1k count=$BOOT_SIZE &> /dev/null || Die "Cannot dd blank file"
     2091    echo "Creating vfat filesystem on $imagefile" >> $LOGFILE
     2092    mkfs.vfat $imagefile >> $LOGFILE 2>> $LOGFILE
     2093    syslinux $imagefile >> $LOGFILE 2>> $LOGFILE
     2094
    22342095    mount -t vfat -o loop $imagefile $mountpoint || LogIt "Cannot mount (PBDI)"
    22352096
     
    22412102    cat $sys_cfg_file | HackSyslinuxFile $ramdisk_size $mountpoint > syslinux.cfg || Die "Cannot copy syslinux.cfg from mindi_home to tmp_root"
    22422103    if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
    2243         mv syslinux.cfg syslinux.cfg.orig
    2244         sed s/interactive/iso/ syslinux.cfg.orig > syslinux.cfg
     2104        perl -pi -e 's/interactive/iso/' syslinux.cfg
    22452105    fi
    22462106    cd $old_pwd
     
    22642124    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
    22652125    cp -f $kernelpath $mountpoint/vmlinuz &> /dev/null
    2266     if [ "$?" -ne "0" ] || [ "$FORCE_DUAL_FLOPPIES" = "yes" ] ; then
     2126    if [ "$?" -ne "0" ] ; then
    22672127        echo "Files at mountpoint ($mountpoint) :-" >> $LOGFILE
    22682128        du -sk $mountpoint/* >> $LOGFILE
    22692129        echo "--- end of list of files ---" >> $LOGFILE
    22702130        echo -en "Kernel size = `du -sk $kernelpath | cut -f1` K\nRamdisk free = $free_space K\n\
    2271 Sorry, your kernel is too big for a boot/root floppy.\nI'll try the new boot/root two-disk thingy.\n" >> $LOGFILE
     2131Sorry, your kernel is too big for your image.\n" >> $LOGFILE
    22722132        rm -f $mountpoint/vmlinuz
    22732133        cd $old_pwd
     
    22752135        rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)"
    22762136
    2277         res=0
    2278         write_full_floppy_of_kernel $kernelpath $imagesdir/mindi-boot.1440.img 1440
    2279         res=$(($res+$?))
    2280         cp -f $MINDI_TMP/mindi.rdz $imagesdir/mindi-root.1440.img 2>> $LOGFILE
    2281         res=$(($res+$?))
    22822137        rm -f $imagefile
    2283         if [ "$res" -ne "0" ]; then
    2284             LogIt "WARNING - failed to create 1.44MB boot/root floppies"
    2285             rm -f $imagesdir/mindi-*.1440.img
    2286         fi
    2287         return $res
     2138        return 0
    22882139    fi
    22892140    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
    22902141    max_kernel_size=$(($free_space+`du -sk $kernelpath | cut -f1`))
    2291     echo "Free space left on floppy = $free_space KB" >> $LOGFILE
    2292     echo "Max kernel size on $disksize KB floppy (est'd) = $max_kernel_size K" >> $LOGFILE
     2142    echo "Free space left on image = $free_space KB" >> $LOGFILE
     2143    echo "Max kernel size on $BOOT_SIZE KB image (est'd) = $max_kernel_size K" >> $LOGFILE
    22932144
    22942145    # make it bootable
     
    23012152
    23022153    if [ "$retval" -eq "0" ] ; then
    2303         echo -en "...$DONE\r"
     2154        echo -en "...$DONE\n"
    23042155        if [ "$KERN_DISK_MADE" ] ; then
    23052156            rm -f $imagefile
    2306             LogIt "... $disksize KB boot disks were created OK\r"
    2307         fi
    2308     else
    2309         echo -en "...failed\r"
    2310         LogIt $disksize"KB boot disk was NOT created\r"
     2157            LogIt "$BOOT_SIZE KB boot disks were created OK\n"
     2158        fi
     2159    else
     2160        echo -en "...failed\n"
     2161        LogIt $BOOT_SIZE"KB boot disk was NOT created\n"
    23112162        rm -f $imagefile
    23122163    fi
     
    23172168
    23182169PrepareDataDiskImages() {
    2319     local needlist bigdir minidir_root tardir diskdir imagesdir res i j k old_pwd lines
     2170    local needlist bigdir minidir_root tardir diskdir imagesdir res i j k old_pwd lines lfiles
    23202171
    23212172    imagesdir=$1
     
    23282179    tardir=$MINDI_TMP/tardir
    23292180
    2330     lines=`grep -vx " *#.*" $MINDI_CONF/deplist.txt | grep -vx "" | wc -l`
    2331     cat $MINDI_CONF/deplist.txt | GenerateGiantDependencyList $needlist $lines
     2181    lfiles="$DEPLIST_FILE"
     2182    lines=`grep -vx " *#.*" $lfiles | grep -vx "" | wc -l`
     2183    cat $lfiles | GenerateGiantDependencyList $needlist $lines
    23322184    res=$?
    23332185    if [ "$YOUR_KERNEL_SUCKS" ]; then
     
    23652217    FindAndAddUserKeyboardMappingFile
    23662218    mkdir -p $bigdir/tmp
    2367     if [ _"$MONDO_SHARE" != _"" ] ; then
     2219    if [ _"$MONDO_SHARE" != _"" ]; then
    23682220        MakeMondoConfigFile $MINDI_TMP/mondo-restore.cfg
    23692221        cp -f $MINDI_TMP/mondo-restore.cfg $bigdir/tmp &> /dev/null
     
    24142266    noof_disks=$?
    24152267    [ "$noof_disks" -eq "0" ] && Die "Too much stuff!"
    2416 #    if [ "$noof_disks" -ge "8" ] ; then
    2417 #        LogIt "You are putting a ludicrously large amount of data on these disks."
    2418 #        LogIt "I shall therefore double EXTRA_SPACE, just in case your ramdisk is too small."
    2419 #        EXTRA_SPACE=$(($EXTRA_SPACE*2))
    2420 #    fi
    24212268    MakeMountlist $MINDI_TMP/mountlist.txt
    24222269    mkdir -p $minidir_root/$noof_disks/tmp
    24232270    cp -f $MINDI_TMP/mountlist.txt $minidir_root/$noof_disks/tmp/mountlist.txt 2> /dev/null || Die "Cannot copy mountlist.txt from $MINDI_TMP to data disk"
    2424     [ _"$MONDO_SHARE" != _"" ] && cp -f $minidir_root/$noof_disks/tmp/mountlist.txt $MINDI_TMP/. 2>> $LOGFILE
     2271    if [ _"$MONDO_SHARE" != _"" ]; then
     2272        cp -f $minidir_root/$noof_disks/tmp/mountlist.txt $MINDI_TMP/. 2>> $LOGFILE
     2273    fi
    24252274    [ $LVM != "false" ] && $MINDI_LIB/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm || LVM="false"
    24262275    cat $minidir_root/$noof_disks/tmp/mountlist.txt >> $LOGFILE
     
    27922641
    27932642TurnTgzIntoRdz() {
    2794     local tgz_dir_fname rdz_fname ramdisksize tempfile mountpoint old_pwd nodes disksize kernelsize maxsize res currsize not_copied j k floppy_modules s w
     2643    local tgz_dir_fname rdz_fname ramdisksize tempfile mountpoint old_pwd nodes kernelsize maxsize res currsize not_copied j k s w needed_modules_path
    27952644
    27962645    tgz_dir_fname=$1
    27972646    rdz_fname=$2
    27982647    ramdisksize=$3
    2799     disksize=$4
    2800     kernelsize=$5
    2801     maxsize=$(($disksize-$kernelsize))
     2648    kernelsize=$4
     2649    maxsize=$(($BOOT_SIZE-$kernelsize))
    28022650    maxsize=$(($maxsize*2)); # to allow for compression of 50%
    28032651    tempfile=$MINDI_TMP/temp.rd
     
    29032751    fi
    29042752
    2905     for w in cdrom floppy groovy-stuff ; do
     2753    for w in cdrom groovy-stuff ; do
    29062754        mkdir -p mnt/$w
    29072755    done
     
    29222770    if [ "$YOUR_KERNEL_SUCKS" ] ; then
    29232771        cd $MINDI_TMP
    2924         floppy_modules_path=lib/modules/$FAILSAFE_KVER
     2772        needed_modules_path=lib/modules/$FAILSAFE_KVER
    29252773    else
    29262774        cd /
    2927 ###
    2928 ### Sq-Modification... Use kernel name in module path if specified.
    2929 ###
    2930         #floppy_modules_path=lib/modules/`uname -r`
    29312775        if [ "${kernelname}" != "" ]
    29322776        then
    2933             floppy_modules_path=lib/modules/${kernelname}
     2777            needed_modules_path=lib/modules/${kernelname}
    29342778        else
    2935             floppy_modules_path=lib/modules/`uname -r`
    2936         fi
    2937 ###
    2938 ### Sq-Modification end
    2939 ###
    2940     fi
    2941     floppy_modules=""
    2942     if [ "$disksize" -lt "2880" ] ; then
    2943         list_of_groovy_mods="$FLOPPY_MODS $FORCE_MODS $IDE_MODS ide-scsi sr_mod cdrom isocd isofs `WhichOfTheseModulesAreLoaded "$SCSI_MODS"`"
    2944     else
    2945         list_of_groovy_mods="$CDROM_MODS $FORCE_MODS `WhichOfTheseModulesAreLoaded "$SCSI_MODS"`"
    2946     fi
     2779            needed_modules_path=lib/modules/`uname -r`
     2780        fi
     2781    fi
     2782
     2783    needed_modules=""
     2784    list_of_groovy_mods="$CDROM_MODS $FORCE_MODS `WhichOfTheseModulesAreLoaded "$SCSI_MODS"`"
     2785
    29472786    if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
    29482787        # For PXE boot
     
    29572796    done
    29582797
    2959     [ -e "$floppy_modules_path" ] || LogIt "path $floppy_modules_path does not exist.\n If you're not using a modular kernel then you're NUTS."
     2798    [ -e "$needed_modules_path" ] || LogIt "path $needed_modules_path does not exist.\n If you're not using a modular kernel then you're NUTS."
    29602799    for i in $list_of_groovy_mods ; do
    2961         floppy_modules="$floppy_modules `FindSpecificModuleInPath $floppy_modules_path $i`"
    2962     done
    2963     for i in $floppy_modules ; do
     2800        needed_modules="$needed_modules `FindSpecificModuleInPath $needed_modules_path $i`"
     2801    done
     2802    for i in $needed_modules ; do
    29642803        [ -e "$i" ] && s=`du -sk $i | cut -f1` || s=""
    29652804        [ "$YOUR_KERNEL_SUCKS" ] && i=$MINDI_TMP/$i
     
    29762815
    29772816    # Also copy modules.dep in case of udev so that normal modprobe works
    2978     cp --parents -pdf /$floppy_modules_path/modules.dep $mountpoint 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint"
     2817    cp --parents -pdf /$needed_modules_path/modules.dep $mountpoint 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint"
    29792818
    29802819    # For all modules supported, create symlinks under the mountpoint
     
    29852824        (cd $mountpoint ; ln -s $i . 2>/dev/null)
    29862825    done
    2987     if [ ! -e "/sbin/devfsd" ] || [ "$disksize" -lt "2880" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then
     2826    if [ ! -e "/sbin/devfsd" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then
    29882827        echo "Deleting devfsd daemon from ramdisk" >> $LOGFILE
    29892828        [ ! -e "/sbin/devfsd" ] && echo "...because /sbin/devfsd not found" >> $LOGFILE
    2990         [ "$disksize" -lt "2880" ] && echo "...because disksize = $disksize" >> $LOGFILE
    29912829        [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] && echo "...because kernel is failsafe" >> $LOGFILE
    29922830        rm -f $mountpoint/sbin/devfsd
     
    29962834    dd if=/dev/zero of=$mountpoint/zero &> /dev/null
    29972835    rm -f $mountpoint/zero
    2998     if [ _"$MONDO_SHARE" != _"" ] ; then
     2836    mkdir -p $mountpoint/tmp
     2837    if [ _"$MONDO_SHARE" != _"" ]; then
    29992838        MakeMondoConfigFile $mountpoint/tmp/mondo-restore.cfg
    30002839        cp -f $mountpoint/tmp/mondo-restore.cfg $MINDI_TMP &> /dev/null
     
    30072846        [ "$USE_STAR" = "yes" ] && echo -en "Using star. Hooray." >> $mountpoint/tmp/USING-STAR
    30082847    fi
    3009     mkdir -p $mountpoint/tmp
    30102848    mkdir -p $mountpoint/proc
    3011     echo "$disksize" > $mountpoint/tmp/$disksize.siz
    3012     find $mountpoint -name CVS -exec rm -rf '{}' \;
     2849    echo "$BOOT_SIZE" > $mountpoint/tmp/$BOOT_SIZE.siz
    30132850    # Determine what filesystem to use for initrd image
    30142851    echo "Call GetInitrdFilesystemToUse() with parameter ${kernelpath} to get filesystem to use for initrd." >> $LOGFILE
     
    31122949##############################################################################
    31132950
     2951# Now we can create what we need
     2952mkdir -p $MINDI_TMP
     2953
     2954# Purge from potential old run
     2955if [ _"$MINDI_CACHE" = _"" ]; then
     2956    Die "MINDI_CACHE undefined"
     2957fi
     2958rm -rf $MINDI_CACHE/* 2> /dev/null
     2959mkdir -p $MINDI_CACHE
     2960
     2961if [ "$1" = "--printvar" ] ; then
     2962    shift
     2963    if [ _"$1" != _"" ] ; then
     2964        set | grep -Ew "^$1" | cut -d= -f2
     2965    fi
     2966    MindiExit 0
     2967fi
    31142968
    31152969> $LOGFILE
     
    31292983# Log some capital variables
    31302984[ "$MINDI_PREFIX" = "XXX" ] && Die "Mindi has not been installed correctly."
     2985echo "MONDO_SHARE = $MONDO_SHARE" >> $LOGFILE
    31312986echo "MINDI_LIB = $MINDI_LIB" >> $LOGFILE
    31322987echo "MINDI_SBIN = $MINDI_SBIN" >> $LOGFILE
    31332988[ "$MINDI_CONF" = "YYY" ] && Die "Mindi has not been installed correctly."
    31342989echo "MINDI_CONF = $MINDI_CONF" >> $LOGFILE
    3135 echo "MONDO_SHARE = $MONDO_SHARE" >> $LOGFILE
     2990if [ -f $MINDI_CONFIG ]; then
     2991    echo "-----------------------------" >> $LOGFILE
     2992    echo " Mindi configuration file    " >> $LOGFILE
     2993    echo "-----------------------------" >> $LOGFILE
     2994    grep -Ev '^#' $MINDI_CONFIG >> $LOGFILE
     2995    echo "-----------------------------" >> $LOGFILE
     2996fi
     2997
    31362998
    31372999trap AbortHere SIGTERM SIGHUP SIGQUIT SIGKILL SIGABRT SIGINT
     
    31753037fi
    31763038
    3177 [ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | grep -E "2\.[46]" | cut -d' ' -f1`
     3039# If we have a distribution-specific script for finding a FAILSAFE kernel, use it.
     3040if [ -f "$MINDI_LIB/FindDistroFailsafe" ] && [ ! "$1" = "--makemountlist" ] && [ "$kernelpath" = "FAILSAFE" ]; then
     3041    source $MINDI_LIB/FindDistroFailsafe
     3042    # Log kernel image
     3043    LogIt "FAILSAFE kernel image to be used is: $FAILSAFE_KBIN ($FAILSAFE_KVER)"
     3044else
     3045    [ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | grep -E "2\.[46]" | cut -d' ' -f1`
     3046fi
    31783047
    31793048if ! which mkfs.vfat 1> /dev/null 2> /dev/null ; then
     
    31933062    FindLiloBinary
    31943063fi
    3195 # BERLIOS: Remove as too dangerous and now useless
    3196 #grep -F " $MINDI_TMP " /proc/mounts | grep -F tmpfs > /dev/null 2> /dev/null && MINDI_TMP=/home/tmpmondo && mkdir -p $MINDI_TMP && LogIt "Changing MINDI_TMP to $MINDI_TMP because you're using tmpfs for /tmp\n" ; # tmpfs doesn't like Mindi and /tmp, for some reason
    31973064trap "Aborted" SIGTERM
    31983065DONE="\r\t\t\t\t\t\t\t\tDone.         "
     
    34953362fi
    34963363if [ _"$MONDO_SHARE" = _"" ] && [ "$ARCH" != "ia64" ]; then
    3497     echo -en "Would you like to use LILO (instead of syslinux)\nfor your boot CD/floppies (y/[n]) ?"
     3364    echo -en "Would you like to use LILO (instead of syslinux)\nfor your boot image (y/[n]) ?"
    34983365    read ch
    34993366    if [ "$ch" != "y" ] && [ "$ch" != "Y" ] ; then
     
    35043371fi
    35053372if [ "$YOUR_KERNEL_SUCKS" != "" ] || [ "$kernelpath" = "" ] || [ "$kernelpath" = "SUCKS" ] || [ "$kernelpath" = "FAILSAFE" ] ; then
    3506     kernelpath=$MINDI_LIB/vmlinuz
    3507     LogIt "I shall include Mindi's failsafe kernel, not your kernel, in the boot disks."
    3508     LogIt "However, you are still running your kernel. If Mindi fails to create your"
    3509     LogIt "disks then it may still be a result of a problem with your kernel."
    3510     pwd=`pwd`
    3511     cd $MINDI_TMP
    3512     bzip2 -dc $MINDI_LIB/lib.tar.bz2 | tar -x || Die "Cannot unzip lib.tar.bz2"
    3513     cd $pwd
     3373    # If we have a distribution-specific script for finding a FAILSAFE kernel, use it.
     3374    if [ -f "$MINDI_LIB/FindDistroFailsafe" ] && [ ! "$1" = "--makemountlist" ]; then
     3375        source $MINDI_LIB/FindDistroFailsafe
     3376        # Log kernel image
     3377        LogIt "FAILSAFE kernel image to be used is: $FAILSAFE_KBIN ($FAILSAFE_KVER)"
     3378        kernelpath="$FAILSAFE_KBIN"
     3379        LogIt "I shall include a failsafe kernel, not your kernel, in the boot disks.\n"
     3380        LogIt "The failsafe kernel is $kernelpath.\n"
     3381        LogIt "However, you are still running your kernel. If Mindi fails to create your\n"
     3382        LogIt "disks then it may still be a result of a problem with your kernel.\n"
     3383        pwd=`pwd`
     3384        cd $MINDI_TMP
     3385        mkdir -p lib/modules
     3386        cp -a "/lib/modules/$FAILSAFE_KVER" "lib/modules/$FAILSAFE_KVER" || Die "Cannot copy kernel modules."
     3387        cd $pwd
     3388    else
     3389        kernelpath=$MINDI_LIB/vmlinuz
     3390        LogIt "I shall include Mindi's failsafe kernel, not your kernel, in the boot disks."
     3391        LogIt "However, you are still running your kernel. If Mindi fails to create your"
     3392        LogIt "disks then it may still be a result of a problem with your kernel."
     3393        pwd=`pwd`
     3394        cd $MINDI_TMP
     3395        bzip2 -dc $MINDI_LIB/lib.tar.bz2 | tar -x || Die "Cannot unzip lib.tar.bz2"
     3396        cd $pwd
     3397    fi
    35143398    YOUR_KERNEL_SUCKS="Your kernel sucks"
    35153399fi
     
    35273411echo "Ramdisk will be $ramdisk_size KB" >> $LOGFILE
    35283412if [ "$ARCH" = "ia64" ] ; then
    3529     PrepareBootDiskImage_LILO $MINDI_CACHE $BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create ia64 floppy disk image."
     3413    PrepareBootDiskImage_LILO $MINDI_CACHE $kernelpath $ramdisk_size || Die "Failed to create ia64 image disk image."
    35303414else
    35313415    if [ "$USE_LILO" = "yes" ] ; then
    3532         if ! PrepareBootDiskImage_LILO $MINDI_CACHE 1722 $kernelpath $ramdisk_size ; then
    3533             LogIt "WARNING - failed to create 1.72MB boot image."
    3534             LogIt "Please reduce your kernel's size if you want to make a 1.72MB floppy disk."
    3535         fi
    3536         if ! PrepareBootDiskImage_LILO $MINDI_CACHE 2880 $kernelpath $ramdisk_size ;  then
    3537             LogIt "WARNING - failed to create 2.88MB floppy disk image."
    3538             LogIt "Please reduce your kernel's size if you want to make a 2.88MB floppy disk."
    3539             PrepareBootDiskImage_LILO $MINDI_CACHE $BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create 2.88MB floppy disk image."
    3540         fi
    3541     else
    3542         if ! PrepareBootDiskImage_SYSLINUX $MINDI_CACHE 1722 $kernelpath $ramdisk_size ; then
    3543             LogIt "WARNING - failed to create 1.72MB boot image."
    3544             LogIt "Please reduce your kernel's size if you want to make a 1.72MB floppy disk."
    3545             if ! PrepareBootDiskImage_SYSLINUX $MINDI_CACHE 2880 $kernelpath $ramdisk_size ; then
    3546                 LogIt "WARNING - failed to create 2.88MB floppy disk image."
    3547                 LogIt "Please reduce your kernel's size if you want to make a 2.88MB floppy disk."
    3548                 PrepareBootDiskImage_SYSLINUX $MINDI_CACHE $BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create $BOOT_SIZE kB floppy disk image."
    3549             fi
    3550         fi
     3416        PrepareBootDiskImage_LILO $MINDI_CACHE $kernelpath $ramdisk_size || Die "Failed to create $BOOT_SIZE MB disk image."
     3417    else
     3418        PrepareBootDiskImage_SYSLINUX $MINDI_CACHE $kernelpath $ramdisk_size || Die "Failed to create $BOOT_SIZE MB disk image."
    35513419    fi
    35523420fi
     
    35573425if [ _"$MONDO_SHARE" = _"" ]; then
    35583426    ListImagesForUser $MINDI_CACHE
    3559     boot_dev=/dev/fd0u1722
    3560     [ ! -e "$boot_dev" ] && mknod $boot_dev b 2 60
    3561     [ ! -e "$boot_dev" ] && boot_dev=/dev/fd0H1722
    3562     [ ! -e "$boot_dev" ] && Die "Oh Lord, will you PLEASE tell the vendor to create the 1.72MB devices in /dev?"
    3563     if [ "$PROMPT_WRITE_BOOT_FLOPPIES" = "yes" ]; then
    3564         OfferToCopyImagesToDisks $MINDI_CACHE $boot_dev $FDDEVICE
    3565     fi
     3427    OfferToMakeBootableISO $MINDI_CACHE
    35663428    if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ]; then
    35673429        OfferToMakeBootableUSB $MINDI_CACHE
    35683430    fi
    3569     OfferToMakeBootableISO $MINDI_CACHE
    35703431    LogIt "Finished."
    35713432elif [ "$TAPEDEV" ] ; then
     3433    rm -f $MINDI_CACHE/{*img,*gz,*iso}
    35723434    OfferToMakeBootableISO $MINDI_CACHE
    35733435    if [ -e "$MINDI_CACHE/all.tar.gz" ] ; then
Note: See TracChangeset for help on using the changeset viewer.