(SOLVED) Can rEFInd boot a MAC to an external usb BIOS drive??

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
1NEWLINUXUSER
Level 4
Level 4
Posts: 328
Joined: Sun Aug 25, 2019 8:58 am

(SOLVED) Can rEFInd boot a MAC to an external usb BIOS drive??

Post by 1NEWLINUXUSER »

Hi, hope everyone is doing ok. I have a rEFInd/mac question: can rEFInd be used to boot a MAC (EFI) to an existing external BIOS usb drive? I suspect probably not but thought I'd ask before I make an efi external drive. Any thought/questions would be appreciated, thanks.
Last edited by 1NEWLINUXUSER on Tue Jun 30, 2020 5:51 pm, edited 1 time in total.
t42
Level 4
Level 4
Posts: 230
Joined: Mon Jan 20, 2014 6:48 pm

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by t42 »

If this is your case:
MacOS 10.11 ("El Capitan") implements a new feature called System Integrity Protection (SIP; aka "rootless" or "CSR"). When enabled, SIP prevents the final step of rEFInd installation—registering the boot loader with the firmware. Thus, to install rEFInd, you must either disable SIP or perform the installation from something other than your regular macOS installation.
The options are described here
The rEFInd Boot Manager: rEFInd and System Integrity Protection
-=t42=-
1NEWLINUXUSER
Level 4
Level 4
Posts: 328
Joined: Sun Aug 25, 2019 8:58 am

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by 1NEWLINUXUSER »

t42 wrote:
Thu May 28, 2020 3:35 pm
If this is your case:
No, that's not me. I am familiar with SIP and the requirement that it needs to be disabled for rEFInd to be installed but from other sources not this article so thanks for the link to that.

My question stems from this: I know the mac is efi and if using the regular mac boot manager to boot to an external usb drive that drive has to be an efi drive. So, the question is, will using rEFInd as a boot manager miraculously over ride the efi requirement and allow the mac to boot to a BIOS external drive? I have a number of external BIOS usb drives and just thought it might be worth a try before reinstalling linux w/efi on one of them. I'd go ahead and try but I'm waiting on a new external drive to use as a Time Machine drive before I proceed so just thought I'd ask the question here.

Ant other thoughts? Thank you.
pbear
Level 14
Level 14
Posts: 5374
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by pbear »

You want to know whether rEFInd can boot a BIOS/MBR system, right? Skipping over whether this is a good plan, the answer is yes. See this how-to at the website, also here. Probably would make more sense to convert the external drives, though, or make them hybrid boot.
1NEWLINUXUSER
Level 4
Level 4
Posts: 328
Joined: Sun Aug 25, 2019 8:58 am

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by 1NEWLINUXUSER »

pbear wrote:
Sat May 30, 2020 11:32 am
You want to know whether rEFInd can boot a BIOS/MBR system, right? Skipping over whether this is a good plan, the answer is yes. See this how-to at the website, also here. Probably would make more sense to convert the external drives, though, or make them hybrid boot.
Right, as I'd mentioned I have a few ext. usb drives w/cinnamon installed but they are all BIOS. As I was planning of installing rEFInd on the Mac anyway I started thinking if rEFind would allow the Mac to boot to one of the BIOS drives I'd just use it that way for awhile instead of going through the EFI reinstall. I do have one EFI ext. usb drive that use to boot on the mac but it will no longer boot so I guess the EFI partition may be trashed. Can the EFI partition be fixed with Boot Repair or other method or is it better do a complete reinstall?

Thanks for the links, read over both a couple of times, each may require a couple more reads! In any case I'm not doing any thing until I get the new Time Machine backup drive. As always, thanks for the help.
pbear
Level 14
Level 14
Posts: 5374
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by pbear »

No fair asking a complicated question, then complaining that the answer is complicated. :P I think it's preposterous that rEFInd supports boot of legacy/BIOS systems. I think Rod Smith had a flash of inspiration, so followed through just to see whether it would work.

As for alternatives. In my observation, Boot Repair isn't very smart, so your case probably is much too complex. Rather, you should repair the USB drive with an EFI partition manually. As for the others, are they MBR or GPT? To boot in UEFI with Grub, they need to be converted to MBR GPT. Can be done, but now the simple solution is getting complicated. Then you would add an EFI partition (doesn't need to be first on the disk) and install Grub.

