New EFI boot manager available: rEFInd

Chat about anything related to Linux Mint
Forum rules
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 6 months after creation.
cyberwolf

Re: New EFI boot manager available: rEFInd

Post by cyberwolf »

Hi,
I'm running mint 14 with kernel 3.8.0 dual booting with bt5 kernel 3.2.6
I installed refind from the .deb package and it gave me this output:

CAUTION: Your computer appears to support Secure Boot, but you haven't
specified a valid shim.efi file source. If you've disabled Secure Boot and
intend to leave it disabled, this is fine; but if Secure Boot is active, the
resulting installation won't boot. You can read more about this topic at
http://www.rodsbooks.com/refind/secureboot.html.

I don't think secure boot is enabled since my laptop was shipped with windows 7. The problem is that there's no option to disable secure boot on this BIOS (Insyde H20)
After I rebooted it was like nothing changed, GRUB show up as I never installed refind.

Can you help me?

Code: Select all

 ~ $ lsblk 
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 238.5G  0 disk 
├─sda1   8:1    0    94M  0 part /boot/efi
├─sda2   8:2    0   2.9G  0 part [SWAP]
├─sda3   8:3    0  14.3G  0 part / <<<<-- Linux mint 14 - bootloader installed on /dev/sda
├─sda4   8:4    0  19.1G  0 part  <<<<-- bt5 - no bootloader installed
└─sda5   8:5    0 202.1G  0 part /home
sr0     11:0    1  1024M  0 rom  
thanks
srs5694
Level 6
Level 6
Posts: 1386
Joined: Mon Feb 27, 2012 1:42 pm

Re: New EFI boot manager available: rEFInd

Post by srs5694 »

Cyberwolf,

Please post the output of the following command:

Code: Select all

sudo efibootmgr -v
The installation message about Secure Boot was probably a false alarm; unfortunately, the methods I've found to detect Secure Boot support don't seem to be entirely reliable.
cyberwolf

Re: New EFI boot manager available: rEFInd

Post by cyberwolf »

Hi, here the output:

Code: Select all

~ $ sudo efibootmgr -v
[sudo] password for wolf: 
BootCurrent: 0000
BootOrder: 0000
Boot0000* Windows Boot Manager	HD(1,800,2f000,d2553afc-f274-4dc7-80e3-3bda881ba3d0)File(\EFI\Microsoft\Boot\bootmgfw.efi)RC
srs5694
Level 6
Level 6
Posts: 1386
Joined: Mon Feb 27, 2012 1:42 pm

Re: New EFI boot manager available: rEFInd

Post by srs5694 »

Check for the presence of a file called /boot/efi/EFI/refind/refind_x64.efi. If it's present, type the following command:

Code: Select all

