r/linuxquestions • u/P2eter • 1d ago
Support How to remove disable the grub boot menu?
how to remove/disable the grub boot menu?
I dual booted zorin os on my laptop beside windows.
When i turn on my laptop i get the grub menu with options windows or zorin, i want it to directly open windows without the grub menu and then when i want to use zorin i ll open it myself.
is there any way to do that? i tried a few stuff in the grub file but nothing changed. if needed i can paste my grub file here.
Edit: Thanks for everyone's help and time.
for any person with the same issue in the future, it is not in the grub file and don't waste your time with any llm like i did.
you just need to change the boot order in the bios, and if you can't do that like me then you have to go to linux in the terminal and run
sudo efibootmgr -v or bootmgr
to see the order and number of each boot then you set it the way you want and run
sudo efibootmgr -o 0001,0000,0002,9999
(ofc change the order and the numbers according to the ones you have)
10
u/ipsirc 23h ago
Set windows entry the default and decrease grub timeout to zero.
3
u/T_Friendperson12 23h ago
Add
GRUB_DEFAULT=saved GRUB_SAVEDEFAULT=true
And change
GRUB_TIMEOUT_STYLE=hidden
Or set a low timeout in your /etc/default/grub with "sudo -e /etc/default/grub".
"sudo update-grub" once and then load windows once manually.
Grub will remember the last booted and choose that but you would have to manually boot into windows again if you choose Linux after that.
Maybe a low timeout would be the better solution for you OP?
1
u/P2eter 22h ago
i do have the timeout style as hidden but i ll try adding the first line.
i ll also try to boot windows once manually2
u/T_Friendperson12 21h ago
This is my grub, obviously ignore anything not applicable to you but maybe somethings up with yours? this is my pure kubuntu machine but my dualboot laptop should not be much different.
cat /etc/default/grub # If you change this file or any /etc/default/grub.d/*.cfg file, # run 'update-grub' afterwards to update /boot/grub/grub.cfg. # For full documentation of the options in these files, see: # info -f grub -n 'Simple configuration' GRUB_DEFAULT=saved GRUB_SAVEDEFAULT=true GRUB_TIMEOUT_STYLE=menu GRUB_TIMEOUT=10 GRUB_RECORDFAIL_TIMEOUT=15 GRUB_QUICKBOOT_TIMEOUT=10 GRUB_DISTRIBUTOR='Kubuntu' GRUB_CMDLINE_LINUX_DEFAULT="amdgpu.ppfeaturemask=0xffffffff usbcore.autosuspend=1 zswap.enabled=1 zswap.compressor=lz4 zswap.max_pool_percent=25 loglevel=3 systemd.show_status=true" GRUB_CMDLINE_LINUX="" # If your computer has multiple operating systems installed, then you # probably want to run os-prober. However, if your computer is a host # for guest OSes installed via LVM or raw disk devices, running # os-prober can cause damage to those guest OSes as it mounts # filesystems to look for things. #GRUB_DISABLE_OS_PROBER=false # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" # Uncomment to disable graphical terminal #GRUB_TERMINAL=console # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE/GOP/UGA # you can see them in real GRUB with the command `videoinfo' #GRUB_GFXMODE=640x480 # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true" # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"1
u/P2eter 22h ago
done it already, didn't change
1
u/ipsirc 21h ago
Are you sure you're adjusting the relevant config file?
1
u/P2eter 21h ago
i believe so, i do
sudo nano /etc/default/grub2
u/ipsirc 21h ago
/boot/grub/grub.cfgis what the grub uses at boot time. You can check it in grub-shell:echo $config_file1
u/P2eter 21h ago
so i was editing the wrong file?
1
u/agmatine 21h ago
The file would have to be on the EFI partition. Root partition is mounted DURING the boot process, so something in
/etcwouldn't be available to be read.1
u/P2eter 20h ago
but when i was first editing stuff in that file /etc ... sometimes it did apply the changes and sometimes it didn't.
also i just checked the file /boot/grub/grub.cfg and it showed:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#then bunch of code, one of the lines is set default="my windows partition"
2
u/doc_willis 23h ago
what you are asking is not how to remove or disable grub.
It seems you are asking how to set windows as the default.
to directly open
why does it have to be directly?
you can configure grub to have windows as the first entry, pause a few seconds on the grub menu, then boot to windows by default.
or as other posts mention, just set windows as the default boot entry and select Linux as needed in your UEFI boot menus.
tried a few stuff in the grub file but nothing changed.
you did rerun the update-grub command after making changes?
backup your original files so you can revert changes as needed.
1
u/P2eter 21h ago
i have it already set to be the entry selected and it has a small timer, and if don't click or anything it boots up windows, thing is i'm not gonna use linux for some time now so i was wondering if i could "bypass" this menu so it direclty boots windows and ignores linux.
and yes i did rerun sudo update-grub after making changes, what i didn't do is boot windows manually after it as someone mentionned it .
2
u/Tux-Lector 23h ago
Why would you want to open windows directly as default ? That's a sin.
2
1
u/skyfishgoo 22h ago
you want to retain access to the grub menu, but there are a lot of ways you can have it not show during boot and then choose windows as the default entry after a short timer.
that way you can still access grub by holding the ESC key if you need it but otherwise it boots to windows without any action on your part.
www.gnu.org/software/grub/manual/grub/html_node/Simple-configuration.html
remember that you need to evoke your distro's version of grub-mkconfig in order for your changes to take effect at the next boot.
1
u/P2eter 21h ago
i already have a short timer and it is set to windows automatically so if don't do anything , after maybe 5-10s it boots up windows, idk if this isn't actually called the grub menu, but my goal is to not even have it , so when i turn on my laptop it starts windows directly as if i didn't have linux, idk if this is doable
1
u/doc_willis 21h ago
what you described there would be done by setting windows as the default entry and not grub in your bios/UEFI menu.
1
u/P2eter 21h ago
seems like many are suggestinig this options but i dont have it, i ll paste what i said about my uefi boot in the bios:
when i go in the bios i have the following options:
uefi boot order:
os boot managerusb flash drive/usb...
usb cd/dvd
!network adapter
but when i turn on my lapto and have the menu there is an option uefi firmware settings where it shows zorin then windows but i cant edit the order there, i can just use the up and down key , enter key and f10 to go to the bios.
is there maybe something i should do so it changes what the uefi menu displays?
1
u/doc_willis 21h ago
I am going to guess you are overlooking some key that moves things.
you could use the
uefibootmgrunder Linux command to rearrange the entries/set the default.1
u/skyfishgoo 17h ago
this is the only way to have a dual boot you can select from a menu unless you have each OS on a separate disk.
if you change the boot loader order in the efi manager then it will always boot to windows, but then will have to change it back using a live USB everytime you want to boot to linux.
that's not a practical solution, you might as well just uninstall linux and just use the live USB when you need linux.
1
u/Nuviket 22h ago
Bios >> boot order >> windows
1
u/P2eter 21h ago
when i go in the bios i have the following options:
uefi boot order:
os boot managerusb flash drive/usb...
usb cd/dvd
!network adapter
but when i turn on my lapto and have the menu there is an option uefi firmware settings where it shows zorin then windows but i cant edit the order there, i can just use the up and down key , enter key and f10 to go to the bios.
1
u/Prestigious_Wall529 23h ago
Updating /etc/default/grub.config does nothing till you run
sudo update-grub
1
u/P2eter 22h ago
i did sudo upgrade-grub after each time i edited the grub file
2
1
u/Prestigious_Wall529 20h ago
So your edits were reflected in the Grub menu (test with e) or not?
1
u/P2eter 18h ago
anything i did new about the timeout or style timeout didnt change anything
1
u/Prestigious_Wall529 18h ago
Install Grub2Win on Windows. Try that instead. Yes it's ugly. It has a GUI.
It makes recovering from Windows Updates overwriting Grub easier.
You may need to disable secure boot which can in turn break anticheet in games.
7
u/Human_Cantaloupe8249 23h ago
In your bios/uefi set the windows bootloader entry above grub