[Edited to correct typo.]
Last edited by pbear on Mon Jun 01, 2020 12:12 pm, edited 1 time in total.
fabien85
Level 7
Level 7
Posts: 1780
Joined: Tue Mar 11, 2014 4:30 pm

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by fabien85 »

The question was answered by pbear, let me just add my two cents.

Refind can load a system in Legacy/BIOS mode if the firmware can.
On intel-based Macs (i.e. not the ancient powerPC line), the Apple firmware can boot an internal drive in Legacy mode. That's how their software "Boot camp" works to dual-boot with windows. (Mind you, I'm not sure about this for the very latest Macs, they might be EFI-only as this seems to be the direction of the industry).
Legacy boot on an external drive normally works on recent machines. I had the case of a 2004 MacBook which would not. In that case, refind provided an option for Legacy boot, i.e. it correctly detected that the USB was Legacy-bootable, but when launched it issued a message basically saying "The firmware cannot launch external drive in Legacy mode". This was also one of these machines with a 32-bit EFI and 64-bit CPU, which made installing Linux a bit complex. Normally if your Mac is newer than ~2006, it should work.
At worst, refind will tell you it cannot.

Also, at least on a GPT drive (internal or external), refind can launch the kernel directly, and the kernel will bootload itself in EFI mode.
To do that, it just needs to have an EFI driver to be able to read the partition where the kernel is. When refind is installed, it also installs these drivers for all filesystems that it sees around. So if you have a Linux partition somewhere, it will work out of the box. The counter-example is if you install refind from macOS while only macOS is present ; then you would need to force the installation of the drivers with the option --alldrivers to refind-install.
pbear wrote:To boot in UEFI with Grub, they need to be converted to MBR.
Is that a typo where you meant GPT ? If not, I'm confused
pbear
Level 14
Level 14
Posts: 5374
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by pbear »

fabien85 wrote:
Mon Jun 01, 2020 4:53 am
pbear wrote:To boot in UEFI with Grub, they need to be converted to MBR.
Is that a typo where you meant GPT ? If not, I'm confused
D'oh! The link goes to a Rod Smith explanation (with more links) of how to convert with gdisk, so I did know what I meant to say.
pbear
Level 14
Level 14
Posts: 5374
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by pbear »

fabien85 wrote:
Mon Jun 01, 2020 4:53 am
This was also one of these machines with a 32-bit EFI and 64-bit CPU ...
By the way, likely off-topic but not necessarily. Why did they do this? Tried an internet search, but the terms are too common. Perhaps more to the point, how does one ascertain whether someone has one of these? The bitness of the CPU is in inxi, of course. What tells the bittness of the UEFI?
fabien85
Level 7
Level 7
Posts: 1780
Joined: Tue Mar 11, 2014 4:30 pm

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by fabien85 »

I'm guessing here, I was a kid at the time, but I think at that point windows was 32-bit, and Apple started transitioning from 32 to 64-bit. They started with the CPU, switching to intel at the same time, and part of the macOS system also transitioned : the kernel was 64-bit but most applications were 32-bit. MacOS snow Leopard (10.6) was the last with 32-bit support, in 2009.
To find the bitness of the UEFI, I think its cat /sys/firmware/efi/fw_platform_size. At least it works on my 64-bit laptop, I dont have anymore access to a 32-bit EFI to check.
1NEWLINUXUSER
Level 4
Level 4
Posts: 328
Joined: Sun Aug 25, 2019 8:58 am

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by 1NEWLINUXUSER »

fabien85 wrote:
Mon Jun 01, 2020 4:53 am
The question was answered by pbear, let me just add my two cents.
pbear wrote:
Sun May 31, 2020 1:13 pm
No fair asking a complicated question, then complaining that the answer is complicated. :P
Thank you both. Sorry, I don't mean to sound like I'm complaining because I'm not really. It just maybe a bit of my frustration showing that just when I'm starting to think I might be seeing things a little more clearly it all gets more complicated! It's like quick sand, the more you squirm the deeper you sink. :?

