Changeset 1075 in MondoRescue for branches/stable/mindi/mindi
- Timestamp:
- Jan 25, 2007, 4:18:59 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi/mindi
r1073 r1075 213 213 echo "Added kbd map $mappath" >> $LOGFILE 214 214 if [ ! -e "$mappath" ] ; then 215 mappath=`find $KEYDIR/keymaps | grep "i[3-8]86"| grep "$locale[^r][^/]" | grep -vx " *#.*"`215 mappath=`grep "i[3-8]86" $MINDI_TMP/keymaps.find | grep "$locale[^r][^/]" | grep -vx " *#.*"` 216 216 if [ ! -e "$mappath" ] ; then 217 217 LogIt "Cannot add $mappath: kbd map file not found" … … 231 231 for included_item in $included_list ; do 232 232 if [ ! -e "$included_item" ] ; then 233 sss=`find $KEYDIR/keymaps | grep -F "${included_item}.inc"`234 [ "$sss" = "" ] && sss=` find $KEYDIR/keymaps | grep -F "$included_item"`233 sss=`grep -F "${included_item}.inc" $MINDI_TMP/keymaps.find` 234 [ "$sss" = "" ] && sss=`grep -F "$included_item" $MINDI_TMP/keymaps.find` 235 235 for ii in $sss ; do 236 236 [ -e "$ii" ] && AddKeyboardMappingFile $ii … … 409 409 mkdir -p $mountpoint 410 410 dd if=/dev/zero of=$imagefile bs=1k count=1440 &> /dev/null || LogIt "Cannot dd (CODI)" 411 echo "Creating ext2 filesystem on $imagefile" >> $LOGFILE 411 412 mke2fs -N 12 -F $imagefile >> $LOGFILE 2>> $LOGFILE 412 413 mount -t ext2 -o loop $imagefile $mountpoint || Die "Can't loopmount $imagefile to $mountpoint! The reason may be missing support for loopfs or ext2 (or both) in the running kernel." … … 545 546 [ ! "$locale" ] && locale=`grep '.map$' "$keyfile" | sed 's/^.* //'` # Slackware 546 547 echo "locale=$locale" >> $LOGFILE 547 mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep -F "/${locale}." | grep -vx " *#.*"` 548 [ ! "$mp" ] && mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep "$locale[^r][^/]" | grep -vx " *#.*"` 548 # 549 # Process the keymaps dir once for all 550 # AddKeyboardMappingFile will use it recursively 551 # 552 find $KEYDIR/keymaps > $MINDI_TMP/keymaps.find 553 mp=`grep "i[3-8]86" $MINDI_TMP/keymaps.find | grep -F "/${locale}." | grep -vx " *#.*"` 554 [ ! "$mp" ] && mp=`grep "i[3-8]86" $MINDI_TMP/keymaps.find | grep "$locale[^r][^/]" | grep -vx " *#.*"` 549 555 # If we have multiple keymaps then log it !! 550 556 echo "$mp" | grep -q " " … … 1549 1555 if [ _"$MONDO_SHARE" != _"" ]; then 1550 1556 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?" 1551 cp $MINDI_TMP/mindi.rdz $MONDO_ROOT/initrd.img 2>> $LOGFILE 1557 cp $MINDI_TMP/mindi.rdz $MONDO_ROOT/initrd.img 2> /dev/null || Die "Cannot copy mindi.rdz ($MINDI_TMP/mindi.rdz) to mondo root ($MONDO_ROOT/vmlinuz). Did you run out of disk space?" 1558 1552 1559 fi 1553 1560 [ -e "$iso_cfg_file" ] || Die "FIXME - unable to find $iso_cfg_file - this should never occur" 1554 1561 cd $MINDI_TMP/iso/isolinux 1555 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?"1562 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?" 1556 1563 if [ -e "$MINDI_TMP/NFS-DEV" ] ; then 1557 1564 perl -pi -e 's/interactive/iso/' isolinux.cfg 1558 1565 fi 1559 1566 if [ "$ARCH" != "ia64" ] ; then 1560 cp $ISOLINUX isolinux.bin 2> /dev/null || Die "Cannot copy isolinux.bin ($ISOLINUX) to tmp_root- did you run out of disk space?"1567 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?" 1561 1568 cp $ISOLINUX ../ 2>> $LOGFILE 1562 1569 fi … … 1564 1571 if [ "$ARCH" != "ia64" ] ; then 1565 1572 if [ _"$MONDO_SHARE" != _"" ]; then 1566 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?"1567 cp -f $MONDO_SHARE/autorun . 1573 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?" 1574 cp -f $MONDO_SHARE/autorun . 2>> $LOGFILE 1568 1575 fi 1569 1576 mkisofs -U -J -r -o $CACHE_LOC/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 … … 1599 1606 echo -en "Transforming $USBDEV in a Bootable device " 1600 1607 echo -en "." 1608 echo "Transforming $USBDEV in a Bootable device" >> $LOGFILE 1601 1609 echo "Checking $USBDEV" >> $LOGFILE 1602 1610 $FDISK -l $USBDEV 2>&1 >> $LOGFILE … … 1676 1684 if [ _"$MONDO_SHARE" != _"" ]; then 1677 1685 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?" 1678 cp $MINDI_TMP/mindi.rdz $MONDO_ROOT/initrd.img 2>> $LOGFILE 1686 cp $MINDI_TMP/mindi.rdz $MONDO_ROOT/initrd.img 2> /dev/null || Die "Cannot copy mindi.rdz ($MINDI_TMP) to mondo root ($MONDO_ROOT/initrd.img). Did you run out of disk space?" 1687 1679 1688 fi 1680 1689 echo -en "." 1681 1690 [ -e "$iso_cfg_file" ] || Die "FIXME - unable to find $iso_cfg_file - this should never occur" 1682 cat $sys_cfg_file | HackSyslinuxFile $ramdisk_size $MINDI_TMP/usb > syslinux.cfg || Die "Cannot copy syslinux.cfg from mindi_home to tmp_root- did you run out of disk space?"1691 cat $sys_cfg_file | HackSyslinuxFile $ramdisk_size $MINDI_TMP/usb > syslinux.cfg || Die "Cannot copy syslinux.cfg from mindi_home to $MINDI_TMP/usb - did you run out of disk space?" 1683 1692 echo -en "." 1684 1693 if [ -e "$MINDI_TMP/NFS-DEV" ] ; then … … 1686 1695 fi 1687 1696 cd $old_pwd 1688 umount $MINDI_TMP/usb1689 1697 echo -en "." 1690 1698 if [ "$ARCH" != "ia64" ] ; then 1691 1699 if [ _"$MONDO_SHARE" != _"" ]; then 1692 cp -f $MINDI_TMP/usb/syslinux/{syslinux.cfg,initrd.img,vmlinuz,message.txt} $MONDO_ROOT 2> /dev/null || Die "Cannot copy core files to ramdisk for boot disk. Did you run out of disk space?" 1693 cp -f $MONDO_SHARE/autorun . 2>> $LOGFILE 1694 fi 1700 cp -f $MINDI_TMP/usb/{syslinux.cfg,initrd.img,vmlinuz,message.txt} $MONDO_ROOT 2>> $LOGFILE || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_ROOT). Did you run out of disk space?" 1701 cp -f $MONDO_SHARE/autorun $MONDO_ROOT 2>> $LOGFILE 1702 fi 1703 umount $MINDI_TMP/usb 1695 1704 syslinux $USBPART 2>> $MINDI_TMP/syslinux.log 1696 1705 else 1697 1706 echo "No USB boot support for ia64" | tee -a $LOGFILE 1707 umount $MINDI_TMP/usb 1698 1708 MindiExit -1 1699 1709 fi … … 1758 1768 mtpt=$MINDI_TMP/$rand1.$rand2.mtpt 1759 1769 dd if=/dev/zero of=$image bs=1k count=$disksize &> /dev/null 1770 echo "Creating ext2 filesystem on $image" >> $LOGFILE 1760 1771 mke2fs -N 26 -F $image &> /dev/null 1761 1772 mkdir -p $mtpt … … 1898 1909 t=vfat 1899 1910 else 1911 echo "Creating ext2 filesystem on $imagefile" >> $LOGFILE 1900 1912 mke2fs -N 26 -m 0 -F $imagefile >> $LOGFILE 2>> $LOGFILE 1901 1913 t=ext2 … … 2070 2082 else 2071 2083 dd if=/dev/zero of=$imagefile bs=1k count=$disksize &> /dev/null || Die "Cannot dd blank file" 2084 echo "Creating vfat filesystem on $imagefile" >> $LOGFILE 2072 2085 mkfs.vfat $imagefile >> $LOGFILE 2>> $LOGFILE 2073 2086 syslinux $imagefile >> $LOGFILE 2>> $LOGFILE … … 2634 2647 dd if=/dev/zero of=$tempfile bs=1k count=$ramdisk_size &> /dev/null || Die "Not enough room for temporary ramdisk (TurnTgzIntoRdz)" 2635 2648 echo -en "..." 2649 echo "Creating ext2 filesystem on $tempfile" >> $LOGFILE 2636 2650 mke2fs -b 1024 -m 1 -i 2048 -F $tempfile >> $LOGFILE 2>> $LOGFILE 2637 2651 echo -en "..." … … 2950 2964 done 2951 2965 2966 # 2967 # If we have a USB device we need to store info 2968 # and remove it from the parameters line 2969 # 2970 if [ "$#" -ne "0" ] ; then 2971 if [ "$1" = "--usb" ] ; then 2972 shift 2973 USBDEV=$1 2974 if [ _"$USBDEV" = _"" ]; then 2975 Die "No USB device specified" 2976 fi 2977 shift 2978 fi 2979 fi 2980 2981 # 2982 # Deal with parameters 2983 # 2952 2984 if [ "$#" -ne "0" ] ; then 2953 2985 if [ "$1" = "--findkernel" ] ; then … … 2963 2995 MakeMountlist $2 2964 2996 MindiExit $? 2965 elif [ "$1" = "--usb" ] ; then2966 shift2967 USBDEV=$12968 if [ _"$USBDEV" = _"" ]; then2969 Die "No USB device specified"2970 fi2971 LogIt "Generating Bootable USB device on $USBDEV"2972 shift2973 2997 elif [ "$1" = "-V" ] || [ "$1" = "-v" ] || [ "$1" = "--version" ] || [ "$1" = "-version" ] ; then 2974 2998 echo "Mindi v$MINDI_VERSION" … … 2992 3016 kernelpath=$4; [ "$kernelpath" = "(null)" ] && kernelpath="" 2993 3017 ### 2994 ### Sq-Modification...2995 3018 ### Attempt to locate kernel specific module path 2996 3019 ### if module path is found then use it other wise use uname -r to set it... 2997 3020 ### 3021 if [ "$kernelpath" = "" ]; then 3022 kernelpath=`TryToFindKernelPath` 3023 fi 2998 3024 kernelname=`echo $kernelpath | cut -d'-' -f2-` 2999 3025 LogIt "kernelname = $kernelname" … … 3007 3033 LogIt "Using modules for kernel: ${kernelname}" 3008 3034 fi 3009 ###3010 ### end of Sq-Modification3011 ###3012 3035 TAPEDEV=$5 3013 3036 TAPESIZE=$6 … … 3038 3061 [ "$NOT_BOOT" = "" ] && NOT_BOOT=no 3039 3062 [ "$TAPEDEV" ] && LogIt "This is a tape-based backup. Fine." 3040 [ "$kernelpath" = "" ] && kernelpath=`TryToFindKernelPath`3041 kernelname=`echo $kernelpath | cut -d'-' -f2-`3042 if [ ! -d "/lib/modules/$kernelname" ] && [ "$kernelpath" != "FAILSAFE" ]3043 then3044 LogIt "Module path for ${kernelpath} not found..."3045 LogIt "using running kernel\'s modules."3046 kernelname=`uname -r`3047 else3048 LogIt "Using modules for kernel: ${kernelname}"3049 fi3050 3063 [ "$CDRECOVERY" = "yes" ] && [ "$TAPEDEV" != "" ] && Die "Sorry, you can't use --cd-recovery and --write-tapes at the same time" 3051 3064 MONDO_ROOT=`echo $CACHE_LOC | sed 's/\(.*\)\/.*/\1/'` … … 3109 3122 fi 3110 3123 3124 if [ _"$USBDEV" != _"" ]; then 3125 LogIt "Including the generation of a Bootable USB device on $USBDEV" 3126 fi 3111 3127 if [ "$kernelpath" = "" ] ; then 3112 3128 if [ _"$MONDO_SHARE" != _"" ]; then
Note:
See TracChangeset
for help on using the changeset viewer.