New EFI boot manager available: rEFInd

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

Re: New EFI boot loader available: rEFInd

Postby srs5694 on Mon Jan 07, 2013 2:05 pm

tsdadam wrote:A quick question. Since managing to get Mint working in EFI, and having installed rEFInd and gotten that working, is there any way to have it boot straight from the graphical menu of rEFInd to Mint?


Yes -- provided you're using a 3.3.0 or later kernel. (Mint 14 uses such kernels, but Mint 13 and earlier don't.) You need:

  • A way for the EFI (and therefore rEFInd) to read the kernel file and its associated initial RAM disk. This can be by copying the kernel file and initrd to the ESP or by using an EFI driver so that the EFI can read your Linux /boot directory. rEFInd ships with drivers for ext2/3/4fs and ReiserFS, so the latter is usually possible in a default Mint installation, which uses ext4fs for root (/) in a standard partition.
  • A file called refind_linux.conf in the same directory that holds the kernel and initrd files. The mkrlconf.sh script creates such a file automatically.

For more information, see the Methods of Booting Linux page of the rEFInd documentation. It's usually pretty easy to get it working. Chances are you just need to install the right EFI driver, and maybe run mkrlconf.sh, to get it working for you.
srs5694
Level 6
Level 6
 
Posts: 1014
Joined: Mon Feb 27, 2012 1:42 pm

Linux Mint is funded by ads and donations.
 

Re: New EFI boot loader available: rEFInd

Postby tsdadam on Mon Jan 07, 2013 4:46 pm

Thanks. I'm reading but still finding it quite in depth, not really making much headway. I seem to have EFI folders in several places, and I'm just trying to figure out how they relate to one another.

