]> code.delx.au - refind/commitdiff
Fix to install.sh's efibootmgr filename; disable check for 2048-byte
authorsrs5694 <srs5694@users.sourceforge.net>
Sat, 5 Jan 2013 00:11:01 +0000 (19:11 -0500)
committersrs5694 <srs5694@users.sourceforge.net>
Sat, 5 Jan 2013 00:11:01 +0000 (19:11 -0500)
blocks in ISO-9660 driver

EfiLib/Makefile
NEWS.txt
filesystems/fsw_efi.c
filesystems/fsw_iso9660.c
install.sh
mvrefind.sh

index d8328930df0746b8e6e8225beaa4f6c07db27c3b..8487805d5a9aeb9e5ebca9fac0f66cd57ecb08b3 100644 (file)
@@ -3,4 +3,4 @@
 #
 
 clean:
-       rm -f $(OBJS) *~ *.lib
+       rm -f *.o *.obj *~ *.lib
index 2abfe82878c88a5a76cc4a82e40e93f878839546..a6a8859762791bdc7cf2c291c2b5cf0175f1abd5 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,6 +1,10 @@
 0.6.3 (?/?/2013):
 -----------------
 
+- Modified ISO-9660 driver so that it can handle discs with other than
+  2048-byte sectors. This makes it useful for reading "hybrid ISO" images
+  burned to USB flash disks.
+
 - New mvrefind.sh script to move a rEFInd installation between a standard
   location (typically EFI/refind) or one of the fallback locations
   (EFI/BOOT or EFI/Microsoft/Boot). It can also do more exotic locations.
index d7631de458957dd6aae3617153f6752953412ef3..21dafd4908f2985fbef1bdbb4561c6bdbe527525 100644 (file)
@@ -98,7 +98,7 @@ EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid = EFI_FILE_SYSTEM_VOLUME_LABEL_INFO
 /** Helper macro for stringification. */
 #define FSW_EFI_STRINGIFY(x) #x
 /** Expands to the EFI driver name given the file system type name. */
-#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.6.2 " FSW_EFI_STRINGIFY(t) L" File System Driver"
+#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.6.2.1 " FSW_EFI_STRINGIFY(t) L" File System Driver"
 
 // function prototypes
 
index 271c92459949045d3e3b1dbb090dbcc0834730c9..9c1fa549679c19d7254d06bb3ecae4a1c87eeebb 100644 (file)
@@ -323,8 +323,8 @@ static fsw_status_t fsw_iso9660_volume_mount(struct fsw_iso9660_volume *vol)
     if (vol->primary_voldesc == NULL)
         return FSW_UNSUPPORTED;
     pvoldesc = vol->primary_voldesc;
-    if (ISOINT(pvoldesc->logical_block_size) != 2048)
-        return FSW_UNSUPPORTED;
+//     if (ISOINT(pvoldesc->logical_block_size) != 2048)
+//         return FSW_UNSUPPORTED;
 
     // get volume name
     for (i = 32; i > 0; i--)
