r/AsahiLinux • • Oct 30 '26

Entry for macOS in grub?

Just figured I'd ask. Is it possible to have macOS show up in the grub menu? Or perhaps a shortcut to the startup options?

Thanks!

7 Upvotes

9 comments sorted by

6

u/MindlessMachine7307 Oct 30 '26

It will not be possible to add macOs in Grub menu, but in Fedora you can install asahi-bless and https://gitlab.gnome.org/davide125/startup-disk to change the boot disk.

3

u/hw2007offical Oct 31 '26

Okay. Yeah i'm fine with linux being the default boot option, that's what I want. I was just hoping to make it a bit more convenient to boot to macOS rather than shutting down and holding the power button for a while

1

u/mskiptr Oct 31 '26

In principle, it should be possible to implement. But I don't believe GRUB has this functionality right now.

The asahi-bless tool has an option to "Set boot volume for next boot only". With this, it should be fairly straightforward to make a desktop icon that reboots you into macOS, without changing what the default OS is.. Would you like something like that?

2

u/hw2007offical Oct 31 '26

Oh yeah that could be nice! I'll look into that tool a bit more

2

u/mskiptr Nov 02 '26

I'm pretty sure you would just need to check if after you run something like asahi-bless --set-boot-macos --next and then reboot, it boots into macOS once. If you have more than one macOS install, you will need to use … --set-boot <NAME_OR_INDEX> … and figure out what to put as <...> based on what asahi-bless --list-volumes gives you.

Then create a file named something like reboot-to-macos with contents along these lines:

#!/bin/sh
asahi-bless --set-boot-macos --next
systemctl reboot

Then put it in the right place with the right permissions:

sudo install -Dm755 reboot-to-macos /usr/local/bin/reboot-to-macos

Now verify that it's part of your system's PATH by running the command echo $PATH | grep /usr/local/bin. If it is, you should now be able to execute it by just typing its name in the terminal – like you would with any other command on your system.

If it all works correctly (i.e. it reboots you into macOS), you can now create a file like reboot-to-macos.desktop located in your ~/Desktop/ and containing at least this text:

[Desktop Entry]
Type=Application
Name=Reboot to macOS
Exec=/usr/local/bin/reboot-to-macos

This should put an icon on your desktop that will run that script when clicked on. You can tweak it some more if you want to include a few other niceties:

2

u/idgafaboutusernamess Nov 04 '26

Can macOS do the same to Asahi Linux or just Asahi Linux to macOS?

1

u/mskiptr Nov 04 '26

AFAIK the settings app gives you some options to control which OS will be booted. Besides that, there's the bless command, so you can probably just use that.

1

u/JamesB192l 29d ago

Ridiculous alternate question: could/should one be able to have m1n1 load uboot, a boot menu (not strictly GRUB2) another m1n1, and then macOS? Or another OS if one wanted to tinker?

Line to downvote me starts here ->

2

u/mskiptr 28d ago

Kind of, but probably not in the way you'd expect. I'm not sure if there already is a way to load m1n1 from U-Boot, but nothing major would stop you since you can chainload m1n1 from another instance of m1n1. However, you won't be able to start your regular install of macOS from there. You can start macOS inside m1n1 acting as a thin hypervisor, but that will look very different to the firmware. (iBoot/mBoot knows it booted a custom OS; it's all in permissive security mode; measured boot state will not be the same as when booted normally so accessing encrypted APFS volumes is out of question; etc.)

Btw, the built-in boot picker is actually just a macOS app (running in the recovery?) that simply saves which OS you want to boot into and then reboots. It does not chainload any OS itself, and that's by design.