e.g. there are efi files and folders in the ESP partition, in /, in /boot/efi and then under /boot/efi I've got even more subdirs: microsoft, linuxmint, refind, Boot. It's just knowing which one the computer and rEFInd are using, and which I need to rename in order to hide them (e.g. my rescue partition shows up at boot, I'd like to hide that for now).
tsdadam
Level 2
Level 2
 
Posts: 57
Joined: Fri Jan 04, 2013 4:55 am

Re: New EFI boot loader available: rEFInd

Postby srs5694 on Mon Jan 07, 2013 6:33 pm

tsdadam wrote:Thanks. I'm reading but still finding it quite in depth, not really making much headway. I seem to have EFI folders in several places, and I'm just trying to figure out how they relate to one another.

e.g. there are efi files and folders in the ESP partition, in /, in /boot/efi and then under /boot/efi I've got even more subdirs: microsoft, linuxmint, refind, Boot. It's just knowing which one the computer and rEFInd are using, and which I need to rename in order to hide them (e.g. my rescue partition shows up at boot, I'd like to hide that for now).


As far as the EFI is concerned, all that normally matters is the EFI System Partition (ESP), which is usually mounted at /boot/efi in Linux. This partition holds a directory called EFI, which in turn holds various subdirectories -- BOOT for a default/fallback boot loader, Microsoft for Microsoft's boot loader, linuxmint for Mint's boot loader, etc. Thus, in Linux, you'll see directories like:

Code: Select all
/boot/efi/EFI/BOOT/
/boot/efi/EFI/Microsoft/
/boot/efi/EFI/linuxmint/


rEFInd scans the root directory of the ESP and the subdirectories of its EFI directory (hence /boot/efi/ and the /boot/efi/EFI/*/ directories in Linux) for boot loaders, excluding rEFInd's own directory and the EFI/tools directory. Files with names that end in .efi in these locations get picked up as boot loaders.

Note my use of the word "normally" a couple of paragraphs ago. Because rEFInd can load Linux kernels with EFI stub loaders, it's desirable for rEFInd to gain access to the Linux /boot directory. For this reason, rEFInd ships with filesystem drivers for ext2/3/4fs and ReiserFS, and rEFInd's install.sh installs whatever driver it needs to read Linux's /boot directory. This may give the EFI (and rEFInd) access to additional partitions, and because Linux stores its kernels in /boot, rEFInd adds that directory to the list of locations it scans on all partitions. If any of these non-ESP partitions happen to have .efi files in their root directories, in boot/, or in EFI/*/, rEFInd adds them to the boot list. If the "scan_all_linux_kernels" option is uncommented, files with names that begin with "vmlinuz" or "bzImage" but that don't end in .efi are also added.

This set of rules can sometimes result in duplicate or stray boot loaders being picked up. This is especially true if you use a separate /boot partition and the distribution includes a symbolic link called /boot/boot that points to /boot, or if it creates a symbolic link called /boot/vmlinuz that points to a specific kernel file. Sometimes there's also a /vmlinuz file that points to /boot/vmlinuz, which will be redundant or useless. You can trim back such unwanted entries in various ways:

  • You can remove unnecessary drivers from the rEFInd drivers directory. For instance, if you use ext4fs on / and ext2fs on /boot, you could swap out the ext4fs driver for an ext2fs driver, thus keeping a /vmlinuz link from appearing as a non-functional boot entry.
  • You can delete unnecessary boot loaders. These may accumulate if you experiment with boot loaders or create backups of boot loader directories.
  • You can use the "dont_scan_volumes" option to remove specific filesystems from being scanned. This works best if you give the volume a label.
  • You can use the "dont_scan_dirs" option to remove specific directories from the scan list.
  • You can use the "dont_scan_files" option to remove specific filenames from the scan list.
srs5694
Level 6
Level 6
 
Posts: 1014
Joined: Mon Feb 27, 2012 1:42 pm

Re: New EFI boot loader available: rEFInd

Postby tsdadam on Tue Jan 08, 2013 5:04 am

That's great, thanks once again for the comprehensive explanation :).
tsdadam
Level 2
Level 2
 
Posts: 57
Joined: Fri Jan 04, 2013 4:55 am

Re: New EFI boot loader available: rEFInd

Postby YeeP on Tue Jan 08, 2013 10:31 pm

New rEFInd release today... get it while it's hot :mrgreen:
User avatar
YeeP
Level 2
Level 2
 
Posts: 83
Joined: Thu Apr 26, 2012 5:16 pm

Re: New EFI boot loader available: rEFInd

Postby tsdadam on Thu Jan 10, 2013 11:48 am

Annoying as it is, I have another question :)

I have rEFInd and grub-efi installed and working, but what I've found is that no matter what option I pick from the rEFInd menu, it jumps from there to GRUB. So if I pick Mint, grub loads and I have to pick mint again. If I pick windows, grub loads and I have to pick windows from that menu.

Is there a quick and easy way to get around this?
tsdadam
Level 2
Level 2
 
Posts: 57
Joined: Fri Jan 04, 2013 4:55 am

Re: New EFI boot loader available: rEFInd

Postby srs5694 on Thu Jan 10, 2013 11:58 am

tsdadam wrote:Annoying as it is, I have another question :)

I have rEFInd and grub-efi installed and working, but what I've found is that no matter what option I pick from the rEFInd menu, it jumps from there to GRUB. So if I pick Mint, grub loads and I have to pick mint again. If I pick windows, grub loads and I have to pick windows from that menu.

Is there a quick and easy way to get around this?


My suspicion is that this is damage done by Ubuntu's Boot Repair tool. If I'm right, that tool replaced the Windows boot loader with a secondary copy of GRUB, backing up the Windows boot loader to another filename. I've seen references to using Boot Repair to undo this change, but I don't recall the details. Fortunately, you can probably fix it yourself from Linux with a few commands:

Code: Select all
cd /boot/efi/EFI/Microsoft/Boot
sudo mv bootmgfw.efi bootmgfw.efi.grub
sudo mv bootmgfw.efi.bkp bootmgfw.efi


You could replace the first mv command with "rm bootmgfw.efi", but if I'm wrong, this might leave Windows unbootable and give you no avenue of recovery. Renaming the file as I've suggested enables you to undo the change if it causes problems.
srs5694
Level 6
Level 6
 
Posts: 1014
Joined: Mon Feb 27, 2012 1:42 pm

Re: New EFI boot loader available: rEFInd

Postby tsdadam on Fri Jan 11, 2013 5:11 am

srs5694 wrote:
tsdadam wrote:Annoying as it is, I have another question :)

