Changeset 1573 in MondoRescue
- Timestamp:
- Jul 26, 2007, 3:05:22 AM (18 years ago)
- Location:
- branches/stable/mindi
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi/distributions/conf/mindi.conf.dist
r1535 r1573 28 28 # 29 29 mindi_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"40 30 41 31 # … … 113 103 mindi_cdrom_mods="cdrom isocd isofs inflate_fs nls_iso8859-1 nls_cp437 sg sr_mod zlib_inflate" 114 104 mindi_tape_mods="ht st osst ide-tape ide_tape" 115 mindi_floppy_mods="ide-floppy floppy"116 105 mindi_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" 117 106 mindi_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 6 6 # mindi - mini-Linux distro based on the user's filesystem & distribution 7 7 # 8 # Mindi can create a multi- floppy boot/root kit. The first floppyis the boot8 # Mindi can create a multi-image boot/root kit. The first image is the boot 9 9 # disk: it contains a kernel, a ramdisk etc. The second disk is data disk #1; 10 10 # the third disk is data disk #2; and so it goes. … … 17 17 18 18 #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 before19 # after booting from image/CD image but before 20 20 # accessing auxiliary data disks (or the rest of 21 21 # the CD), the initscript will run the above command. … … 63 63 64 64 if [ "$INTERACTIVE" = "yes" ]; then 65 # do you want to be prompted to write66 # floppy images out to floppy disks?67 # if 'no', images will not be written to floppies68 PROMPT_WRITE_BOOT_FLOPPIES="yes"69 70 65 # Ask if you want to make a CD Image to be written? 71 66 # if this is set to 'no', then the image will be created automatically … … 86 81 DEPLIST_DIR="$MINDI_CONF/deplist.d" 87 82 DEPLIST_FILE="$MINDI_CONF/$mindi_deplist_file" 88 WRITE_BOOT_FLOPPIES="$mindi_write_boot_floppy"89 83 PROMPT_MAKE_CD_IMAGE="$mindi_write_cd" 90 84 PROMPT_MAKE_USB_IMAGE="$mindi_write_usb" … … 100 94 MY_FSTAB="$mindi_etc_fstab" 101 95 LOGFILE="$mindi_log_file" 102 FLOPPY_MODS="$mindi_floppy_mods"103 96 TAPE_MODS="$mindi_tape_mods" 104 97 SCSI_MODS="$mindi_scsi_mods" … … 106 99 PCMCIA_MODS="$mindi_pcmcia_mods" 107 100 USB_MODS="$mindi_usb_mods" 108 CDROM_MODS="$TAPE_MODS $ FLOPPY_MODS $IDE_MODS $mindi_cdrom_mods $USB_MODS $PCMCIA_MODS"101 CDROM_MODS="$TAPE_MODS $IDE_MODS $mindi_cdrom_mods $USB_MODS $PCMCIA_MODS" 109 102 NET_MODS="$mindi_net_mods" 110 103 EXTRA_MODS="$CDROM_MODS $mindi_extra_mods $mindi_additional_mods" … … 155 148 156 149 AddFileToDir() { 157 local filename minidir_root noof_disks diskno res filesize disksizewould_occupy zipsize complevel cutoff compressed_fname siz150 local filename minidir_root noof_disks diskno res filesize would_occupy zipsize complevel cutoff compressed_fname siz 158 151 filename=$1 159 152 minidir_root=$2 … … 1542 1535 1543 1536 1544 OfferToCopyImagesToDisks() {1545 local imagesdir i imagename dev count boot_dev data_dev1546 imagesdir=$11547 boot_dev=$21548 data_dev=$31549 1550 echo -en "Would you like to create boot+data floppy disks now (y/[n]) ?"1551 read i1552 [ "$i" != "y" ] && [ "$i" != "Y" ] && return1553 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.files1558 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" ] ; then1561 CopyImageToDisk $j $data_dev "boot disk"1562 CopyImageToDisk $i $data_dev "root disk"1563 else1564 CopyImageToDisk $j $boot_dev "boot/root disk"1565 fi1566 count=11567 for i in `grep -F mindi-data $MINDI_TMP/imagesdir.files` ; do1568 CopyImageToDisk $i $data_dev "data disk #$count"1569 count=$(($count+1))1570 done1571 rm -f $MINDI_TMP/imagesdir.files1572 }1573 1574 1575 1537 OfferToMakeBootableISO() { 1576 1538 local i old_pwd … … 1792 1754 1793 1755 MakeMessageFile() { 1794 local disksize1795 disksize=$11796 1756 if [ "`grep -Fi "debian" /etc/issue.net 2> /dev/null`" ] ; then 1797 1757 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`"/ … … 1799 1759 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`/ 1800 1760 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" 1811 1769 fi 1812 1770 fi … … 1821 1779 1822 1780 1823 write_full_floppy_of_kernel() {1824 local mtpt image old_pwd res disksize1825 1826 res=01827 old_pwd=`pwd`1828 KERN_DISK_MADE=11829 disksize=$31830 rand1=$RANDOM1831 rand2=$RANDOM1832 image=$MINDI_TMP/$rand1.$rand2.img1833 mtpt=$MINDI_TMP/$rand1.$rand2.mtpt1834 dd if=/dev/zero of=$image bs=1k count=$disksize &> /dev/null1835 echo "Creating ext2 filesystem on $image" >> $LOGFILE1836 mke2fs -N 26 -F $image &> /dev/null || Die "Unable to create an ext2 file system on $image"1837 mkdir -p $mtpt1838 mount -o loop $image $mtpt1839 cd $mtpt1840 mkdir -p {dev,tmp,boot}1841 cp -f $1 vmlinuz 2>> $LOGFILE1842 if [ "$?" -ne "0" ] ; then1843 LogIt "Failed to copy $1 to ramdisk"1844 cd $old_pwd1845 umount $mtpt1846 rmdir $mtpt1847 rm $image1848 return 11849 fi1850 1851 rdev vmlinuz 2,01852 rdev -R vmlinuz 01853 rdev -r vmlinuz 491521854 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/null1858 #[ "$?" -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.b1860 1861 MakeLiloConfFile $disksize >> bdlilo.conf1862 1863 chmod 644 bdlilo.conf1864 MakeMessageFile $disksize > message1865 lilo -v -C bdlilo.conf -r $mtpt1866 res=$?1867 1868 cd $old_pwd1869 umount $mtpt1870 mv -f $image $21871 rmdir $mtpt1872 1873 return $res1874 }1875 1876 1877 1781 MakeLiloConfFile() { 1878 local disksize options i ooo 1879 disksize=$1 1782 local options i ooo 1880 1783 options="" 1881 1784 1882 1785 if [ "$ARCH" != "ia64" ] ; then 1883 1786 echo -en "boot=/dev/loop0\ndisk=/dev/loop0\n" 1884 fi1885 if [ "$disksize" -eq "2880" ] ; then1886 echo -en "bios=0x00\nsectors=36\nheads=2\ncylinders=80\n"1887 elif [ "$disksize" -gt "2880" ] ; then1888 /bin/true1889 else1890 echo -en "bios=0x00\nsectors=18\nheads=2\ncylinders=80\n"1891 fi1892 if [ "$ARCH" != "ia64" ] ; then1893 1787 echo -en "install=/boot.b\nmap=/boot.map\n" 1894 1788 fi 1895 1789 if [ "$CDRECOVERY" = "yes" ] ; then 1896 1790 echo -en "default=RESTORE\n" 1897 elif [ "$disksize" -gt "2880" ] && [_"$MONDO_SHARE" != _"" ]; then1791 elif [ _"$MONDO_SHARE" != _"" ]; then 1898 1792 if [ "$NFS_DEV" != "" ] ; then 1899 1793 echo -en "default=iso\n" … … 1915 1809 if [ "$CDRECOVERY" = "yes" ] ; then 1916 1810 options="RESTORE expert" 1917 el if [ "$disksize" -gt "2880" ] ; then1811 else 1918 1812 if [ _"$MONDO_SHARE" != _"" ]; then 1919 1813 if [ "$NFS_DEV" != "" ] ; then … … 1926 1820 options="expert" 1927 1821 fi 1928 else1929 options="expert"1930 1822 fi 1931 1823 for i in $options ; do … … 1941 1833 outstr=$outstr" $ooo_mode" 1942 1834 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" 1948 1836 done 1949 1837 } … … 1951 1839 1952 1840 PrepareBootDiskImage_LILO() { 1953 local disksizeimagesdir dev imagefile mountpoint fname i kernelpath ramdisksize cfg_file testpath options retval outstr old_pwd ooo max_kernel_size liloconf1841 local imagesdir dev imagefile mountpoint fname i kernelpath ramdisksize cfg_file testpath options retval outstr old_pwd ooo max_kernel_size liloconf 1954 1842 imagesdir=$1 1955 disksize=$2 1956 kernelpath=$3 1957 ramdisksize=$4 1843 kernelpath=$2 1844 ramdisksize=$3 1958 1845 1959 1846 retval=0 1960 1847 [ ! -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?" 1966 1850 echo -en "..." 1967 imagefile=$imagesdir/mindi-bootroot.$ disksize.img1851 imagefile=$imagesdir/mindi-bootroot.$BOOT_SIZE.img 1968 1852 mountpoint=$MINDI_TMP/mountpoint.$$ 1969 1853 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" 1971 1855 if [ "$ARCH" = "ia64" ] ; then 1972 1856 mkdosfs $imagefile >> $LOGFILE 2>> $LOGFILE … … 1996 1880 CopyBootBFile $mountpoint/boot.b 1997 1881 1998 MakeLiloConfFile $disksize> $liloconf1882 MakeLiloConfFile > $liloconf 1999 1883 2000 1884 # Copy it so that CD-ROM menu entry is satisfied … … 2027 1911 retval=$(($retval+1)) 2028 1912 fi 2029 MakeMessageFile $disksize> $mountpoint/message1913 MakeMessageFile > $mountpoint/message 2030 1914 2031 1915 mkdir -p $mountpoint/tmp … … 2042 1926 free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4` 2043 1927 cp -f $kernelpath $mountpoint/vmlinuz > /dev/null 2> /dev/null 2044 if [ "$?" -ne "0" ] || [ "$FORCE_DUAL_FLOPPIES" = "yes" ]; then1928 if [ "$?" -ne "0" ] ; then 2045 1929 echo "Files at mountpoint ($mountpoint) :-" >> $LOGFILE 2046 1930 du -sk $mountpoint/* >> $LOGFILE 2047 1931 echo "--- end of list of files ---" >> $LOGFILE 2048 1932 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" >> $LOGFILE1933 Sorry, your kernel is too big for your image.\n" >> $LOGFILE 2050 1934 rm -f $mountpoint/vmlinuz 2051 1935 cd $old_pwd … … 2053 1937 rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)" 2054 1938 # losetup /dev/loop0 -d 2055 res=02056 write_full_floppy_of_kernel $kernelpath $imagesdir/mindi-boot.1440.img 14402057 res=$(($res+$?))2058 cp -f $MINDI_TMP/mindi.rdz $imagesdir/mindi-root.1440.img 2>> $LOGFILE2059 res=$(($res+$?))2060 1939 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 2066 1941 fi 2067 1942 free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4` 2068 1943 max_kernel_size=$(($free_space+`du -sk $kernelpath | cut -f1`)) 2069 echo "Free space left on floppy= $free_space KB" >> $LOGFILE2070 echo "Max kernel size on $ disksize KB floppy(est'd) = $max_kernel_size K" >> $LOGFILE1944 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 2071 1946 # make it bootable 2072 1947 rm -f $mountpoint/zero 2073 1948 [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 2>> $LOGFILE 2074 if [ "$disksize" -gt "2880" ] && [! "$KERN_DISK_MADE" ] ; then1949 if [ ! "$KERN_DISK_MADE" ] ; then 2075 1950 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 2083 1953 else 2084 1954 echo "Not running LILO. It's not that kind of disk." >> $LOGFILE … … 2107 1977 echo -en "...$DONE\n" 2108 1978 if [ "$KERN_DISK_MADE" ] ; then 2109 LogIt "$ disksizeKB boot disks were created OK\n"1979 LogIt "$BOOT_SIZE KB boot disks were created OK\n" 2110 1980 fi 2111 1981 else 2112 1982 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" 2114 1984 rm -f $imagefile 2115 1985 fi … … 2120 1990 2121 1991 PrepareBootDiskImage_SYSLINUX() { 2122 local disksizeimagesdir dev imagefile mountpoint fname i kernelpath ramdisksize cfg_file testpath options retval outstr old_pwd ooo max_kernel_size bootimage1992 local imagesdir dev imagefile mountpoint fname i kernelpath ramdisksize cfg_file testpath options retval outstr old_pwd ooo max_kernel_size bootimage 2123 1993 imagesdir=$1 2124 disksize=$2 2125 kernelpath=$3 2126 ramdisksize=$4 1994 kernelpath=$2 1995 ramdisksize=$3 2127 1996 do_boot_root_thingy="" 2128 1997 local retval old_pwd … … 2130 1999 2131 2000 [ ! -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?" 2135 2003 echo -en "..." 2136 imagefile=$imagesdir/mindi-bootroot.$ disksize.img2004 imagefile=$imagesdir/mindi-bootroot.$BOOT_SIZE.img 2137 2005 mountpoint=$MINDI_TMP/mountpoint.$$ 2138 2006 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" 2140 2008 echo "Creating vfat filesystem on $imagefile" >> $LOGFILE 2141 2009 mkfs.vfat $imagefile >> $LOGFILE 2>> $LOGFILE … … 2173 2041 free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4` 2174 2042 cp -f $kernelpath $mountpoint/vmlinuz &> /dev/null 2175 if [ "$?" -ne "0" ] || [ "$FORCE_DUAL_FLOPPIES" = "yes" ]; then2043 if [ "$?" -ne "0" ] ; then 2176 2044 echo "Files at mountpoint ($mountpoint) :-" >> $LOGFILE 2177 2045 du -sk $mountpoint/* >> $LOGFILE 2178 2046 echo "--- end of list of files ---" >> $LOGFILE 2179 2047 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" >> $LOGFILE2048 Sorry, your kernel is too big for your image.\n" >> $LOGFILE 2181 2049 rm -f $mountpoint/vmlinuz 2182 2050 cd $old_pwd … … 2184 2052 rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)" 2185 2053 2186 res=02187 write_full_floppy_of_kernel $kernelpath $imagesdir/mindi-boot.1440.img 14402188 res=$(($res+$?))2189 cp -f $MINDI_TMP/mindi.rdz $imagesdir/mindi-root.1440.img 2>> $LOGFILE2190 res=$(($res+$?))2191 2054 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 2197 2056 fi 2198 2057 free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4` 2199 2058 max_kernel_size=$(($free_space+`du -sk $kernelpath | cut -f1`)) 2200 echo "Free space left on floppy= $free_space KB" >> $LOGFILE2201 echo "Max kernel size on $ disksize KB floppy(est'd) = $max_kernel_size K" >> $LOGFILE2059 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 2202 2061 2203 2062 # make it bootable … … 2213 2072 if [ "$KERN_DISK_MADE" ] ; then 2214 2073 rm -f $imagefile 2215 LogIt "$ disksizeKB boot disks were created OK\n"2074 LogIt "$BOOT_SIZE KB boot disks were created OK\n" 2216 2075 fi 2217 2076 else 2218 2077 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" 2220 2079 rm -f $imagefile 2221 2080 fi … … 2688 2547 2689 2548 TurnTgzIntoRdz() { 2690 local tgz_dir_fname rdz_fname ramdisksize tempfile mountpoint old_pwd nodes disksize kernelsize maxsize res currsize not_copied j k floppy_moduless w2549 local tgz_dir_fname rdz_fname ramdisksize tempfile mountpoint old_pwd nodes kernelsize maxsize res currsize not_copied j k s w 2691 2550 2692 2551 tgz_dir_fname=$1 2693 2552 rdz_fname=$2 2694 2553 ramdisksize=$3 2695 disksize=$4 2696 kernelsize=$5 2697 maxsize=$(($disksize-$kernelsize)) 2554 kernelsize=$4 2555 maxsize=$(($BOOT_SIZE-$kernelsize)) 2698 2556 maxsize=$(($maxsize*2)); # to allow for compression of 50% 2699 2557 tempfile=$MINDI_TMP/temp.rd … … 2745 2603 if [ "$YOUR_KERNEL_SUCKS" ] ; then 2746 2604 cd $MINDI_TMP 2747 floppy_modules_path=lib/modules/$FAILSAFE_KVER2605 needed_modules_path=lib/modules/$FAILSAFE_KVER 2748 2606 else 2749 2607 cd / 2750 ###2751 ### Sq-Modification... Use kernel name in module path if specified.2752 ###2753 #floppy_modules_path=lib/modules/`uname -r`2754 2608 if [ "${kernelname}" != "" ] 2755 2609 then 2756 floppy_modules_path=lib/modules/${kernelname}2610 needed_modules_path=lib/modules/${kernelname} 2757 2611 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"`" 2770 2618 if [ "$NFS_DEV" != "" ] ; then 2771 2619 # For PXE boot 2772 2620 list_of_groovy_mods="$list_of_groovy_mods $NET_MODS" 2773 2621 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." 2775 2623 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 ; do2624 needed_modules="$needed_modules `FindSpecificModuleInPath $needed_modules_path $i`" 2625 done 2626 for i in $needed_modules ; do 2779 2627 [ -e "$i" ] && s=`du -sk $i | cut -f1` || s="" 2780 2628 [ "$YOUR_KERNEL_SUCKS" ] && i=$MINDI_TMP/$i … … 2783 2631 [ "`echo "$i" | grep -F ".gz"`" ] && gunzip -f $mountpoint/`basename $i` 2784 2632 done 2785 if [ ! -e "/sbin/devfsd" ] || [ "$ disksize" -lt "2880" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then2633 if [ ! -e "/sbin/devfsd" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then 2786 2634 echo "Deleting devfsd daemon from ramdisk" >> $LOGFILE 2787 2635 [ ! -e "/sbin/devfsd" ] && echo "...because /sbin/devfsd not found" >> $LOGFILE 2788 [ "$disksize" -lt "2880" ] && echo "...because disksize = $disksize" >> $LOGFILE2789 2636 [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] && echo "...because kernel is failsafe" >> $LOGFILE 2790 2637 rm -f $mountpoint/sbin/devfsd … … 2800 2647 fi 2801 2648 mkdir -p $mountpoint/proc 2802 echo "$ disksize" > $mountpoint/tmp/$disksize.siz2649 echo "$BOOT_SIZE" > $mountpoint/tmp/$BOOT_SIZE.siz 2803 2650 find $mountpoint -name CVS -exec rm -rf '{}' \; 2804 2651 # Determine what filesystem to use for initrd image … … 3348 3195 echo "Ramdisk will be $ramdisk_size KB" >> $LOGFILE 3349 3196 if [ "$ARCH" = "ia64" ] ; then 3350 PrepareBootDiskImage_LILO $MINDI_CACHE $ BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create ia64 floppydisk image."3197 PrepareBootDiskImage_LILO $MINDI_CACHE $kernelpath $ramdisk_size || Die "Failed to create ia64 image disk image." 3351 3198 else 3352 3199 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." 3357 3204 fi 3358 3205 fi … … 3363 3210 if [ _"$MONDO_SHARE" = _"" ]; then 3364 3211 ListImagesForUser $MINDI_CACHE 3365 if [ "$PROMPT_WRITE_BOOT_FLOPPIES" = "yes" ]; then3366 OfferToCopyImagesToDisks $MINDI_CACHE $boot_dev $FDDEVICE3367 fi3368 3212 OfferToMakeBootableISO $MINDI_CACHE 3369 3213 if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ]; then
Note:
See TracChangeset
for help on using the changeset viewer.