I'm pretty sure all the BIOS drives are MBR, the only GPT was the efi drive, which was specifically made to work on the mac (and did for a while!). With this one I may try the "manual" repair method and see if it works, if it does great & if not, oh well, it'll be a redo. I've attached a screenshot of the efi drive showing the partitions, shouldn't /dev/sde2 be hfs+(for mac) instead of ext4, I think it use too!

Anyway, I think from here on I may try and stick as close to the KISS principle as possible. Thanks again.
Attachments
Screenshot from 2020-05-27 12-54-34.jpg
fabien85
Level 7
Level 7
Posts: 1780
Joined: Tue Mar 11, 2014 4:30 pm

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by fabien85 »

No problem.
I was not sure what was the question of your post, but looking at the previous ones, I guess it is whether refind can allow you to boot the Linux on the drive for which you provide a screenshot. Correct me if I'm wrong.
In that case, the answer is yes, provided that the drive is connected when you install refind (from macOS). Alternatively you can add the option --alldrivers to refind's install script.
Then refind should provide an option to boot that Linux system.

For the question on hfs+, right now you have ext4 meaning that it's a Linux OS that is present on that drive. There is no problem a priori with booting that on a Mac machine.
As far as I know, you cannot install Linux on hfs+, at least not journaled and at least it's not recommended. That filesystem is not perfectly supported (in particular the journaling), because it is property of Apple which did not release publicly the specifications.
pbear
Level 14
Level 14
Posts: 5374
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by pbear »

1NEWLINUXUSER wrote:
Tue Jun 02, 2020 8:04 am
Thank you both. Sorry, I don't mean to sound like I'm complaining because I'm not really.
It was a joke, son. Notice the emoji.
Anyway, I think from here on I may try and stick as close to the KISS principle as possible. Thanks again.
The simplest solution, ISTM, is the --alldrivers option fabien85 mentioned above. Main drawback of that solution, as I recall, is that it slows down the boot process a bit, but can't be all that much. Then you edit a config file to enable legacy boot.
1NEWLINUXUSER
Level 4
Level 4
Posts: 328
Joined: Sun Aug 25, 2019 8:58 am

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by 1NEWLINUXUSER »

pbear wrote:
Tue Jun 02, 2020 11:57 am
It was a joke, son. Notice the emoji.
I did see the emoji and did figure it was a joke but it being early in the am and having had only a couple of cups of coffee I must have been in a somewhat more serious mind set! Unusual for me to be so serious and I'll never let it happen again! :wink:
fabien85 wrote:
Tue Jun 02, 2020 8:27 am
I was not sure what was the question of your post, but looking at the previous ones, I guess it is whether refind can allow you to boot the Linux on the drive for which you provide a screenshot. Correct me if I'm wrong.
Well, you're partially correct, it was actually a two part question. First was about using rEFInd to boot a BIOS usb drive, which you both answered. The second was about the efi usb drive (screen shot) which will no longer boot. I suspect a trashed efi partition or some other problem and I was wondering, should I try to repair or just redo?

You've both given me some options to think about and which I'll have to read up on a little before squirming any more. The good news is I got my new Time Machine back up drive so I should be trying something ere soon so maybe back shortly with questions or results. Thank you both again!
1NEWLINUXUSER
Level 4
Level 4
Posts: 328
Joined: Sun Aug 25, 2019 8:58 am

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by 1NEWLINUXUSER »

Hi. Hope you both are still out there and staying safe.

I had to step away for while but over the last couple of weeks I did manage to make a few attempts at the manual efi partition repair as suggested by pbear a while back but had no luck. Either the efi partition was too far gone or I didn't know what I was doing or possibly both. In any case I decided to scrap that plan, reformatted that drive and I'll start over.

Pbear, I've decided to try your "install to usb" tutorial method of unflag & reflag on a real hdd usb external drive I was able to scrounge up. It's larger & faster so hopefully it should work well on the imac. But I have a question: in the unflag & reflag section you state "The installer will create an EFI boot partition". How does the installer know it's to be efi without being told? Or does it just assume it's to be an efi based on the host system drive being efi?.

Thanks
1NEWLINUXUSER
Level 4
Level 4
Posts: 328
Joined: Sun Aug 25, 2019 8:58 am

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by 1NEWLINUXUSER »