I have rEFInd and grub-efi installed and working, but what I've found is that no matter what option I pick from the rEFInd menu, it jumps from there to GRUB. So if I pick Mint, grub loads and I have to pick mint again. If I pick windows, grub loads and I have to pick windows from that menu.

Is there a quick and easy way to get around this?


My suspicion is that this is damage done by Ubuntu's Boot Repair tool. If I'm right, that tool replaced the Windows boot loader with a secondary copy of GRUB, backing up the Windows boot loader to another filename. I've seen references to using Boot Repair to undo this change, but I don't recall the details. Fortunately, you can probably fix it yourself from Linux with a few commands:

Code: Select all
cd /boot/efi/EFI/Microsoft/Boot
sudo mv bootmgfw.efi bootmgfw.efi.grub
sudo mv bootmgfw.efi.bkp bootmgfw.efi


You could replace the first mv command with "rm bootmgfw.efi", but if I'm wrong, this might leave Windows unbootable and give you no avenue of recovery. Renaming the file as I've suggested enables you to undo the change if it causes problems.


I can confirm that this works perfectly, thanks (again!) :)
tsdadam
Level 2
Level 2
 
Posts: 57
Joined: Fri Jan 04, 2013 4:55 am

Re: New EFI boot loader available: rEFInd

Postby YeeP on Fri Jan 11, 2013 1:53 pm

Can't wait to set this up... None of the linux distros I have tested recognize my ethernet or wireless connection or mouse... I need to solve that issue before I install linux. :(
User avatar
YeeP
Level 2
Level 2
 
Posts: 83
Joined: Thu Apr 26, 2012 5:16 pm

Re: New EFI boot loader available: rEFInd

Postby powerhouse on Tue Jan 15, 2013 9:18 am