index 2aa1491561455f84de39ecd696345c83bcd96f3b..e5fd60452a7c702de5c8b0933f9e5a011075a980 100755 (executable)
@@ -602,7 +602,7 @@ AddBootEntry() {
       EntryFilename=$TargetDir/$Refind
       EfiEntryFilename=`echo ${EntryFilename//\//\\\}`
       EfiEntryFilename2=`echo ${EfiEntryFilename} | sed s/\\\\\\\\/\\\\\\\\\\\\\\\\/g`
-      ExistingEntry=`$Efibootmgr -v | grep $EfiEntryFilename2`
+      ExistingEntry=`$Efibootmgr -v | grep -i $EfiEntryFilename2`
 
       if [[ $ExistingEntry ]] ; then
          ExistingEntryBootNum=`echo $ExistingEntry | cut -c 5-8`
@@ -628,7 +628,7 @@ AddBootEntry() {
          fi
       fi
 
-   else
+   else # efibootmgr not found
       EfibootmgrProblems=1
       Problems=1
    fi
index bdab41a548adfafaddda9c6ad77e5835fa793308..7c955bdb008858ef7136820b2800fc26857f8fd6 100755 (executable)
@@ -78,7 +78,6 @@ FindLinuxESP() {
 # Adjust filename variables appropriately for their locations and detected
 # presence (or lack thereof) of shim installation
 AdjustFilenames() {
-   echo "Entering AdjustFilenames()"
    if [[ -f $SourceDir/grubx64.efi ]] ; then
       SourceX64="grubx64.efi"
       TargetX64=$SourceX64
@@ -112,17 +111,11 @@ AdjustFilenames() {
          TargetShim="bootmgfw.efi"
       fi
    fi
-
-   echo "Leaving AdjustFilenames():"
-   echo "  SourceX64 = $SourceX64, TargetX64 = $TargetX64"
-   echo "  SourceIA32 = $SourceIA32, TargetIA32 = $TargetIA32"
-   echo "  SourceShim = $SourceShim, TargetShim = $TargetShim"
 } # AdjustFilenames()
 
 # Checks for the presence of necessary files, including both boot loaders
 # and support utilities (efibootmgr, etc.)
 CheckForFiles() {
-   echo "Entering CheckForFiles()"
    if [[ (! -f $SourceDir/$SourceX64 && ! -f $SourceDir/$SourceIA32) ||
          ($SourceShim != "none" && ! -f $SourceDir/SourceShim) ||
          ! -f $SourceDir/refind.conf ]] ; then
@@ -146,7 +139,6 @@ CheckForFiles() {
 
 # Do final checks & then move the files!
 MoveFiles() {
-   echo "Entering MoveFiles()"
    ExistingFiles=`find $TargetDir -name "*.efi" 2> /dev/null`
    if [[ -n $ExistingFiles && $EspTargetDir != "/efi/boot" && $EspTargetDir != "/efi/microsoft/boot" ]] ; then
       echo "$TargetDir isn't empty! Aborting!"
@@ -200,35 +192,30 @@ PostMoveCleanup() {
 
 # If necessary, create a new NVRAM entry for the new location
 AddNvramEntry() {
-   echo "Entering AddNvramEntry()"
    InstallIt="0"
    Efibootmgr=`which efibootmgr 2> /dev/null`
    InstallDisk=`grep $InstallDir /etc/mtab | cut -d " " -f 1 | cut -c 1-8`
    PartNum=`grep $InstallDir /etc/mtab | cut -d " " -f 1 | cut -c 9-10`
 
    if [[ $TargetShim != "none" ]] ; then
-      EntryFilename=$TargetDir/$TargetShim
+      EntryFilename=$EspTargetDir/$TargetShim
    else
       CpuType=`uname -m`
       if [[ $CpuType == 'x86_64' ]] ; then
-         EntryFilename=$TargetDir/$TargetX64
+         EntryFilename=$EspTargetDir/$TargetX64
       else
-         EntryFilename=$TargetDir/$TargetIA32
+         EntryFilename=$EspTargetDir/$TargetIA32
       fi
    fi # if/else
 
    EfiEntryFilename=`echo ${EntryFilename//\//\\\}`
    EfiEntryFilename2=`echo ${EfiEntryFilename} | sed s/\\\\\\\\/\\\\\\\\\\\\\\\\/g`
-   ExistingEntry=`$Efibootmgr -v | grep $EfiEntryFilename2`
+   ExistingEntry=`$Efibootmgr -v | grep -i $EfiEntryFilename2`
 
    if [[ $ExistingEntry ]] ; then
       ExistingEntryBootNum=`echo $ExistingEntry | cut -c 5-8`
       FirstBoot=`$Efibootmgr | grep BootOrder | cut -c 12-15`
       if [[ $ExistingEntryBootNum != $FirstBoot ]] ; then
-         echo "An existing rEFInd boot entry exists, but isn't set as the default boot"
-         echo "manager. The boot order is being adjusted to make rEFInd the default boot"
-         echo "manager. If this is NOT what you want, you should use efibootmgr to"
-         echo "manually adjust your EFI's boot order."
          $Efibootmgr -b $ExistingEntryBootNum -B &> /dev/null
          InstallIt="1"
       fi
@@ -237,7 +224,12 @@ AddNvramEntry() {
    fi
 
    if [[ $InstallIt == "1" ]] ; then
-      $Efibootmgr -c -l $EfiEntryFilename -L "rEFInd Boot Manager" -d $InstallDisk -p $PartNum &> /dev/null
+      if [[ $EfiTargetDir == "/efi/microsoft/boot" ]] ; then
+         # Name it the way some firmware expects -- see http://mjg59.dreamwidth.org/20187.html
+         $Efibootmgr -c -l $EfiEntryFilename -L "Windows Boot Manager" -d $InstallDisk -p $PartNum &> /dev/null
+      else
+         $Efibootmgr -c -l $EfiEntryFilename -L "rEFInd Boot Manager" -d $InstallDisk -p $PartNum &> /dev/null
+      fi
       if [[ $? != 0 ]] ; then
          EfibootmgrProblems=1
       fi
@@ -269,7 +261,4 @@ AdjustFilenames
 CheckForFiles
 MoveFiles
 PostMoveCleanup
-echo "EspTargetDir == \"$EspTargetDir\""
-if [[ $EspTargetDir != "/efi/boot" && $EspTargetDir != "/efi/microsoft/boot" ]] ; then
-   AddNvramEntry
-fi
+AddNvramEntry