Changeset 3491 in MondoRescue
- Timestamp:
- Dec 16, 2015, 2:01:03 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi/mindi
r3490 r3491 547 547 [ ! -e "$SYSLINUX64EFI" ] && SYSLINUX64EFI=/usr/lib/SYSLINUX/efi64/syslinux.efi 548 548 [ ! -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" 550 550 LogFile "INFO: Found syslinux.efi at $SYSLINUX64EFI" 551 551 } … … 1918 1918 mkdir -p $mountpoint 1919 1919 dd if=/dev/zero of=$imagefile bs=1k count=$BOOT_SIZE &> /dev/null || Die "Cannot dd blank file" 1920 if [ "$BOOT_TYPE" = "UEFI" ]; then1920 #if [ "$BOOT_TYPE" = "UEFI" ]; then 1921 1921 # Should be GPT in that case to allow direct boot 1922 parted -s $imagefile mklabel gpt1923 parted -s $imagefile mkpart fat32 1 ${BOOT_SIZE}k 2> /dev/null1924 kpartx -a $imagefile1925 imagefile2=/dev/mapper/`kpartx -l $imagefile | awk '{print $1}'`1926 else1927 imagefile2=$imagefile1928 fi1929 LogFile "INFO: Creating vfat filesystem on $imagefile 2"1930 mkfs.vfat $imagefile 2>> $LOGFILE 2>> $LOGFILE1922 #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 1931 1931 1932 1932 if [ "$BOOT_TYPE" = "BIOS" ]; then … … 1940 1940 imagefile=$MINDI_CACHE/mindi-bootroot.img 1941 1941 1942 mount -t vfat -o loop $imagefile 2 $mountpoint || LogAll "ERROR: Cannot mount (PBDI)"1942 mount -t vfat -o loop $imagefile $mountpoint || Die "ERROR: Cannot mount $imagefile on $mountpoint (PBDI)" 1943 1943 1944 1944 LogFile "INFO: Copying $MINDI_TMP/initrd.img to $mountpoint/initrd.img..." … … 2164 2164 # UEFI 2165 2165 efidir=$bigdir/EFI/BOOT 2166 # Use syslinux.efi as the default boot loader ... but it doesn't work for now :-(2167 FindSyslinux64EFI2168 bootbin=$SYSLINUX64EFI2169 bootconf="$efidir/syslinux.cfg"2170 2166 # On RHEL6 grub works 2171 2167 dname=`pbdistrocheck | grep -E '^Name:' | cut -d':' -f2` 2172 2168 dver=`pbdistrocheck | grep -E '^Ver:' | cut -d':' -f2` 2173 2169 if [ $dname = "rhel" ] && [ $dver = "6" ]; then 2174 bootbin= "grub*.efi"2170 bootbin=`find /boot/efi -iname "grub*.efi" | head -1` 2175 2171 bootconf="$efidir/grub.conf" 2176 2172 boottype=grub 2177 2173 elif [ $dname = "rhel" ] && [ $dver = "7" ]; then 2178 bootbin= "grub*.efi"2174 bootbin=`find /boot/efi -iname "grub*.efi" | head -1` 2179 2175 bootconf="$efidir/grub.conf" 2180 2176 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" 2181 2182 fi 2182 2183 else … … 2187 2188 bootconf="$efidir/elilo.conf" 2188 2189 fi 2190 LogAll "Found $boottype boot type" 2189 2191 2190 2192 # Copy it so that CD-ROM menu entry is satisfied … … 2205 2207 fi 2206 2208 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 2211 2215 fi 2212 2216 else
Note:
See TracChangeset
for help on using the changeset viewer.