@srs5694: Hello Ron, I got a question that may be related to UEFI (I'm trying to find out).

Recently a number of motherboard manufacturers have released new BIOS versions, perportedly to support Windows 8 UEFI boot. In two cases - Asus and ASrock - these BIOS updates are reportedly breaking VT-d support. See for example http://vip.asus.com/forum/view.aspx?id=20120806185452699&board_id=1&model=SABERTOOTH+X79&page=1&SLanguage=en-us and http://www.asrock.com/mb/Intel/Z77%20Extreme4/?cat=Download&os=BIOS.

What's worse, these vendors state that there is no way going back, once the BIOS is updated.

Had I updated the BIOS, it would have literally bricked my system, as I'm running a Xen hypervisor with PCI passthru that relies on VT-d. I would also not have been able to boot my Windows 7 VM, not on a system without VT-d.

I was wondering if this is somehow related to UEFI secure boot? Or any other UEFI related issue?

I am not using UEFI now (it doesn't play well with Xen), but the M/B vendors obviously are putting an effort into getting their boards MS Windows 8 certified. It seems like too much of a coincidence that - of all the zillion features in a BIOS - just VT-d gets dropped, and by two different vendors. Or is it just some bad BIOS implementation (both vendors may be using the same BIOS s/w vendor).

Note: Asus does not mention a VT-d problem, in fact they sent me an answer that VT-d is supported in the new BIOS releases. But then, they also wrote to me that Linux is not "officially" supported, whatever that means. For obvious reasons, I can't test it.

Any insights are most appreciated.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 639
Joined: Thu May 03, 2012 3:54 am

Re: New EFI boot loader available: rEFInd

Postby srs5694 on Tue Jan 15, 2013 12:35 pm

powerhouse wrote:Recently a number of motherboard manufacturers have released new BIOS versions, perportedly to support Windows 8 UEFI boot. In two cases - Asus and ASrock - these BIOS updates are reportedly breaking VT-d support. See for example http://vip.asus.com/forum/view.aspx?id=20120806185452699&board_id=1&model=SABERTOOTH+X79&page=1&SLanguage=en-us and http://www.asrock.com/mb/Intel/Z77%20Extreme4/?cat=Download&os=BIOS.
...
I was wondering if this is somehow related to UEFI secure boot? Or any other UEFI related issue?


Sorry, I'm afraid I don't know; this is the first I've heard of this issue. I would point out, though, that ASUS and ASRock are just two brands from the same company, much like Buick and Chevrolet are two brands from GM. Chances are they've got very similar firmware code, so it's not surprising that a bug or removed feature in one is mirrored in the other.
srs5694
Level 6
Level 6
 
Posts: 1014
Joined: Mon Feb 27, 2012 1:42 pm

Re: New EFI boot loader available: rEFInd

Postby powerhouse on Tue Jan 15, 2013 4:12 pm

srs5694 wrote:
powerhouse wrote:Recently a number of motherboard manufacturers have released new BIOS versions, perportedly to support Windows 8 UEFI boot. In two cases - Asus and ASrock - these BIOS updates are reportedly breaking VT-d support. See for example http://vip.asus.com/forum/view.aspx?id=20120806185452699&board_id=1&model=SABERTOOTH+X79&page=1&SLanguage=en-us and http://www.asrock.com/mb/Intel/Z77%20Extreme4/?cat=Download&os=BIOS.
...
I was wondering if this is somehow related to UEFI secure boot? Or any other UEFI related issue?


Sorry, I'm afraid I don't know; this is the first I've heard of this issue. I would point out, though, that ASUS and ASRock are just two brands from the same company, much like Buick and Chevrolet are two brands from GM. Chances are they've got very similar firmware code, so it's not surprising that a bug or removed feature in one is mirrored in the other.


Thanks for answering! Didn't know they were the same company. That could explain it. Right now there are still inquiries going on, as the information on the ASRock website is everything but clear. I hope this will be resolved eventually as it's quite scary to buy hardware like that. A simple BIOS update and whoop - nothing works.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 639
Joined: Thu May 03, 2012 3:54 am

Re: New EFI boot loader available: rEFInd

Postby Shrav on Sun Jan 20, 2013 11:29 pm

I installed refind under windows 8 because it wouldn't find my /boot under Mint. Windows works fine but mint won't load. On the refind loader screen I get a message overlayed that says "ASSERT /usr/local/UDK2010/MyWorkSpace/MdePkg/Library/BaseLib/String.c(166): String != ((void *) 0)"
Mint tries to load but hangs up mounting drives.

My question is: what do I change to point at my mint install? And is it under Win or grub2?

Hope this helps someone figure it out!
Shrav
Level 1
Level 1
 
Posts: 5
Joined: Sat Apr 28, 2012 5:46 pm

Re: New EFI boot loader available: rEFInd

Postby srs5694 on Mon Jan 21, 2013 11:24 am

Shrav wrote:I installed refind under windows 8 because it wouldn't find my /boot under Mint. Windows works fine but mint won't load. On the refind loader screen I get a message overlayed that says "ASSERT /usr/local/UDK2010/MyWorkSpace/MdePkg/Library/BaseLib/String.c(166): String != ((void *) 0)"


What version did you install? That error message indicates a memory management error. If the program continues, then no harm is done, but it could cause problems on other systems, so I'd prefer to fix it, if it's not been fixed before. (Some versions prior to the latest, 0.6.5, have known memory management bugs.)

Mint tries to load but hangs up mounting drives.

My question is: what do I change to point at my mint install? And is it under Win or grub2?


If the kernel loads but the system hangs during the drive-loading process, then that's not a boot loader problem, and it may not even be an EFI problem; it's most likely a kernel bug or a serious configuration problem, and you should probably start a new thread on the topic that provides more details about precisely what happens -- at what point does the hang occur, what messages do you see on the screen before the hang, etc.
srs5694
Level 6
Level 6
 
Posts: 1014
Joined: Mon Feb 27, 2012 1:42 pm

Re: New EFI boot loader available: rEFInd

Postby Shrav on Mon Jan 21, 2013 1:10 pm

I will check when I get home but I'm pretty sure it's the latest version.

As far as Mint booting, if I disable UEFI it boots normally into Mint or Grub2 (and then to Mint).

I took a picture of the screen where it hangs. I'll post that as well when I get home (I'm on my phone now)
Shrav
Level 1
Level 1
 
Posts: 5
Joined: Sat Apr 28, 2012 5:46 pm

Re: New EFI boot loader available: rEFInd

Postby Seltox on Fri Jan 25, 2013 5:37 am

This is wonderful, and it's working great.

Just one question though - I've only got two OS's (Windows & Mint), but there are two entries showing up in rEFInd. Left to right, there is: Linux Mint (LM logo), Linux Mint (Tux logo), Windows (Windows logo), WIndows (Unknown logo). The Tux & Unknown will still boot into their respective OS fine, but I was just wondering if there's a way to hide them?

EDIT:

Forgot to mention this - but when it runs a message comes up:
Code: Select all
ASSERT /usr/local/UDK2010/MyWorkSpace/MdePkg/Library/BaseLib/String.c(166) : String != ((void *) 0)


If I go into the info screen and out again, it goes away. And it doesn't impact on functionality at all - but still thought I should point it out.
Seltox
Level 1
Level 1
 
Posts: 4
Joined: Tue Nov 06, 2012 2:58 pm

Re: New EFI boot loader available: rEFInd

Postby srs5694 on Fri Jan 25, 2013 12:34 pm

Seltox wrote:This is wonderful, and it's working great.


I'm glad you like it!

Just one question though - I've only got two OS's (Windows & Mint), but there are two entries showing up in rEFInd. Left to right, there is: Linux Mint (LM logo), Linux Mint (Tux logo), Windows (Windows logo), WIndows (Unknown logo). The Tux & Unknown will still boot into their respective OS fine, but I was just wondering if there's a way to hide them?


My suspicion is that the two Linux icons launch Linux in two ways -- one via GRUB and one via a direct boot of a Linux kernel. If I'm right, one of them will show a boot loader name that ends in "grub.efi" or "grubx64.efi" and the other will have a name that includes the string "vmlinuz". If this isn't correct, please tell me what filenames each entry gives you. In my experience, GRUB is less reliable than the direct boot option, but some people have no problems with GRUB. There are a number of ways to eliminate one or the other of these entries:

  • Delete or rename the GRUB file so that rEFInd won't find it. This will remove the GRUB option from the menu but leave the direct-booting method working. If you go with the "rename" option, changing the .efi extension should work, or you can move its directory out of the EFI directory on the ESP (/boot/efi/EFI under Linux).
  • Edit refind.conf and comment out the scan_all_linux_kernels option. This will keep the direct-boot Linux option from appearing.
  • Edit refind.conf and uncomment and edit the dont_scan_dirs, dont_scan_volumes, or dont_scan_files options to keep rEFInd from scanning whichever of the boot options you don't want to use.
  • Remove the EFI filesystem driver for the filesystem you use on your root (/) or /boot partition from the drivers_x64 subdirectory of the rEFInd installation directory. This will prevent rEFInd from scanning your kernels, leaving only the GRUB entry.

Note that if you want to do a direct (non-GRUB) boot but have a Mint icon, you can do so. Ways to do this are described here.

Your duplicate Windows entries are caused by the fact that Windows installs its boot loader twice, once as EFI/Microsoft/Boot/bootmgfw.efi (which rEFInd shows with a Windows icon) and again as EFI/BOOT/bootx64.efi (which rEFInd shows with a generic icon). The latter is the fallback boot loader for EFI systems, so that practice seems to be insurance against a loss of the computer's NVRAM data. In any event, there are multiple ways to eliminate one of these, which are similar to some of the options for removing the stray Linux entry:

  • Edit refind.conf and uncomment and edit the dont_scan_dirs or dont_scan_files options to keep rEFInd from scanning whichever of the boot options you don't want to use. (Setting "dont_scan_dirs fs0:/EFI/BOOT" is probably the best way to do this.)
  • Delete one of the boot loaders (probably EFI/BOOT/bootx64.efi). I can't promise that Windows won't add it back, though.

Forgot to mention this - but when it runs a message comes up:
Code: Select all
ASSERT /usr/local/UDK2010/MyWorkSpace/MdePkg/Library/BaseLib/String.c(166) : String != ((void *) 0)


If I go into the info screen and out again, it goes away. And it doesn't impact on functionality at all - but still thought I should point it out.


That's a bug, and I fixed a similar bug recently. There's a test version here:

http://www.rodsbooks.com/refind-bin-0.6.5.6.zip

If you try that and it doesn't fix the problem, please contact me if you're willing to run some versions with debugging code to help me track down the source of the problem.
srs5694
Level 6
Level 6
 
Posts: 1014
Joined: Mon Feb 27, 2012 1:42 pm

Re: New EFI boot loader available: rEFInd

Postby ElectricRider on Sat Jan 26, 2013 3:17 am

This thread totaly confuses me. I am struggeling to get a linux distro installed on a pc with windows 8 retail using UEFI and i came across this post who's title says it's a BootLoader "New EFI boot loader available: rEFInd"

But your webpage clearly says this is not true.. it says your tool is Only a BootManager, " Like rEFIt, rEFInd is a boot manager, meaning that it presents a menu of options to the user when the computer first starts up, as shown below. rEFInd is not a boot loader, which is a program that loads an OS kernel and hands off control to it. "
http://www.rodsbooks.com/refind/index.html

I need solution that doesn't confuse me. Is this tool a boot manager or a boot loader or both? Can i use this tool to make Mint 14 load on my PC using UEFI and Not using legacy Bios - and then have the option to either start Windows 8 or Mint at boot time from the same boot manager?

That's what i need to know how to do. I need good instructions for doing so.
( you may want to see my other post here to better understand my issue: viewtopic.php?f=46&t=123919&p=679048#p679048)
ElectricRider
Level 4
Level 4
 
Posts: 205
Joined: Tue Dec 07, 2010 8:39 pm

Re: New EFI boot manager available: rEFInd

Postby srs5694 on Sat Jan 26, 2013 1:43 pm

Old habits die hard. In the Linux world, the terms "boot loader" and "boot manager" have been used interchangeably for years, since most major Linux boot programs fulfill both functions. Thus, when I began this thread, soon after making the initial release of rEFInd, I automatically typed "boot loader" when I should have typed "boot manager."

That said, with the existence of the Linux kernel's EFI stub loader, the distinction has become a little blurry. rEFInd can launch a Linux kernel without the help of GRUB if that kernel includes EFI stub loader support. Mint 14's kernels include that support, so you can use rEFInd in much the same way you'd use GRUB, even though rEFInd is technically a boot manager whereas GRUB is both a boot manager and a boot loader.

Edit: I've just edited this thread's title to minimize future confusion.
srs5694
Level 6
Level 6
 
Posts: 1014
Joined: Mon Feb 27, 2012 1:42 pm

Re: New EFI boot manager available: rEFInd

Postby ElectricRider on Sat Jan 26, 2013 2:09 pm

Thanks for the reply and clarification. :-)
ElectricRider
Level 4
Level 4
 
Posts: 205
Joined: Tue Dec 07, 2010 8:39 pm

Linux Mint is funded by ads and donations.
 
PreviousNext

Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 27 guests