Changeset 3532 in MondoRescue for branches


Ignore:
Timestamp:
Mar 9, 2016, 6:47:39 PM (8 years ago)
Author:
Bruno Cornec
Message:
  • Create a new MakeISO function to share that code
  • Fix ia64 case where you need to remount the bootable media to store the image before using it
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/mindi

    r3531 r3532  
    14771477}
    14781478
     1479MakeISO() {
     1480
     1481LogAll "INFO: Invoking $CMD"
     1482(cd "$MINDI_TMP/mpt" ; $CMD .) > /dev/null 2> $MINDI_TMP/mkisofs.log
     1483if [ $? -ne 0 ] ; then
     1484    if [ "$BOOT_TYPE" = "UEFI" ]; then
     1485        CMD=`echo $CMD | perl -p -e 's|--efi-boot |-eltorito-platform 0xEF -eltorito-boot |; s|-efi-boot |-eltorito-platform 0xEF -eltorito-boot |;'`
     1486        LogAll "INFO: Invoking instead $CMD"
     1487        (cd "$MINDI_TMP/mpt" ; $CMD .) > /dev/null 2> $MINDI_TMP/mkisofs.log
     1488        if [ $? -eq 0 ] ; then
     1489            LogAll "INFO: Created bootable ISO image at $MINDI_CACHE/mindi.iso"
     1490        else
     1491            MakeISOErrors
     1492        fi
     1493    else
     1494        MakeISOErrors
     1495    fi
     1496else
     1497    LogAll "INFO: Created bootable ISO image at $MINDI_CACHE/mindi.iso"
     1498fi
     1499rm -f $MINDI_TMP/mkisofs.log
     1500}
     1501
    14791502MakeBootableDevice() {
    14801503
     
    17081731    MindiExit -1
    17091732fi
     1733if  [ "$target" = "ISO" ]; then
     1734    if [ "$BOOT_TYPE" = "BIOS" ]; then
     1735        # syslinux should be run on a local file (doen't work through NFS Cf: #297)
     1736        # and run after the formating for versions > 6 it seems
     1737        syslinux $part >> $LOGFILE 2>> $LOGFILE
     1738    fi
     1739fi
    17101740LogAll "INFO: Mounting $part on $MINDI_TMP/mpt"
    17111741mount -t vfat $mount_opt $part $MINDI_TMP/mpt 2>> $LOGFILE
     
    17361766    if [ "$ARCH" != "ia64" ] ; then
    17371767        CMD="$ISO_CMD $ISO_OPT -b $tbc/isolinux.bin -c $tbc/boot.cat -U -boot-load-size 4 -boot-info-table"
     1768        MakeISO
    17381769    else
    17391770        CMD="$ISO_CMD $ISO_OPT -b images/mindi-bootroot.img -c images/boot.cat"
    17401771    fi
    1741     LogAll "INFO: Invoking $CMD"
    1742     (cd "$MINDI_TMP/mpt" ; $CMD .) > /dev/null 2> $MINDI_TMP/mkisofs.log
    1743     if [ $? -ne 0 ] ; then
    1744         if [ "$BOOT_TYPE" = "UEFI" ]; then
    1745             CMD=`echo $CMD | perl -p -e 's|--efi-boot |-eltorito-platform 0xEF -eltorito-boot |; s|-efi-boot |-eltorito-platform 0xEF -eltorito-boot |;'`
    1746             LogAll "INFO: Invoking instead $CMD"
    1747             (cd "$MINDI_TMP/mpt" ; $CMD .) > /dev/null 2> $MINDI_TMP/mkisofs.log
    1748             if [ $? -eq 0 ] ; then
    1749                 LogAll "INFO: Created bootable ISO image at $MINDI_CACHE/mindi.iso"
    1750             else
    1751                 MakeISOErrors
    1752             fi
    1753         else
    1754             MakeISOErrors
    1755         fi
    1756     else
    1757         LogAll "INFO: Created bootable ISO image at $MINDI_CACHE/mindi.iso"
    1758     fi
    1759     rm -f $MINDI_TMP/mkisofs.log
    17601772fi
    17611773
     
    17631775
    17641776if  [ "$target" = "ISO" ]; then
    1765     # ISO
    1766     if [ "$BOOT_TYPE" = "BIOS" ]; then
    1767         # syslinux should be run on a local file (doen't work through NFS Cf: #297)
    1768         # and run after the formating for versions > 6 it seems
    1769         syslinux $part >> $LOGFILE 2>> $LOGFILE
    1770     fi
    17711777    cp $part $MINDI_CACHE
     1778    if [ "$ARCH" = "ia64" ] ; then
     1779        # Here we need to remount to put the boot image at the right place now it's available
     1780        mount -t vfat $mount_opt $part $MINDI_TMP/mpt 2>> $LOGFILE
     1781        cp $MINDI_CACHE/$part $MINDI_TMP/mpt/images
     1782        MakeISO
     1783        umount $MINDI_TMP/mpt || Die "Unable to unmount $MINDI_TMP/mpt"
     1784    fi
    17721785else
    17731786    # USB
Note: See TracChangeset for help on using the changeset viewer.