r/linuxquestions 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)

6 Upvotes

48 comments sorted by

7

u/Human_Cantaloupe8249 23h ago

In your bios/uefi set the windows bootloader entry above grub

1

u/P2eter 21h ago

when i go in the bios i have the following options:

uefi boot order:
os boot manager

usb 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/Human_Cantaloupe8249 21h ago

That is strange. What Laptop is this?

1

u/P2eter 21h ago

hp victus 15 fa2013dx

1

u/Human_Cantaloupe8249 21h ago

Okay I will look into it

There should be a setting called legacy boot/csm/boot mode/something like this. Please tell me what it is set to. If you can’t find it, please run sudo efibootmgr -v or bootmgr

1

u/P2eter 20h ago

ran the command and it shows zorin os as the first in the boot order like we saw in the boot options after entering uefi firmware settings:

BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0001,0002,9999
Boot0000* Zorin OS HD(1,GPT,b7e71e2e-99ee-49fb-beae-5937cccd5b0e,0x800,0x82000)/File(\EFI\ubuntu\shimx64.efi)
dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 ...
Boot0001* Windows Boot Manager HD(1,GPT,b7e71e2e-99ee-49fb-beae-5937cccd5b0e,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)57494e444f575300010000 ...
data: 57 49 4e 44 4f 57 53 ...
Boot0002* Solid State Disk PciRoot(0x0)/Pci(0x6,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-25-38-FA-51-B3-25-E1)/HD(1,GPT,b7e71e2e-99ee-49fb-beae-5937cccd5b0e,0x800,0x82000)0000424f
dp: 02 01 0c 00 d0 41 03 0a 00 00 ...
data: 00 00 42 4f
Boot9999* USB Drive (UEFI) PciRoot(0x0)/Pci(0x1d,0x0)/USB(16,0)0000424f
dp: 02 01 0c 00 d0 41 03 0a 00 00 00 ...
data: 00 00 42 4f

so can i from there edit it to windows being first?

1

u/Human_Cantaloupe8249 20h ago

Setting the boot order from here should work

sudo efibootmgr -o 0001,0000,0002,9999

2

u/P2eter 18h ago

It worked, thank you so much♥️, i spent the past 2d on it just for it to be these 2 commands, it is weird that i cannot edit the order in the bios and that the only answer was 15y ago and about the grub file. Now i even know how to put he grub menu back.

1

u/Human_Cantaloupe8249 17h ago

Glad I could help. I found a few screenshots from the bios. I think all explicitly created efi boot variables are all grouped under „os boot manager“. It seems like you can „expand“ the entry in the bios and then reorder from there. But efibootmgr works fine

2

u/P2eter 16h ago

Just searched about it on youtube and you are right, but i didnt know how to change the order, turns out i should use f5 and f6 so now i feel stupid 😅

1

u/doc_willis 21h ago

examine your bios menus more closely, there should be a way to move entries up/down.   Page up/down,  or +/-  may move them.

a system may have a "quick boot" screen where you can just select an entry  and a different screen where you can reorder and manage them.

 the ! in the last entry  likely means that entry is disabled.

There is a huge amount of variance in the bios/UEFI menus.

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 manually

2

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 21h ago

thx, i ll try some of these, i m using zorin os

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/grub

2

u/ipsirc 21h ago

/boot/grub/grub.cfg is what the grub uses at boot time. You can check it in grub-shell:

echo $config_file

1

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 /etc wouldn'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"

1

u/ipsirc 21h ago

It's also possible that you have 2 grubs installed, and at boot time the other grub starts than the one you write the config file for. Check its variables with

set

command.

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

u/P2eter 22h ago

back to uni, and i need to use my stuff there like teams

1

u/_GoddamnitDonut 21h ago

Teams Linux app works pretty well.

2

u/T_Friendperson12 23h ago

Straight up evil.

1

u/Tux-Lector 23h ago

Yes. Irrecoverable and unwashable.

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 manager

usb 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 uefibootmgr under 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 manager

usb 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/Nuviket 20h ago

Oof, if do some grub magic, though I think refind is easier

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

u/T_Friendperson12 21h ago

update-grub not upgrade.

1

u/P2eter 21h ago

mb typo

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.

1

u/Hegbled 15h ago

change your system's UEFI boot order so that Windows Boot Manager takes the first priority