I have an old Macmini (Macmini3,1 early 2009) which I use as a media player on Linux. While its old the Nvidia GPU makes it effective. rEFInd is on the MacOS partition, and I use it to default boot Linux which is on another internal partition, which in turn mounts a large USB drive with the media. I rarely touch the MacOS partition.
This ihas worked for years, but now e internal disk is developing bad blocks, and I really want to move the Linux root onto the USB. The USB drive is a 8TB GPT partitioned drive with gurb2 and ext2 filesystems, no EFI partition.
rEFind doesn't see the USB drive. The best I have been able to do is use rEfind to select the internal Linux partiton, and use F2 to hand edit the Linux option to replace root= to be the usb drive partition.
This works, since once the Linux kernel is in control it sees the usb drive and uses it as root.
The most pressing downside is I can't reboot without catching rEFind and hand editing. It would help a lot if I could get around the hand editing.
Of course I'm not thrilled with keeping the vmlinux/initrd in sync between the internal and external partitions.
I got into this because of some bad block file corruption on the internal. but its probably not an issue with how little the internal would be used going forward.
At any rate, my immediate question is about how to avoid hand editing root=. Other suggestions about how to boot directly to the USB would be helpful.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Three possible causes of the problem you describe occur to me:
It could be that this is an issue with the EFI itself being unable to read from a USB device because of a lack of USB drivers. This seems like an odd limitation, since most EFI-based computers can boot from USB devices. That said, it could be that the Mac's EFI has USB drivers but is not loading them until after attempting (and failing) to boot from an internal disk, in which case the USB drivers would not be available to rEFInd booted from an external disk. It could also be that your Mac is old enough that it doesn't support booting from USB devices, period. In either case, I don't know of an easy workaround. In theory, loading a USB driver as a file might work, but I don't know where you might find such a driver file.
It's possible that the EFI can see the USB device, but rEFInd might lack a driver file for whatever filesystem holds the kernel. If you're using the same filesystem on both the internal and external disks, then this shouldn't be a problem; but if you've changed from one filesystem to another, this could be the cause. See the rEFInd drivers documentation for more on rEFInd's EFI filesystem drivers.
It's possible that the EFI is not activating the USB device quickly enough. In this case, hitting the Esc key in rEFInd should make the kernel(s) on the external device appear. If this works, then setting the scan_delay option in refind.conf should work around the problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have an old Macmini (Macmini3,1 early 2009) which I use as a media player on Linux. While its old the Nvidia GPU makes it effective. rEFInd is on the MacOS partition, and I use it to default boot Linux which is on another internal partition, which in turn mounts a large USB drive with the media. I rarely touch the MacOS partition.
This ihas worked for years, but now e internal disk is developing bad blocks, and I really want to move the Linux root onto the USB. The USB drive is a 8TB GPT partitioned drive with gurb2 and ext2 filesystems, no EFI partition.
rEFind doesn't see the USB drive. The best I have been able to do is use rEfind to select the internal Linux partiton, and use F2 to hand edit the Linux option to replace root= to be the usb drive partition.
This works, since once the Linux kernel is in control it sees the usb drive and uses it as root.
The most pressing downside is I can't reboot without catching rEFind and hand editing. It would help a lot if I could get around the hand editing.
Of course I'm not thrilled with keeping the vmlinux/initrd in sync between the internal and external partitions.
I got into this because of some bad block file corruption on the internal. but its probably not an issue with how little the internal would be used going forward.
At any rate, my immediate question is about how to avoid hand editing root=. Other suggestions about how to boot directly to the USB would be helpful.
Three possible causes of the problem you describe occur to me:
scan_delayoption inrefind.confshould work around the problem.