Score:0

How to automatiaclly skip grub menu?

tt flag

I've installed Ubuntu 22.04 on an old Intel Mac Mini. Since I want it to be accesible remotely, I can't have it stuck at the grub menu. I tried changing the grub file and updating it, but nothing seems to work. It always stays at the grub menu waiting for a drive to be selected (there is only one drive - EFI boot). Here is my current grub file, based on similar questions i've seen:

GRUB_DEFAULT=0
GRUB_TIMEOUT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_DISABLE_OS_PROBER=true
GRUB_RECORDFAIL_TIMEOUT=0

Any Ideas what might be wrong?

David avatar
cn flag
Is the Linux you are running Debian?
MG123 avatar
tt flag
No, it's Ubuntu. I think the line was already in the grub file. From what I understand Ubuntu is based on Debian so that would explain it, no?
PonJar avatar
in flag
If you want to access this machine remotely why is grub an issue at all? How do you intend to initiate the boot process remotely? Normally you would leave the machine running and SSH in to it. Does the machine boot normally if you press enter at the grub menu? Have you tried setting a delay of a second or two? Are you updating grub successfully. By that I mean if you change something do you get a change in behaviour. Note that GRUB_HIDDEN_TIMEOUT_QUIET is deprecated so I would remove that and use GRUB_TIMEOUT_STYLE=hidden instead.
MG123 avatar
tt flag
Right now I have it running so there is no problem, like you say. But I'd like to solve this, for the times I need to restart the device, and can't select the drive remotely. Yes, the machine boots up normally. The terminal message tells me that grub was updated. I did change the timeout to 1s but it didn't work either. Thanks
PonJar avatar
in flag
Do you have another OS on this machine? Since you have GRUB_DISABLE_OS_PROBER=true nothing else will be detected. What file are you editing? If it’s /boot/grub/grub.cfg that will not work and is consistent with what you describe happening. The update-grub command will overwrite grub.cfg. If you are editing /etc/default/grub that should be working. If this is the case try reinstalling grub. It should then boot the first entry in the menu with a 5 second delay. That should be fine for your purposes and make it easier to interact with grub when you are not remote.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.