- Timestamp:
- Aug 26, 2015, 12:15:40 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi/mindi
r3420 r3421 113 113 ISO_OPT="-J -r -v -p Mindi -publisher http://www.mondorescue.org -A Mindi" 114 114 115 # Mindi should master this in fact 116 #BOOT_TYPE="BIOS" 115 # Mindi set this as default in case it's invoked alone 116 BOOT_TYPE="BIOS" 117 # and we also check whether we're UEFI or not. 118 if [ -d "/sys/firmware/efi" ]; then 119 BOOT_TYPE="UEFI" 120 fi 117 121 118 122 # Mandriva system e.g. use cdrkit, which uses genisoimage instead of mkisofs. … … 1489 1493 cp $ISOLINUX $MINDI_TMP/iso/isolinux.bin 2>> $LOGFILE || Die "Cannot copy isolinux.bin ($ISOLINUX) to $MINDI_TMP/iso - did you run out of disk space?" 1490 1494 fi 1495 1496 # copy boot stuff now generated in PrepareDataDiskImage 1497 if [ $BIOS_TYPE = "UEFI" ]; then 1498 (cd $MINDI_TMP/iso ; tar xfz $MINDI_CACHE/all.tar.gz ./EFI) 1499 tbc="EFI" 1500 else 1501 (cd $MINDI_TMP/iso ; tar xfz $MINDI_CACHE/all.tar.gz ./boot) 1502 tbc="boot" 1503 fi 1504 1491 1505 old_pwd=`pwd` 1492 1506 cd "$MINDI_TMP/iso" 1493 1507 if [ "$ARCH" != "ia64" ] ; then 1494 1508 if [ _"$MONDO_SHARE" != _"" ]; then 1495 cp - f $MINDI_TMP/iso/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt,boot*.txt,pxe.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?"1509 cp -rf $MINDI_TMP/iso/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt,boot.*,pxe.txt,$tbc} $MONDO_ROOT 2>> $LOGFILE || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_ROOT). Did you run out of disk space?" 1496 1510 if [ -e $MINDI_TMP/iso/ldlinux.c32 ]; then 1497 1511 cp $MINDI_TMP/iso/ldlinux.c32 $MONDO_ROOT 2>> $LOGFILE || Die "Cannot copy ldlinux.c32 (from $MINDI_TMP/iso/$LDLINUXC32) to $MONDO_ROOT. Did you run out of disk space?" … … 1502 1516 cp -f $MONDO_SHARE/autorun $MINDI_TMP/iso 2>> $LOGFILE 1503 1517 fi 1504 $ISO_CMD -U $ISO_OPT -V Mindi_Image -o $MINDI_CACHE/mindi.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table . > /dev/null 2> $MINDI_TMP/mkisofs.log1518 CMD="$ISO_CMD -U $ISO_OPT -V Mindi_Image -o $MINDI_CACHE/mindi.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table ." 1505 1519 else 1506 $ISO_CMD $ISO_OPT -V Mindi_Image -o $MINDI_CACHE/mindi.iso -b images/mindi-bootroot.img -c images/boot.cat -no-emul-boot . > /dev/null 2> $MINDI_TMP/mkisofs.log 1507 fi 1520 CMD="$ISO_CMD $ISO_OPT -V Mindi_Image -o $MINDI_CACHE/mindi.iso -b images/mindi-bootroot.img -c images/boot.cat -no-emul-boot ." 1521 fi 1522 LogFile "Invoking $CMD" 1523 $CMD > /dev/null 2> $MINDI_TMP/mkisofs.log 1508 1524 if [ "$?" -ne "0" ] ; then 1509 1525 LogFile "----------- $ISO_CMD's errors --------------" … … 1876 1892 mount -t vfat -o loop $imagefile $mountpoint || LogAll "ERROR: Cannot mount (PBDI)" 1877 1893 1878 # copy boot stuff into it now generated in PrepareDataDisk1879 (cd $mountpoint ; tar xfz $MINDI_CACHE/all.tar.gz boot)1880 1881 1894 LogFile "INFO: Copying $MINDI_TMP/initrd.img to $mountpoint/initrd.img..." 1882 1895 cp -f $MINDI_TMP/initrd.img $mountpoint/initrd.img 2>> $LOGFILE … … 2093 2106 if [ "$BOOT_TYPE" = "UEFI" ]; then 2094 2107 # UEFI 2095 lilodir=$b ootdir/EFI2108 lilodir=$bigdir/EFI/BOOT 2096 2109 mkdir -p $lilodir 2097 2110 liloconf="$lilodir/grub.conf" 2098 lilobin="grub.efi" 2111 # grub.efi for rhel6 and grubx64.efi for rhel7 2112 lilobin="grub*.efi" 2099 2113 2100 2114 MakeBootConfFile grub > $liloconf … … 2120 2134 mountefi=1 2121 2135 fi 2122 el=`find /boot/efi -iname $lilobin`2136 el=`find /boot/efi -iname "$lilobin"` 2123 2137 cp $el $lilodir 2124 2138 if [ $mountefi -eq 1 ]; then … … 2129 2143 fi 2130 2144 2131 if [ "$BOOT_TYPE" = "UEFI"] && [ -f "$lilodir/grub.conf" ]; then2145 #if [ "$BOOT_TYPE" = "UEFI" ] && [ -f "$lilodir/grub.conf" ]; then 2132 2146 # for grub 0.97 the conf file is not read with the grub.efi file :-( 2133 2147 # Not very nice, but needed it seems 2134 LogFile "Copying grub.conf file as we use legacy grub on UEFI"2135 mkdir -p $bootdir/boot/grub2136 cp $lilodir/grub.conf $bootdir/boot/grub2137 fi2148 #LogFile "Copying grub.conf file as we use legacy grub on UEFI" 2149 #mkdir -p $bootdir/boot/grub 2150 #cp $lilodir/grub.conf $bootdir/boot/grub 2151 #fi 2138 2152 2139 2153 echo -en "Tarring and zipping the data content..." … … 3354 3368 LogIt "--------------------------" 3355 3369 else 3356 LogIt "ERROR: You don't have a $MRCFG file !" 3370 if [ _"$MONDO_SHARE" != _"" ] ; then 3371 LogIt "ERROR: You don't have a $MRCFG file !" 3372 fi 3357 3373 fi 3358 3374 # cleanup
Note:
See TracChangeset
for help on using the changeset viewer.