]> code.delx.au - refind/commitdiff
Fix for refind-install script to handle a wider range of disk devices,
authorsrs5694 <srs5694@users.sourceforge.net>
Tue, 21 Jun 2016 18:24:31 +0000 (14:24 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Tue, 21 Jun 2016 18:24:31 +0000 (14:24 -0400)
beyond /dev/[sh]d? devices.

NEWS.txt
debian/control
refind-install
refind.spec

index 7da2c69f16e466150f74a9d32a668916b2f0ae99..219353aea2aa16e66c7e64e8bfa97bb492a190ca 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,3 +1,9 @@
+0.10.4 (?/??/2016):
+-------------------
+
+- Tweaked refind-install to do a better job of detecting disks other
+  than /dev/sd? and /dev/hd? devices.
+
 0.10.3 (4/24/2016):
 -------------------
 
 0.10.3 (4/24/2016):
 -------------------
 
index 4a9c48c49afe44e7e5388447132873406430a178..83be274bfdff41c4166bf8e1d7b114d413b22f5e 100644 (file)
@@ -10,13 +10,13 @@ Vcs-Git: git://anonscm.debian.org/collab-maint/refind.git
 
 Package: refind
 Architecture: amd64 i386 arm64
 
 Package: refind
 Architecture: amd64 i386 arm64
-Depends: debconf, efibootmgr, openssl, sbsigntool, parted, ${misc:Depends}
+Depends: debconf, efibootmgr, openssl, sbsigntool, parted, util-linux, ${misc:Depends}
 Description: boot manager for EFI-based computers
  A graphical boot manager for EFI- and UEFI-based computers, such as all
  Intel-based Macs and recent (most 2011 and later) PCs. rEFInd presents a
  boot menu showing all the EFI boot loaders on the EFI-accessible
  partitions, and optionally BIOS-bootable partitions on Macs and BIOS boot
 Description: boot manager for EFI-based computers
  A graphical boot manager for EFI- and UEFI-based computers, such as all
  Intel-based Macs and recent (most 2011 and later) PCs. rEFInd presents a
  boot menu showing all the EFI boot loaders on the EFI-accessible
  partitions, and optionally BIOS-bootable partitions on Macs and BIOS boot
- entries on UEFI PCs with CSMs. EFI-compatbile OSes, including Linux,
+ entries on UEFI PCs with CSMs. EFI-compatible OSes, including Linux,
  provide boot loaders that rEFInd can detect and launch. rEFInd can launch
  Linux EFI boot loaders such as ELILO, GRUB Legacy, GRUB 2, and 3.3.0 and
  later kernels with EFI stub support. EFI filesystem drivers for ext2/3/4fs,
  provide boot loaders that rEFInd can detect and launch. rEFInd can launch
  Linux EFI boot loaders such as ELILO, GRUB Legacy, GRUB 2, and 3.3.0 and
  later kernels with EFI stub support. EFI filesystem drivers for ext2/3/4fs,
index b28a79eb01f77a749f8c13878b984b41ded07860..19da6a0b09d225cfbfde70caff12b70b3dd7b649 100755 (executable)
@@ -39,6 +39,7 @@
 
 # Revision history:
 #
 
 # Revision history:
 #
+# 0.10.4  -- Improved handling of disks (other than /dev/[sh]d? disks).
 # 0.10.2  -- Improved Secure Boot detection in Linux, fixed --usedefault in OS X,
 #            and fixed bug that could cause mountesp to be installed as a FILE
 #            called /usr/local/bin in OS X.
 # 0.10.2  -- Improved Secure Boot detection in Linux, fixed --usedefault in OS X,
 #            and fixed bug that could cause mountesp to be installed as a FILE
 #            called /usr/local/bin in OS X.
@@ -1052,13 +1053,15 @@ ReSignBinaries() {
 # and EspFilesystem the filesystem (always "vfat")
 FindLinuxESP() {
    echo "The ESP doesn't seem to be mounted! Trying to find it...."
 # and EspFilesystem the filesystem (always "vfat")
 FindLinuxESP() {
    echo "The ESP doesn't seem to be mounted! Trying to find it...."
+   local Name
    local Drive
    local PartNum
    local TableType
    local DmStatus
    local SkipIt
    local Dmraid
    local Drive
    local PartNum
    local TableType
    local DmStatus
    local SkipIt
    local Dmraid
-   for Drive in `ls /dev/[sh]d?` ; do
+   for Name in `lsblk -r | grep disk | cut -f 1 -d " "` ; do
+      Drive="/dev/$Name"
       SkipIt=0
       Dmraid=`which dmraid 2> /dev/null`
       if [ -x "$Dmraid" ] ; then
       SkipIt=0
       Dmraid=`which dmraid 2> /dev/null`
       if [ -x "$Dmraid" ] ; then
@@ -1109,7 +1112,13 @@ FindMountedESP() {
    if [[ $EspFilesystem != 'vfat' ]] ; then
       echo "$RootDir/$InstallDir doesn't seem to be on a VFAT filesystem. The ESP must be"
       echo "mounted at $RootDir/boot or $RootDir/boot/efi and it must be VFAT! Aborting!"
    if [[ $EspFilesystem != 'vfat' ]] ; then
       echo "$RootDir/$InstallDir doesn't seem to be on a VFAT filesystem. The ESP must be"
       echo "mounted at $RootDir/boot or $RootDir/boot/efi and it must be VFAT! Aborting!"
-      exit 1
+      if [[ -d /sys/firmware/efi ]] ; then
+         exit 1
+      else
+         echo "The computer appears to be running in BIOS mode and has no ESP. You should"
+         echo "create an ESP, and ideally boot in EFI mode, before installing rEFInd."
+         exit 0
+      fi
    fi
    echo "ESP was found at $InstallDir using $EspFilesystem"
 } # FindMountedESP
    fi
    echo "ESP was found at $InstallDir using $EspFilesystem"
 } # FindMountedESP
index 6bf717083e0cbad101902686ff7ed977fe1dd35f..c3849cdaa4a11ca1b7e1ccc165cf40e902778a68 100644 (file)
@@ -37,7 +37,7 @@ A graphical boot manager for EFI- and UEFI-based computers, such as all
 Intel-based Macs and recent (most 2011 and later) PCs. rEFInd presents a
 boot menu showing all the EFI boot loaders on the EFI-accessible
 partitions, and optionally BIOS-bootable partitions on Macs and BIOS boot
 Intel-based Macs and recent (most 2011 and later) PCs. rEFInd presents a
 boot menu showing all the EFI boot loaders on the EFI-accessible
 partitions, and optionally BIOS-bootable partitions on Macs and BIOS boot
-entries on UEFI PCs with CSMs. EFI-compatbile OSes, including Linux,
+entries on UEFI PCs with CSMs. EFI-compatible OSes, including Linux,
 provide boot loaders that rEFInd can detect and launch. rEFInd can launch
 Linux EFI boot loaders such as ELILO, GRUB Legacy, GRUB 2, and 3.3.0 and
 later kernels with EFI stub support. EFI filesystem drivers for ext2/3/4fs,
 provide boot loaders that rEFInd can detect and launch. rEFInd can launch
 Linux EFI boot loaders such as ELILO, GRUB Legacy, GRUB 2, and 3.3.0 and
 later kernels with EFI stub support. EFI filesystem drivers for ext2/3/4fs,