Changeset 3491 in MondoRescue for branches/3.2


Ignore:
Timestamp:
Dec 16, 2015, 2:01:03 AM (8 years ago)
Author:
Bruno Cornec
Message:
  • revert syslinux.efi usage for RHEL6 and 7 for now as it's not working. Do not use GPT bootable images either. Tested with RHEL6.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/mindi

    r3490 r3491  
    547547    [ ! -e "$SYSLINUX64EFI" ] && SYSLINUX64EFI=/usr/lib/SYSLINUX/efi64/syslinux.efi
    548548    [ ! -e "$SYSLINUX64EFI" ] && SYSLINUX64EFI=`find / -name syslinux.efi | grep -x "/.*64/syslinux.efi"`
    549     [ ! -e "$SYSLINUX64EFI" ] && Die "Please install syslinux first. If your syslinux RPM doesn't include syslinux, you may download an syslinux RPM from Mondo's website - go to http://www.mondorescue.org/downloads.shtml"
     549    [ ! -e "$SYSLINUX64EFI" ] && Die "Please install syslinux.efi first. If your syslinux RPM doesn't include syslinux.efi, you may download an syslinux RPM from Mondo's website - go to http://www.mondorescue.org/downloads.shtml"
    550550    LogFile "INFO: Found syslinux.efi at $SYSLINUX64EFI"
    551551}
     
    19181918    mkdir -p $mountpoint
    19191919    dd if=/dev/zero of=$imagefile bs=1k count=$BOOT_SIZE &> /dev/null || Die "Cannot dd blank file"
    1920     if [ "$BOOT_TYPE" = "UEFI" ]; then
     1920    #if [ "$BOOT_TYPE" = "UEFI" ]; then
    19211921        # Should be GPT in that case to allow direct boot
    1922         parted -s $imagefile mklabel gpt
    1923         parted -s $imagefile mkpart fat32 1 ${BOOT_SIZE}k 2> /dev/null
    1924         kpartx -a $imagefile
    1925         imagefile2=/dev/mapper/`kpartx -l $imagefile | awk '{print $1}'`
    1926     else
    1927         imagefile2=$imagefile
    1928     fi
    1929     LogFile "INFO: Creating vfat filesystem on $imagefile2"
    1930     mkfs.vfat $imagefile2 >> $LOGFILE 2>> $LOGFILE
     1922        #parted -s $imagefile mklabel gpt
     1923        #parted -s $imagefile mkpart fat32 1 ${BOOT_SIZE}k 2> /dev/null
     1924        #kpartx -a $imagefile
     1925        #imagefile2=/dev/mapper/`kpartx -l $imagefile | awk '{print $1}'`
     1926    #else
     1927        #imagefile2=$imagefile
     1928    #fi
     1929    LogFile "INFO: Creating vfat filesystem on $imagefile"
     1930    mkfs.vfat $imagefile >> $LOGFILE 2>> $LOGFILE
    19311931
    19321932    if [ "$BOOT_TYPE" = "BIOS" ]; then
     
    19401940    imagefile=$MINDI_CACHE/mindi-bootroot.img
    19411941
    1942     mount -t vfat -o loop $imagefile2 $mountpoint || LogAll "ERROR: Cannot mount (PBDI)"
     1942    mount -t vfat -o loop $imagefile $mountpoint || Die "ERROR: Cannot mount $imagefile on $mountpoint (PBDI)"
    19431943
    19441944    LogFile "INFO: Copying $MINDI_TMP/initrd.img to $mountpoint/initrd.img..."
     
    21642164            # UEFI
    21652165            efidir=$bigdir/EFI/BOOT
    2166             # Use syslinux.efi as the default boot loader ... but it doesn't work for now :-(
    2167             FindSyslinux64EFI
    2168             bootbin=$SYSLINUX64EFI
    2169             bootconf="$efidir/syslinux.cfg"
    21702166            # On RHEL6 grub works
    21712167            dname=`pbdistrocheck | grep -E '^Name:' | cut -d':' -f2`
    21722168            dver=`pbdistrocheck | grep -E '^Ver:' | cut -d':' -f2`
    21732169            if [ $dname = "rhel" ] && [ $dver = "6" ]; then
    2174                 bootbin="grub*.efi"
     2170                bootbin=`find /boot/efi -iname "grub*.efi" | head -1`
    21752171                bootconf="$efidir/grub.conf"
    21762172                boottype=grub
    21772173            elif [ $dname = "rhel" ] && [ $dver = "7" ]; then
    2178                 bootbin="grub*.efi"
     2174                bootbin=`find /boot/efi -iname "grub*.efi" | head -1`
    21792175                bootconf="$efidir/grub.conf"
    21802176                boottype=grub2
     2177            else
     2178                # Use syslinux.efi as the default boot loader ... but it doesn't work for now :-(
     2179                FindSyslinux64EFI
     2180                bootbin=$SYSLINUX64EFI
     2181                bootconf="$efidir/syslinux.cfg"
    21812182            fi
    21822183        else
     
    21872188            bootconf="$efidir/elilo.conf"
    21882189        fi
     2190        LogAll "Found $boottype boot type"
    21892191
    21902192        # Copy it so that CD-ROM menu entry is satisfied
     
    22052207        fi
    22062208
    2207         FindLdlinuxe64Binary
    2208         if [ -e "$LDLINUXE64" ]; then
    2209             LogFile "INFO: Copying $LDLINUXE64 to $efidir"
    2210             cp $LDLINUXE64 $efidir 2>> $LOGFILE || Die "Cannot copy $LDLINUXE64 to $efidir). Did you run out of disk space?"
     2209        if [ $boottype = "isolinux" ]; then
     2210            FindLdlinuxe64Binary
     2211            if [ -e "$LDLINUXE64" ]; then
     2212                LogFile "INFO: Copying $LDLINUXE64 to $efidir"
     2213                cp $LDLINUXE64 $efidir 2>> $LOGFILE || Die "Cannot copy $LDLINUXE64 to $efidir). Did you run out of disk space?"
     2214            fi
    22112215        fi
    22122216    else   
Note: See TracChangeset for help on using the changeset viewer.