sudo efibootmgr -c -l "\EFI\refind\refind_x64.efi" -L rEFInd
Note the use of quotes and backslashes ("\") rather than forward slashes ("/") as directory separators.

If the refind_x64.efi file is not present on your ESP, run the /usr/share/refind-{version}/install.sh script using sudo, where {version} is the version of rEFInd that you've installed. You can then check with "efibootmgr -v" again to see if there's a rEFInd entry; and if not, type the above command to add one.
YeeP

Re: New EFI boot manager available: rEFInd

Post by YeeP »

I believe I have asked this before, but after a successfully install of rEFInd, I can remove grub 2? Correct?

Is there any write up on your site on the best practices for this? I see no point in using grub once refind is on there and working
srs5694
Level 6
Level 6
Posts: 1386
Joined: Mon Feb 27, 2012 1:42 pm

Re: New EFI boot manager available: rEFInd

Post by srs5694 »

YeeP wrote:I believe I have asked this before, but after a successfully install of rEFInd, I can remove grub 2? Correct?
It depends on whether you're booting Linux directly or via GRUB. If you select an icon and a filename with "vmlinuz-{version}" or "bzImage-{version}" appears below it, and this works to boot Linux, then you no longer need GRUB. If, OTOH, you select an icon and the filename shows up as being "grub.efi", "grubx64.efi", or something similar, then you're still using GRUB.
Is there any write up on your site on the best practices for this? I see no point in using grub once refind is on there and working
See the following page, which is part of the rEFInd documentation:

http://www.rodsbooks.com/refind/linux.html

It's written with the goal of helping people set up rEFInd, though, rather than how or when to remove GRUB.
YeeP

Re: New EFI boot manager available: rEFInd

Post by YeeP »

Ok I will... As far as I know a standard install of linux mint, via dual boot in mind, will install grub reguardless. That is why I assumed you will need to "remove" it after the fact. I will have a dual boot, but prefer to make the selection in rEFInd, and not have to immediately do the same thing in grub.
cyberwolf

Re: New EFI boot manager available: rEFInd

Post by cyberwolf »

srs5694 wrote:Check for the presence of a file called /boot/efi/EFI/refind/refind_x64.efi. If it's present, type the following command:

Code: Select all

sudo efibootmgr -c -l "\EFI\refind\refind_x64.efi" -L rEFInd
Note the use of quotes and backslashes ("\") rather than forward slashes ("/") as directory separators.

If the refind_x64.efi file is not present on your ESP, run the /usr/share/refind-{version}/install.sh script using sudo, where {version} is the version of rEFInd that you've installed. You can then check with "efibootmgr -v" again to see if there's a rEFInd entry; and if not, type the above command to add one.
I followed your guide and I added refind_x64.efi, but when I reboot I've still grub and when I check the efibootmgr the entry is not there anymore:

Code: Select all

wolf@blackbird ~ $ sudo efibootmgr -c -l "\EFI\refind\refind_x64.efi" -L rEFInd
BootCurrent: 0000
BootOrder: 0001,0000
Boot0000* Windows Boot Manager
Boot0001* rEFInd
wolf@blackbird ~ $ sudo efibootmgr -v
BootCurrent: 0000
BootOrder: 0001,0000
Boot0000* Windows Boot Manager	HD(1,800,2f000,d2553afc-f274-4dc7-80e3-3bda881ba3d0)File(\EFI\Microsoft\Boot\bootmgfw.efi)RC
Boot0001* rEFInd	HD(1,800,2f000,d2553afc-f274-4dc7-80e3-3bda881ba3d0)File(\EFI\refind\refind_x64.efi)
wolf@blackbird ~ $ 
After reboot:

Code: Select all

wolf@blackbird ~ $ sudo efibootmgr -v
[sudo] password for wolf: 
BootCurrent: 0000
BootOrder: 0000
Boot0000* Windows Boot Manager	HD(1,800,2f000,d2553afc-f274-4dc7-80e3-3bda881ba3d0)File(\EFI\Microsoft\Boot\bootmgfw.efi)RC
srs5694
Level 6
Level 6
Posts: 1386
Joined: Mon Feb 27, 2012 1:42 pm

Re: New EFI boot manager available: rEFInd

Post by srs5694 »

Cyberwolf,

It seems you've got a broken EFI that's dropping changes to its NVRAM. (Or looked at another way, there's a bug in efibootmgr that prevents it from working with your firmware.) There are several possible solutions to this problem:
  • Boot to an EFI version 2 shell and use its "bcfg" command to add rEFInd to the boot list. This sometimes works when efibootmgr doesn't. This is a little complex, though. See the Arch Linux wiki entry on EFI shells and bcfg for information on how to do this. Note that you'll probably have to prepare a bootable USB flash drive or the like with an EFI version 2 shell to get this to work.
  • Look for firmware options to add a boot loader to the firmware's boot menu. Most firmware implementations do not provide such an option, which is unfortunate, but a few do provide such an option.
  • In Linux, use the "mvrefind.sh" script that comes with rEFInd to have rEFInd take over the Windows boot loader. Typing "sudo mvrefind.sh /boot/efi/EFI/refind/ /boot/efi/EFI/Microsoft/Boot" should do the trick.
  • Use bcfg or efibootmgr to remove all the boot options from the EFI and then install rEFInd as the fallback boot loader. The latter task can be accomplished with mvrefind.sh, as in "sudo mvrefind.sh /boot/efi/EFI/refind /boot/efi/EFI/BOOT".
  • Install rEFInd to a USB flash drive, leave it plugged into the computer at all times, and reconfigure your firmware to boot from the USB flash drive rather than from your hard disk.
Take your pick of which of these to try first. Note that if you try one of the solutions using mvrefind.sh and then decide to try another, you'll probably have to adjust the source location to be the destination of your first use of the command.
YeeP

Re: New EFI boot manager available: rEFInd

Post by YeeP »

Quick question for you, as I am FINALLY to the day where I can install linux and go for it with rEFInd. I was doing some research and I believe that because the system is setup with EFI, it does not use an MBR system for the partitions. Hence, all partitions that I create in GParted, will need to be primary partitions. If that is correct, you definitely have tested it and know it works, so I am not worried about it. I am just curious if you can tell me if I am correct about the primary partition only setup?

Last night I was getting so p*ssed because gparted would not allow the creation of an extended partition, even when I umount "everything".

So pumped to get rEFInd running on my machine. :mrgreen:
srs5694
Level 6
Level 6
Posts: 1386
Joined: Mon Feb 27, 2012 1:42 pm

Re: New EFI boot manager available: rEFInd

Post by srs5694 »

YeeP wrote:Quick question for you, as I am FINALLY to the day where I can install linux and go for it with rEFInd. I was doing some research and I believe that because the system is setup with EFI, it does not use an MBR system for the partitions. Hence, all partitions that I create in GParted, will need to be primary partitions. If that is correct, you definitely have tested it and know it works, so I am not worried about it. I am just curious if you can tell me if I am correct about the primary partition only setup?
You're conceptually correct. EFI-based computers almost always use GPT and not MBR on their disks. The whole concept of extended and logical partitions is an MBR hack that's not used in GPT. In a technical and pedantic sense, there are no primary partitions in GPT, either, since that concept is dependent upon the existence of extended and logical partitions. GPT supports up to 128 partitions by default, and that limit can be raised by the right software, but chances are you won't need to raise it. IIRC, GParted (mis-)applies the label "primary" to all GPT partitions.
YeeP

Re: New EFI boot manager available: rEFInd

Post by YeeP »

Ok, so my first attempt at the install with the deb package did not work. I created all partitions needed for linux and installed mint. Updated mint, and rebooted. It booted just fine. I then cloned the drive just in case. Booted back into Mint (BIOS still in CSM mode), and went to install rEFInd, and here is the message I get:
Selecting previously unselected package refind.
(Reading database ... 138689 files and directories currently installed.)
Unpacking refind (from .../refind_0.6.8-1_amd64.deb) ...
Setting up refind (0.6.8-1) ...
/var/lib/dpkg/info/refind.postinst: line 4: efibootmgr: command not found
Installing rEFInd on Linux....
//boot/efi doesn't seem to be on a VFAT filesystem. The ESP must be
mounted at //boot or //boot/efi and it must be VFAT! Aborting!
dpkg: error processing refind (--install):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
refind
Installation failed.

Edit:

A little more info after spending some time on your website:

Per: http://www.rodsbooks.com/efi-bootloader ... ation.html

Code: Select all

yeep@yeep-Satellite-L855 ~ $ sudo parted /dev/sda print
[sudo] password for yeep: 
Model: ATA TOSHIBA MQ01ABD0 (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End    Size    File system     Name  Flags
 1      1049kB  473MB  472MB   ntfs            Ba    hidden
 2      473MB   746MB  273MB   fat32           Ba    boot
 3      746MB   880MB  134MB   ntfs            Ba    msftres
 4      880MB   324GB  323GB   ntfs
 7      324GB   334GB  10.0GB  linux-swap(v1)
 8      334GB   414GB  80.0GB  ext4
 9      414GB   525GB  111GB   ext4
 5      525GB   740GB  215GB   ntfs
 6      740GB   750GB  10.0GB  ntfs            Ba    hidden


then

Code: Select all

yeep@yeep-Satellite-L855 ~ $ sudo mount /dev/sda1 /boot/efi
fuse: failed to access mountpoint /boot/efi: No such file or directory
Also, no efi, just grub stuff (Which I will hopefully be able to get rid of after this is done) :)

Code: Select all

yeep@yeep-Satellite-L855 / $ cd boot
yeep@yeep-Satellite-L855 /boot $ dir
abi-3.5.0-17-generic	     memtest86+.bin
config-3.5.0-17-generic      memtest86+_multiboot.bin
grub			     System.map-3.5.0-17-generic
initrd.img-3.5.0-17-generic  vmlinuz-3.5.0-17-generic
A quote from you on previous pages:
srs5694 wrote: It's almost always possible to convert a BIOS-mode install to boot in EFI mode; however, it requires jumping through some hoops to get it to work right. FWIW, I've just released version 0.6.3 of rEFInd, which includes an install.sh script that's designed to do some of that hoop-jumping for you. In theory, it should work like this:
  1. Install Windows in EFI mode (or start with a Windows 8 PC).
  2. Ensure that Secure Boot is disabled.
  3. Install Mint in BIOS mode and boot into it in BIOS mode.
  4. Mount your ESP at /boot/efi.
  5. Install rEFInd by installing the Debian package or by running the install.sh script from the binary zip file.
In theory, when you reboot in EFI mode, rEFInd should come up and let you boot either OS. It does this, though, by installing itself in the Windows boot loader's position, moving the Windows boot loader down one level in the hierarchy. It's possible that Windows will notice this and attempt to "fix" it. To guard against this, you can use the mvrefind.sh script that's new with rEFInd 0.6.3:

Code: Select all

sudo mvrefind.sh /boot/efi/EFI/Microsoft/Boot /boot/efi/EFI/refind
Obviously, step 4 is my problem. Not sure what my ESP is, still trying to hunt down what it means. However, from reading through your site, is sounds like actually trying to find boot/efi is a waste of time if you are booted in bios mode... Which is most likely why I have that error. Anyway, any tips you have would be great. I am not even going to try to boot up into windows, or take this off of CSM (BIOS) mode in the firmware, until I see what you have to say. I do not want winwods trying to fix anything.


EDIT 2:
According to this: http://www.rodsbooks.com/efi-bootloader ... ation.html
These could be my options:
the command is useless if you're currently booted in BIOS mode—for instance, if you installed Linux in BIOS mode but want to switch to EFI booting. Thus, you may want to use another method to specify the boot loader. I know of several other possibilities:

If you can reach an EFI shell prompt (which typically reads fs0:), you can navigate to the directory in which your boot loader file exists and launch it by typing its name. The EFI shell prompt is similar to a DOS or Bash prompt and takes similar commands.
You can install the boot loader using the default boot loader's location (EFI/BOOT/bootx64.efi on x86-64 systems), as described earlier.
You can install the boot loader under the name used by Microsoft's boot loader, EFI/Microsoft/Boot/bootmgfw.efi. This approach works only if the firmware is hard-coded to look for this file, as some seem to be. (See the next option, though.)
You can use the firmware's own user interface to locate the boot loader file and either add it to the menu or launch the boot loader on a one-time basis.
You can create a startup script, startup.nsh in the ESP's root directory, that does nothing but launch your desired boot loader. This script may optionally begin with a disk specification (usually fs0:) and should use backslashes (\) as directory separators. Thus, such a script might resemble:

fs0:\EFI\elilo\elilo.efi

This example launches ELILO as the default boot loader. This method will work only if the firmware is configured to launch an EFI shell if other boot options fail. Most EFIs don't do this, though.
Definately need help. :oops:
Last edited by YeeP on Fri Mar 22, 2013 1:51 pm, edited 1 time in total.
srs5694
Level 6
Level 6
Posts: 1386
Joined: Mon Feb 27, 2012 1:42 pm

Re: New EFI boot manager available: rEFInd

Post by srs5694 »

YeeP wrote:

Code: Select all

yeep@yeep-Satellite-L855 ~ $ sudo parted /dev/sda print
password for yeep: 

Number  Start   End    Size    File system     Name  Flags
 1      1049kB  473MB  472MB   ntfs            Ba    hidden
 2      473MB   746MB  273MB   fat32           Ba    boot
 
The "boot" flag in parted denotes an ESP, so your ESP is /dev/sda2. (BTW, I changed your quote flags to code flags, which is what you should use for cut-and-pasted monospaced text, as in Terminal window displays, since it preserves formatting and improves legibility.)

At this point, you should:
  1. Create the /boot/efi mount point, as in "sudo mkdir /boot/efi"
  2. Mount /dev/sda2 at /boot/efi, as in "sudo mount /dev/sda2 /boot/efi"
  3. Optionally edit /etc/fstab to create an entry to mount /dev/sda2 at /boot/efi every time you boot.
  4. Install the efibootmgr package.
  5. Complete the installation of rEFInd by running the install.sh script (in /usr/share/refind-0.6.8/install.sh, or possibly something with an earlier version number if you're using an older version) or by uninstalling and re-installing the Debian package.
YeeP

Re: New EFI boot manager available: rEFInd

Post by YeeP »

Awesome, can't wait to try! I think the deb file installation was a fail, so I will not need to uninstall. I will check with synaptic first though.

I need to study on the process of editing /etc/fstab, I think this can perform some other procedures I am thinking about adding on.

Thanks for the help. :mrgreen:
YeeP

Re: New EFI boot manager available: rEFInd

Post by YeeP »

Ok, one question on the editing of fstab. The required fields look like they are:
<file system> <mount point> <type> <options> <dump> <pass>

I know that the first two should be:
/dev/sda2 /boot/efi

What should I put in as the type, options, dump and pass?


EDIT:
So, I added this line to fstab file:
/dev/sda2 /boot/efi auto auto
Seems to be working.

I then removed an installed refind via deb package. Everything seemed to work well. I changed the firware backover to efi mode, and booted. refind came to screen and showed two penguins and the windows icon. I tried one of the penguins and looked like it was trying to boot into busy box, which is a distro I tried on a live disk a while back. That boot never completed. I rebooted and tried the other penguin, same thing, it also tried to boot into busybox. never completed. Last, I tried the windows boot, and that worked fine. So I have to go back into the firmware and set it back to CSM mode. Then when I boot I go into Mint.

Busybox must have left someting on the partition where rEFInd searches for OS installs. I suppose I need to make a manual entry for Mint?

BTW: the /boot/efi exists now as you would think. Inside of it I have

/EFI/Boot
/EFI/Microsoft
/EFI/toshiba

Anyway, any thoughts on how I can get rid of whatever rEFInd is finding for Busybox so it does not show, and add mint to the list would be great. Thanks a lot.

The
srs5694
Level 6
Level 6
Posts: 1386
Joined: Mon Feb 27, 2012 1:42 pm

Re: New EFI boot manager available: rEFInd

Post by srs5694 »

YeeP wrote:Ok, one question on the editing of fstab. The required fields look like they are:
<file system> <mount point> <type> <options> <dump> <pass>

I know that the first two should be:
/dev/sda2 /boot/efi

What should I put in as the type, options, dump and pass?

Code: Select all

/dev/sda2  /boot/efi  vfat  fmask=133  0  0
Other variants of this will also work.
I then removed an installed refind via deb package. Everything seemed to work well. I changed the firware backover to efi mode, and booted. refind came to screen and showed two penguins and the windows icon. I tried one of the penguins and looked like it was trying to boot into busy box, which is a distro I tried on a live disk a while back. That boot never completed. I rebooted and tried the other penguin, same thing, it also tried to boot into busybox. never completed. Last, I tried the windows boot, and that worked fine. So I have to go back into the firmware and set it back to CSM mode. Then when I boot I go into Mint.

Busybox must have left someting on the partition where rEFInd searches for OS installs. I suppose I need to make a manual entry for Mint?
It's more likely that the rEFInd installation script missed something in setting up the kernel options, or failed to create the /boot/refind_linux.conf file for some reason. Check for that file. If it's completely absent, try running the mkrlconf.sh script that comes with rEFInd. (It should be installed in /usr/sbin.) This will create the /boot/refind_linux.conf file. If that file is present, check that it contains the options "ro root=/dev/sda{x}", where "/dev/sda{x}" is your root filesystem device filename or a UUID value (as in "ro root=UUID=85f3f363-781e-494d-beec-c45fe0309a17", but of course your UUID value will be different from this). If those options are not present, add them. This is described in more detail here.

BTW: the /boot/efi exists now as you would think. Inside of it I have

/EFI/Boot
/EFI/Microsoft
/EFI/toshiba

Anyway, any thoughts on how I can get rid of whatever rEFInd is finding for Busybox so it does not show, and add mint to the list would be great. Thanks a lot.

The[/quote]
YeeP

Re: New EFI boot manager available: rEFInd

Post by YeeP »

Made changes, and rebooted in UEFI mode. For some reason two linux icons still showed. I chose one of them (luck maybe?) and it booted linux mint. Rebooted, and then only one linux icon was there. Then booted into windows mode and the login for windows did come to screen. Looks like all I have to do now is figure out the icon changing stuff. I will see if I can hunt that down on your web site. Thanks for all the help, my machine is finally where I wanted it, from the first day I brought it home. :mrgreen:
JaZZyCooL

Re: New EFI boot manager available: rEFInd

Post by JaZZyCooL »

Hey guys,
Sorry for such a silly question but how to install rEFind on Linux or windows, I followed the instructions but unable to get that.


Your help is highly appreciated.
srs5694
Level 6
Level 6
Posts: 1386
Joined: Mon Feb 27, 2012 1:42 pm

Re: New EFI boot manager available: rEFInd

Post by srs5694 »

JaZZyCooL wrote:Hey guys,
Sorry for such a silly question but how to install rEFind on Linux or windows, I followed the instructions but unable to get that.
I can't be sure, but chances are you've got a buggy firmware that's ignoring changes to the NVRAM's boot loader entries. For better diagnosis, please boot to Linux (or a Linux emergency disc) in EFI mode and post the following:
  • The RESULTS.txt file that Boot Info Script produces.
  • The output of typing "sudo efibootmgr -v" in a Terminal window.
Please post these (especially the RESULTS.txt file) between code tags or as links.
YeeP

Re: New EFI boot manager available: rEFInd

Post by YeeP »

For some reason I get a "listing" of two Linux OSes when I come into rEFInd. Any tips on how I can hunt down the cause of this and eliminate it? Thanks!
Locked

Return to “Chat about Linux Mint”