Changeset 1573 in MondoRescue


Ignore:
Timestamp:
Jul 26, 2007, 3:05:22 AM (17 years ago)
Author:
Bruno Cornec
Message:

Remove floppy support for mindi

Location:
branches/stable/mindi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/distributions/conf/mindi.conf.dist

    r1535 r1573  
    2828#
    2929mindi_deplist_file="deplist.txt"
    30 
    31 #
    32 # Write boot floppies (yes|no) ?
    33 #
    34 mindi_write_boot_floppy="no"
    35 
    36 #
    37 # Force dual floppies ?
    38 #
    39 mindi_dual_floppies="no"
    4030
    4131#
     
    113103mindi_cdrom_mods="cdrom isocd isofs inflate_fs nls_iso8859-1 nls_cp437 sg sr_mod zlib_inflate"
    114104mindi_tape_mods="ht st osst ide-tape ide_tape"
    115 mindi_floppy_mods="ide-floppy floppy"
    116105mindi_net_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"
    117106mindi_extra_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"
  • branches/stable/mindi/mindi

    r1570 r1573  
    66# mindi - mini-Linux distro based on the user's filesystem & distribution
    77#
    8 # Mindi can create a multi-floppy boot/root kit. The first floppy is the boot
     8# Mindi can create a multi-image boot/root kit. The first image is the boot
    99# disk: it contains a kernel, a ramdisk etc. The second disk is data disk #1;
    1010# the third disk is data disk #2; and so it goes.
     
    1717
    1818#RUN_AFTER_INITIAL_BOOT_PHASE="echo \"Who lives in a pineapple under the sea?\" > /tmp/spongebob.squarepants.txt"
    19     # after booting from floppy/CD image but before
     19    # after booting from image/CD image but before
    2020    # accessing auxiliary data disks (or the rest of
    2121    # the CD), the initscript will run the above command.
     
    6363
    6464if [ "$INTERACTIVE" = "yes" ]; then
    65     # do you want to be prompted to write
    66     # floppy images out to floppy disks?
    67     # if 'no', images will not be written to floppies
    68     PROMPT_WRITE_BOOT_FLOPPIES="yes"
    69 
    7065    # Ask if you want to make a CD Image to be written?
    7166    # if this is set to 'no', then the image will be created automatically
     
    8681DEPLIST_DIR="$MINDI_CONF/deplist.d"
    8782DEPLIST_FILE="$MINDI_CONF/$mindi_deplist_file"
    88 WRITE_BOOT_FLOPPIES="$mindi_write_boot_floppy"
    8983PROMPT_MAKE_CD_IMAGE="$mindi_write_cd"
    9084PROMPT_MAKE_USB_IMAGE="$mindi_write_usb"
     
    10094MY_FSTAB="$mindi_etc_fstab"
    10195LOGFILE="$mindi_log_file"
    102 FLOPPY_MODS="$mindi_floppy_mods"
    10396TAPE_MODS="$mindi_tape_mods"
    10497SCSI_MODS="$mindi_scsi_mods"
     
    10699PCMCIA_MODS="$mindi_pcmcia_mods"
    107100USB_MODS="$mindi_usb_mods"
    108 CDROM_MODS="$TAPE_MODS $FLOPPY_MODS $IDE_MODS $mindi_cdrom_mods $USB_MODS $PCMCIA_MODS"
     101CDROM_MODS="$TAPE_MODS $IDE_MODS $mindi_cdrom_mods $USB_MODS $PCMCIA_MODS"
    109102NET_MODS="$mindi_net_mods"
    110103EXTRA_MODS="$CDROM_MODS $mindi_extra_mods $mindi_additional_mods"
     
    155148
    156149AddFileToDir() {
    157     local filename minidir_root noof_disks diskno res filesize disksize would_occupy zipsize complevel cutoff compressed_fname siz
     150    local filename minidir_root noof_disks diskno res filesize would_occupy zipsize complevel cutoff compressed_fname siz
    158151    filename=$1
    159152    minidir_root=$2
     
    15421535
    15431536
    1544 OfferToCopyImagesToDisks() {
    1545     local imagesdir i imagename dev count boot_dev data_dev
    1546     imagesdir=$1
    1547     boot_dev=$2
    1548     data_dev=$3
    1549 
    1550     echo -en "Would you like to create boot+data floppy disks now (y/[n]) ?"
    1551     read i
    1552     [ "$i" != "y" ] && [ "$i" != "Y" ] && return
    1553     mount | grep -F /dev/fd > /dev/null && Die "Please unmount your floppies first."
    1554     echo "WARNING! THIS WILL ERASE YOUR FLOPPY DISKS."
    1555     [ ! -e "$boot_dev" ] && Die "Cannot find $boot_dev - is your Linux distro broken?"
    1556     [ ! -e "$data_dev" ] && Die "Cannot find $data_dev - is your Linux distro broken?"
    1557     find $imagesdir -type f > $MINDI_TMP/imagesdir.files
    1558     i=`grep -F "/mindi-root.1" $MINDI_TMP/imagesdir.files 2> /dev/null`
    1559     j=`grep -F "/mindi-boot" $MINDI_TMP/imagesdir.files | grep -Ev "2880|$BOOT_SIZE"`
    1560     if [ "$i" ] ; then
    1561         CopyImageToDisk $j $data_dev "boot disk"
    1562         CopyImageToDisk $i $data_dev "root disk"
    1563     else
    1564         CopyImageToDisk $j $boot_dev "boot/root disk"
    1565     fi
    1566     count=1
    1567     for i in `grep -F mindi-data $MINDI_TMP/imagesdir.files` ; do
    1568         CopyImageToDisk $i $data_dev "data disk #$count"
    1569         count=$(($count+1))
    1570     done
    1571     rm -f $MINDI_TMP/imagesdir.files
    1572 }
    1573 
    1574 
    15751537OfferToMakeBootableISO() {
    15761538    local i old_pwd
     
    17921754
    17931755MakeMessageFile() {
    1794     local disksize
    1795     disksize=$1
    17961756    if [ "`grep -Fi "debian" /etc/issue.net 2> /dev/null`" ] ; then
    17971757        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`"/
     
    17991759        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`/
    18001760    fi
    1801     if [ "$disksize" -gt "2880" ] ; then
    1802         if [ _"$MONDO_SHARE" != _"" ]; then
    1803             if [ "$CDRECOVERY" != "yes" ] ; then
    1804                 if [ "$NFS_DEV" != "" ] ; then
    1805                     echo -en "Press <enter> to continue.\n"
    1806                 elif [ ! "$MINDI_TMP" ] ; then
    1807                     echo -en "FYI, this is _not_ a Mondo Rescue CD.\n"
    1808                 else
    1809                     echo -en "$BOOT_MEDIA_MESSAGE"
    1810                 fi
     1761    if [ _"$MONDO_SHARE" != _"" ]; then
     1762        if [ "$CDRECOVERY" != "yes" ] ; then
     1763            if [ "$NFS_DEV" != "" ] ; then
     1764                echo -en "Press <enter> to continue.\n"
     1765            elif [ ! "$MINDI_TMP" ] ; then
     1766                echo -en "FYI, this is _not_ a Mondo Rescue CD.\n"
     1767            else
     1768                echo -en "$BOOT_MEDIA_MESSAGE"
    18111769            fi
    18121770        fi
     
    18211779
    18221780
    1823 write_full_floppy_of_kernel() {
    1824     local mtpt image old_pwd res disksize
    1825 
    1826     res=0
    1827     old_pwd=`pwd`
    1828     KERN_DISK_MADE=1
    1829     disksize=$3
    1830     rand1=$RANDOM
    1831     rand2=$RANDOM
    1832     image=$MINDI_TMP/$rand1.$rand2.img
    1833     mtpt=$MINDI_TMP/$rand1.$rand2.mtpt
    1834     dd if=/dev/zero of=$image bs=1k count=$disksize &> /dev/null
    1835     echo "Creating ext2 filesystem on $image" >> $LOGFILE
    1836     mke2fs -N 26 -F $image &> /dev/null || Die "Unable to create an ext2 file system on $image"
    1837     mkdir -p $mtpt
    1838     mount -o loop $image $mtpt
    1839     cd $mtpt
    1840     mkdir -p {dev,tmp,boot}
    1841     cp -f $1 vmlinuz 2>> $LOGFILE
    1842     if [ "$?" -ne "0" ] ; then
    1843         LogIt "Failed to copy $1 to ramdisk"
    1844         cd $old_pwd
    1845         umount $mtpt
    1846         rmdir $mtpt
    1847         rm $image
    1848         return 1
    1849     fi
    1850 
    1851     rdev vmlinuz 2,0
    1852     rdev -R vmlinuz 0
    1853     rdev -r vmlinuz 49152
    1854 
    1855     tar -zxf $MINDI_LIB/dev.tgz || LogIt "Cannot untar dev.tgz"
    1856     # BERLIOS : Useless and generating errors on CentOS ? (losetup miss a param)
    1857     #losetup /dev/loop0 > /dev/null 2> /dev/null
    1858     #[ "$?" -eq "0" ] || losetup /dev/loop0 -d || Die "Please free up /dev/loop0 by typing 'losetup /dev/loop0 -d'.\nReboot if necessary."
    1859     CopyBootBFile $mtpt/boot.b
    1860 
    1861     MakeLiloConfFile $disksize >> bdlilo.conf
    1862 
    1863     chmod 644 bdlilo.conf
    1864     MakeMessageFile $disksize > message
    1865     lilo -v -C bdlilo.conf -r $mtpt
    1866     res=$?
    1867 
    1868     cd $old_pwd
    1869     umount $mtpt
    1870     mv -f $image $2
    1871     rmdir $mtpt
    1872 
    1873     return $res
    1874 }
    1875 
    1876 
    18771781MakeLiloConfFile() {
    1878     local disksize options i ooo
    1879     disksize=$1
     1782    local options i ooo
    18801783    options=""
    18811784
    18821785    if [ "$ARCH" != "ia64" ] ; then
    18831786        echo -en "boot=/dev/loop0\ndisk=/dev/loop0\n"
    1884     fi
    1885     if [ "$disksize" -eq "2880" ] ; then
    1886         echo -en "bios=0x00\nsectors=36\nheads=2\ncylinders=80\n"
    1887     elif [ "$disksize" -gt "2880" ] ; then
    1888         /bin/true
    1889     else
    1890         echo -en "bios=0x00\nsectors=18\nheads=2\ncylinders=80\n"
    1891     fi
    1892     if [ "$ARCH" != "ia64" ] ; then
    18931787        echo -en "install=/boot.b\nmap=/boot.map\n"
    18941788    fi
    18951789    if [ "$CDRECOVERY" = "yes" ] ; then
    18961790        echo -en "default=RESTORE\n"
    1897     elif [ "$disksize" -gt "2880" ] && [ _"$MONDO_SHARE" != _"" ]; then
     1791    elif [ _"$MONDO_SHARE" != _"" ]; then
    18981792        if [ "$NFS_DEV" != "" ] ; then
    18991793            echo -en "default=iso\n"
     
    19151809    if [ "$CDRECOVERY" = "yes" ] ; then
    19161810        options="RESTORE expert"
    1917     elif [ "$disksize" -gt "2880" ] ; then
     1811    else
    19181812        if [ _"$MONDO_SHARE" != _"" ]; then
    19191813            if [ "$NFS_DEV" != "" ] ; then
     
    19261820            options="expert"
    19271821        fi
    1928     else
    1929         options="expert"
    19301822    fi
    19311823    for i in $options ; do
     
    19411833        outstr=$outstr" $ooo_mode"
    19421834        outstr=$outstr"\"\n"
    1943         if [ "$disksize" = "1440" ] ; then
    1944             echo -en "$outstr" | sed s/initrd=.*// | grep -v root=
    1945         else
    1946             echo -en "$outstr"
    1947         fi
     1835        echo -en "$outstr"
    19481836    done
    19491837}
     
    19511839
    19521840PrepareBootDiskImage_LILO() {
    1953     local disksize imagesdir dev imagefile mountpoint fname i kernelpath ramdisksize cfg_file testpath options retval outstr old_pwd ooo max_kernel_size liloconf
     1841    local imagesdir dev imagefile mountpoint fname i kernelpath ramdisksize cfg_file testpath options retval outstr old_pwd ooo max_kernel_size liloconf
    19541842    imagesdir=$1
    1955     disksize=$2
    1956     kernelpath=$3
    1957     ramdisksize=$4
     1843    kernelpath=$2
     1844    ramdisksize=$3
    19581845
    19591846    retval=0
    19601847    [ ! -e "$kernelpath" ] && Die "PBDI - cannot find $kernelpath kernel"
    1961     echo -en "Making "$disksize"KB boot disk..."
    1962     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?"
    1963     if [ "$ARCH" != "ia64" ] ; then
    1964         [ "$disksize" != "2880" ] && [ "$disksize" != "$BOOT_SIZE" ] && Die "PDBI - disksize is $disksize - bad size"
    1965     fi
     1848    echo -en "Making "$BOOT_SIZE"KB boot disk..."
     1849    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?"
    19661850    echo -en "..."
    1967     imagefile=$imagesdir/mindi-bootroot.$disksize.img
     1851    imagefile=$imagesdir/mindi-bootroot.$BOOT_SIZE.img
    19681852    mountpoint=$MINDI_TMP/mountpoint.$$
    19691853    mkdir -p $mountpoint
    1970     dd if=/dev/zero of=$imagefile bs=1k count=$disksize &> /dev/null || Die "Cannot dd blank file"
     1854    dd if=/dev/zero of=$imagefile bs=1k count=$BOOT_SIZE &> /dev/null || Die "Cannot dd blank file"
    19711855    if [ "$ARCH" = "ia64" ] ; then
    19721856        mkdosfs $imagefile >> $LOGFILE 2>> $LOGFILE
     
    19961880    CopyBootBFile $mountpoint/boot.b
    19971881
    1998     MakeLiloConfFile $disksize > $liloconf
     1882    MakeLiloConfFile > $liloconf
    19991883
    20001884    # Copy it so that CD-ROM menu entry is satisfied
     
    20271911        retval=$(($retval+1))
    20281912    fi
    2029     MakeMessageFile $disksize > $mountpoint/message
     1913    MakeMessageFile > $mountpoint/message
    20301914
    20311915    mkdir -p $mountpoint/tmp
     
    20421926    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
    20431927    cp -f $kernelpath $mountpoint/vmlinuz > /dev/null 2> /dev/null
    2044     if [ "$?" -ne "0" ] || [ "$FORCE_DUAL_FLOPPIES" = "yes" ] ; then
     1928    if [ "$?" -ne "0" ] ; then
    20451929        echo "Files at mountpoint ($mountpoint) :-" >> $LOGFILE
    20461930        du -sk $mountpoint/* >> $LOGFILE
    20471931        echo "--- end of list of files ---" >> $LOGFILE
    20481932        echo -en "Kernel size = `du -sk $kernelpath | cut -f1` K\nRamdisk free = $free_space K\n\
    2049 Sorry, your kernel is too big for a boot/root floppy.\nI'll try the new boot/root two-disk thingy.\n" >> $LOGFILE
     1933Sorry, your kernel is too big for your image.\n" >> $LOGFILE
    20501934        rm -f $mountpoint/vmlinuz
    20511935        cd $old_pwd
     
    20531937        rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)"
    20541938    #   losetup /dev/loop0 -d
    2055         res=0
    2056         write_full_floppy_of_kernel $kernelpath $imagesdir/mindi-boot.1440.img 1440
    2057         res=$(($res+$?))
    2058         cp -f $MINDI_TMP/mindi.rdz $imagesdir/mindi-root.1440.img 2>> $LOGFILE
    2059         res=$(($res+$?))
    20601939        rm -f $imagefile
    2061         if [ "$res" -ne "0" ]; then
    2062             LogIt "WARNING - failed to create 1.44MB boot/root floppies"
    2063             rm -f $imagesdir/mindi-*.1440.img
    2064         fi
    2065         return $res
     1940        return 0
    20661941    fi
    20671942    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
    20681943    max_kernel_size=$(($free_space+`du -sk $kernelpath | cut -f1`))
    2069     echo "Free space left on floppy = $free_space KB" >> $LOGFILE
    2070     echo "Max kernel size on $disksize KB floppy (est'd) = $max_kernel_size K" >> $LOGFILE
     1944    echo "Free space left on image = $free_space KB" >> $LOGFILE
     1945    echo "Max kernel size on $BOOT_SIZE KB image (est'd) = $max_kernel_size K" >> $LOGFILE
    20711946# make it bootable
    20721947    rm -f $mountpoint/zero
    20731948    [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 2>> $LOGFILE
    2074     if [ "$disksize" -gt "2880" ] && [ ! "$KERN_DISK_MADE" ] ; then
     1949    if [ ! "$KERN_DISK_MADE" ] ; then
    20751950        if [ "$ARCH" != "ia64" ] ; then
    2076         $LILO_EXE -r $mountpoint >> $LOGFILE 2>> $LOGFILE
    2077         else
    2078             /bin/true
    2079         fi
    2080     elif [ ! "$KERN_DISK_MADE" ] ; then
    2081 # 12/28/2001 - if 1.72MB floppy then don't use LILO's optimizations at all
    2082         $LILO_EXE -r $mountpoint >> $LOGFILE 2>> $LOGFILE
     1951            $LILO_EXE -r $mountpoint >> $LOGFILE 2>> $LOGFILE
     1952        fi
    20831953    else
    20841954        echo "Not running LILO. It's not that kind of disk." >> $LOGFILE
     
    21071977        echo -en "...$DONE\n"
    21081978        if [ "$KERN_DISK_MADE" ] ; then
    2109             LogIt "$disksize KB boot disks were created OK\n"
     1979            LogIt "$BOOT_SIZE KB boot disks were created OK\n"
    21101980        fi
    21111981    else
    21121982        echo -en "...failed\n"
    2113         LogIt $disksize"KB boot disk was NOT created\n"
     1983        LogIt $BOOT_SIZE"KB boot disk was NOT created\n"
    21141984        rm -f $imagefile
    21151985    fi
     
    21201990
    21211991PrepareBootDiskImage_SYSLINUX() {
    2122     local disksize imagesdir dev imagefile mountpoint fname i kernelpath ramdisksize cfg_file testpath options retval outstr old_pwd ooo max_kernel_size bootimage
     1992    local imagesdir dev imagefile mountpoint fname i kernelpath ramdisksize cfg_file testpath options retval outstr old_pwd ooo max_kernel_size bootimage
    21231993    imagesdir=$1
    2124     disksize=$2
    2125     kernelpath=$3
    2126     ramdisksize=$4
     1994    kernelpath=$2
     1995    ramdisksize=$3
    21271996    do_boot_root_thingy=""
    21281997    local retval old_pwd
     
    21301999
    21312000    [ ! -e "$kernelpath" ] && Die "PBDI - cannot find $kernelpath kernel"
    2132     echo -en "Making "$disksize"KB boot disk..."
    2133     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?"
    2134     [ "$disksize" != "2880" ] && [ "$disksize" != "$BOOT_SIZE" ] && Die "PDBI - disksize is $disksize - bad size"
     2001    echo -en "Making "$BOOT_SIZE"KB boot disk..."
     2002    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?"
    21352003    echo -en "..."
    2136     imagefile=$imagesdir/mindi-bootroot.$disksize.img
     2004    imagefile=$imagesdir/mindi-bootroot.$BOOT_SIZE.img
    21372005    mountpoint=$MINDI_TMP/mountpoint.$$
    21382006    mkdir -p $mountpoint
    2139     dd if=/dev/zero of=$imagefile bs=1k count=$disksize &> /dev/null || Die "Cannot dd blank file"
     2007    dd if=/dev/zero of=$imagefile bs=1k count=$BOOT_SIZE &> /dev/null || Die "Cannot dd blank file"
    21402008    echo "Creating vfat filesystem on $imagefile" >> $LOGFILE
    21412009    mkfs.vfat $imagefile >> $LOGFILE 2>> $LOGFILE
     
    21732041    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
    21742042    cp -f $kernelpath $mountpoint/vmlinuz &> /dev/null
    2175     if [ "$?" -ne "0" ] || [ "$FORCE_DUAL_FLOPPIES" = "yes" ] ; then
     2043    if [ "$?" -ne "0" ] ; then
    21762044        echo "Files at mountpoint ($mountpoint) :-" >> $LOGFILE
    21772045        du -sk $mountpoint/* >> $LOGFILE
    21782046        echo "--- end of list of files ---" >> $LOGFILE
    21792047        echo -en "Kernel size = `du -sk $kernelpath | cut -f1` K\nRamdisk free = $free_space K\n\
    2180 Sorry, your kernel is too big for a boot/root floppy.\nI'll try the new boot/root two-disk thingy.\n" >> $LOGFILE
     2048Sorry, your kernel is too big for your image.\n" >> $LOGFILE
    21812049        rm -f $mountpoint/vmlinuz
    21822050        cd $old_pwd
     
    21842052        rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)"
    21852053
    2186         res=0
    2187         write_full_floppy_of_kernel $kernelpath $imagesdir/mindi-boot.1440.img 1440
    2188         res=$(($res+$?))
    2189         cp -f $MINDI_TMP/mindi.rdz $imagesdir/mindi-root.1440.img 2>> $LOGFILE
    2190         res=$(($res+$?))
    21912054        rm -f $imagefile
    2192         if [ "$res" -ne "0" ]; then
    2193             LogIt "WARNING - failed to create 1.44MB boot/root floppies"
    2194             rm -f $imagesdir/mindi-*.1440.img
    2195         fi
    2196         return $res
     2055        return 0
    21972056    fi
    21982057    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
    21992058    max_kernel_size=$(($free_space+`du -sk $kernelpath | cut -f1`))
    2200     echo "Free space left on floppy = $free_space KB" >> $LOGFILE
    2201     echo "Max kernel size on $disksize KB floppy (est'd) = $max_kernel_size K" >> $LOGFILE
     2059    echo "Free space left on image = $free_space KB" >> $LOGFILE
     2060    echo "Max kernel size on $BOOT_SIZE KB image (est'd) = $max_kernel_size K" >> $LOGFILE
    22022061
    22032062    # make it bootable
     
    22132072        if [ "$KERN_DISK_MADE" ] ; then
    22142073            rm -f $imagefile
    2215             LogIt "$disksize KB boot disks were created OK\n"
     2074            LogIt "$BOOT_SIZE KB boot disks were created OK\n"
    22162075        fi
    22172076    else
    22182077        echo -en "...failed\n"
    2219         LogIt $disksize"KB boot disk was NOT created\n"
     2078        LogIt $BOOT_SIZE"KB boot disk was NOT created\n"
    22202079        rm -f $imagefile
    22212080    fi
     
    26882547
    26892548TurnTgzIntoRdz() {
    2690     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
     2549    local tgz_dir_fname rdz_fname ramdisksize tempfile mountpoint old_pwd nodes kernelsize maxsize res currsize not_copied j k s w
    26912550
    26922551    tgz_dir_fname=$1
    26932552    rdz_fname=$2
    26942553    ramdisksize=$3
    2695     disksize=$4
    2696     kernelsize=$5
    2697     maxsize=$(($disksize-$kernelsize))
     2554    kernelsize=$4
     2555    maxsize=$(($BOOT_SIZE-$kernelsize))
    26982556    maxsize=$(($maxsize*2)); # to allow for compression of 50%
    26992557    tempfile=$MINDI_TMP/temp.rd
     
    27452603    if [ "$YOUR_KERNEL_SUCKS" ] ; then
    27462604        cd $MINDI_TMP
    2747         floppy_modules_path=lib/modules/$FAILSAFE_KVER
     2605        needed_modules_path=lib/modules/$FAILSAFE_KVER
    27482606    else
    27492607        cd /
    2750 ###
    2751 ### Sq-Modification... Use kernel name in module path if specified.
    2752 ###
    2753         #floppy_modules_path=lib/modules/`uname -r`
    27542608        if [ "${kernelname}" != "" ]
    27552609        then
    2756             floppy_modules_path=lib/modules/${kernelname}
     2610            needed_modules_path=lib/modules/${kernelname}
    27572611        else
    2758             floppy_modules_path=lib/modules/`uname -r`
    2759         fi
    2760 ###
    2761 ### Sq-Modification end
    2762 ###
    2763     fi
    2764     floppy_modules=""
    2765     if [ "$disksize" -lt "2880" ] ; then
    2766         list_of_groovy_mods="$FLOPPY_MODS $FORCE_MODS $IDE_MODS ide-scsi sr_mod cdrom isocd isofs `WhichOfTheseModulesAreLoaded "$SCSI_MODS"`"
    2767     else
    2768         list_of_groovy_mods="$CDROM_MODS $FORCE_MODS `WhichOfTheseModulesAreLoaded "$SCSI_MODS"`"
    2769     fi
     2612            needed_modules_path=lib/modules/`uname -r`
     2613        fi
     2614    fi
     2615
     2616    needed_modules=""
     2617    list_of_groovy_mods="$CDROM_MODS $FORCE_MODS `WhichOfTheseModulesAreLoaded "$SCSI_MODS"`"
    27702618    if [ "$NFS_DEV" != "" ] ; then
    27712619        # For PXE boot
    27722620        list_of_groovy_mods="$list_of_groovy_mods $NET_MODS"
    27732621    fi
    2774     [ -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."
     2622    [ -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."
    27752623    for i in $list_of_groovy_mods ; do
    2776         floppy_modules="$floppy_modules `FindSpecificModuleInPath $floppy_modules_path $i`"
    2777     done
    2778     for i in $floppy_modules ; do
     2624        needed_modules="$needed_modules `FindSpecificModuleInPath $needed_modules_path $i`"
     2625    done
     2626    for i in $needed_modules ; do
    27792627        [ -e "$i" ] && s=`du -sk $i | cut -f1` || s=""
    27802628        [ "$YOUR_KERNEL_SUCKS" ] && i=$MINDI_TMP/$i
     
    27832631        [ "`echo "$i" | grep -F ".gz"`" ] && gunzip -f $mountpoint/`basename $i`
    27842632    done
    2785     if [ ! -e "/sbin/devfsd" ] || [ "$disksize" -lt "2880" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then
     2633    if [ ! -e "/sbin/devfsd" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then
    27862634        echo "Deleting devfsd daemon from ramdisk" >> $LOGFILE
    27872635        [ ! -e "/sbin/devfsd" ] && echo "...because /sbin/devfsd not found" >> $LOGFILE
    2788         [ "$disksize" -lt "2880" ] && echo "...because disksize = $disksize" >> $LOGFILE
    27892636        [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] && echo "...because kernel is failsafe" >> $LOGFILE
    27902637        rm -f $mountpoint/sbin/devfsd
     
    28002647    fi
    28012648    mkdir -p $mountpoint/proc
    2802     echo "$disksize" > $mountpoint/tmp/$disksize.siz
     2649    echo "$BOOT_SIZE" > $mountpoint/tmp/$BOOT_SIZE.siz
    28032650    find $mountpoint -name CVS -exec rm -rf '{}' \;
    28042651    # Determine what filesystem to use for initrd image
     
    33483195echo "Ramdisk will be $ramdisk_size KB" >> $LOGFILE
    33493196if [ "$ARCH" = "ia64" ] ; then
    3350     PrepareBootDiskImage_LILO $MINDI_CACHE $BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create ia64 floppy disk image."
     3197    PrepareBootDiskImage_LILO $MINDI_CACHE $kernelpath $ramdisk_size || Die "Failed to create ia64 image disk image."
    33513198else
    33523199    if [ "$USE_LILO" = "yes" ] ; then
    3353         PrepareBootDiskImage_LILO $MINDI_CACHE $BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create $BOOT_SIZE MB disk image."
    3354         fi
    3355     else
    3356         PrepareBootDiskImage_SYSLINUX $MINDI_CACHE $BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create $BOOT_SIZE MB disk image."
     3200        PrepareBootDiskImage_LILO $MINDI_CACHE $kernelpath $ramdisk_size || Die "Failed to create $BOOT_SIZE MB disk image."
     3201        fi
     3202    else
     3203        PrepareBootDiskImage_SYSLINUX $MINDI_CACHE $kernelpath $ramdisk_size || Die "Failed to create $BOOT_SIZE MB disk image."
    33573204    fi
    33583205fi
     
    33633210if [ _"$MONDO_SHARE" = _"" ]; then
    33643211    ListImagesForUser $MINDI_CACHE
    3365     if [ "$PROMPT_WRITE_BOOT_FLOPPIES" = "yes" ]; then
    3366         OfferToCopyImagesToDisks $MINDI_CACHE $boot_dev $FDDEVICE
    3367     fi
    33683212    OfferToMakeBootableISO $MINDI_CACHE
    33693213    if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ]; then
Note: See TracChangeset for help on using the changeset viewer.