4

I want to install linux in a machine, along with windows, but I wouldn't want people to notice.

So I thought if there was some way to hide grub menu on startup to make it directly boot from the windows partition, but when a certain key is pressed on startup (let's say left shift, for example) I want the grub menu to appear

Is it possible to do it? Can anybody think about another alternative?

opensas
  • 305

1 Answers1

2

It seems like there is a problem with ubuntu's /etc/grub.d/30_os-prober file

I could hide the grub menu by disabling it with

GRUB_DISABLE_OS_PROBER=true

but then I lost the other boot options.

I could solve it thanks to this answer at askubuntu: https://askubuntu.com/a/552431/26067

There's a bug in os-prober that overrides the GRUB_TIMEOUT variable, resetting it to 10 seconds.

Some made these workarounds gists, they are a couple of scripts that saves the value of timeout and timeout_style variable, and later they restore.

this is how my /etc/default/grub file looks like:

GRUB_DEFAULT="saved"
GRUB_HIDDEN_TIMEOUT=1
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0

Now I can get to the menu pressing esc when the machine is about to boot.

opensas
  • 305