Hi guys. I hope one or both of you, or anyone else, can jump in here and offer some advice. I'm afraid I need some help with the installation to an ext. usb drive. As I noted previously I'm trying to install to an ext. usb hdd using pbears unflag/reflag method. Everything seemed to go normally until it got to "Deleting system files" and that's where it stopped! It's been "deleting" for a good while now so I suspect it's stuck! Also the ext. hdd is not doing anything, no flashing led, no muffled seek noise, etc. Another thing that bothers me is the "deleting system files"', what system files? There shouldn't be any on this ext. drive

How can I get it to push forward or how can I get to stop the installation? I'm reluctant to just pull the plug but may have too. I've attached a screen shot of where it is now. Any advise would be appreciated. Thanks.
Attachments
Screenshot from 2020-06-19 18-04-36.jpeg
fabien85
Level 7
Level 7
Posts: 1780
Joined: Tue Mar 11, 2014 4:30 pm

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by fabien85 »

How does the installer know it's to be efi without being told?
The install is made in the current boot mode. If you booted the live USB in UEFI mode, you will get a UEFI install.
(Note: it's possible to override this by telling the installer not to install any bootloader, and installing the bootloader yourself manually afterwards)

For the frozen install process, I dont know what's going on.
If you have to stop it, I suggest not to do it by pulling the plug of the hard drive. Instead kill the installer process.

Code: Select all

sudo killall ubiquity
and wait a bit. If it's not enough add a -9.
1NEWLINUXUSER
Level 4
Level 4
Posts: 328
Joined: Sun Aug 25, 2019 8:58 am

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by 1NEWLINUXUSER »

fabien85 wrote:
Sat Jun 20, 2020 7:38 am
The install is made in the current boot mode. If you booted the live USB in UEFI mode, you will get a UEFI install.
Well, duh! I should've realized that as it's on an imac, the option key gives the eufi live boot option, duh! :oops: Just overthinking things again!

As for the frozen installation, thanks for your suggestion there but appears I had mother natures help during the night, we lost power so everything was off this morning. Rebooted the imac, then w/live boot drive, everything appears to be ok! I reformatted the hdd and will give the install another go later today or maybe tomorrow. But I'll definitely make a note of the "sudo killall ubiquity" command.

Thanks again.
1NEWLINUXUSER
Level 4
Level 4
Posts: 328
Joined: Sun Aug 25, 2019 8:58 am

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by 1NEWLINUXUSER »

Well, I did a complete reinstall which went seemingly without a hitch this time. But what start out with a certain level of encouragement soon went the other way. The first couple of boots after install had no problems but as I began to install updates and reboot, the reboots got less and less consistent. Shortly I was having to boot the thing twice, the first boot would get only as far as the round green LM logo where it would hang. The second boot seemed to work ok and Linux would load up. However now, it only gets as far as the LM logo and sits there!

Any idea what I can do to push it forward, any keys I can hit to make it do something? Or is another re-install needed? Maybe a different drive? What information would be helpful? Again, any advise or questions would be helpful. Thank you!
fabien85
Level 7
Level 7
Posts: 1780
Joined: Tue Mar 11, 2014 4:30 pm

Re: Can rEFInd boot a MAC to an external usb BIOS drive??

Post by fabien85 »

Hum, looks to me like a hardware problem, either with the hard drive or the cable.
Report what you get from the logs :

Code: Select all

dmesg --level=emerg,alert,crit,err
if there is any input/output error then that's it.
You could perform a SMART self-test of the hard drive with gnome-disks (Menu > Preferences > Disks). Though I have had the case of a drive failing where Disks did not report anything wrong.

If you want to see what's stopping the boot, you can make the boot verbose.
With your preferred text editor edit as root /etc/default/grub, e.g.

Code: Select all

sudo nano /etc/default/grub
you should see a line

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.runpm=0"
(depending on your Mint version you may or may not have the nouveau.runpm=0)
remove quiet splash, save and exit (with nano ctrl-o then ctrl-x). Then update grub

Code: Select all

sudo update-grub
your next reboot should be verbose. So you can see what are the last few messages when it stops and report them.
Post Reply

Return to “Newbie Questions”