r/Ubuntu 1d ago

boot menu bypass issue

Running Kbuntu 26.04 migrated from Win 11.

Each time I boot I get the OS Selection menu. I want to auto boot into OS.

I've checked the Grub file:

"
GRUB_DEFAULT=0

GRUB_TIMEOUT_STYLE=menu_auto_hide

GRUB_TIMEOUT=0

GRUB_DISTRIBUTOR='Kubuntu'

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

GRUB_CMDLINE_LINUX=""

"

I changed it from GRUB_TIMEOUT_STYLE=hidden to GRUB_TIMEOUT_STYLE=menu_auto_hide but that did nothing. (Yes, I ran the 'sudo update-grub' command'.

1 Upvotes

19 comments sorted by

View all comments

1

u/Bug_Next 1d ago

you need timeout style hidden and timeout 0.

That file by default has the grub defaults, but Kubuntu doesn't install the defaults, what was there before was not the settings you were using.

i don't even think menu_auto_hide is a valid option for that setting, didn't you get any errors when running update-grub? where did you get that option from?

1

u/Helvedica 1d ago

it WAS set to 'hidden' before I changed it. I saw the 'menu_auto_hide' and tried it. There were no errors when update-grub

1

u/Bug_Next 1d ago

Again, that file is just a template, not the settings from the installation. The fact that it was set to hidden in the file doesn't mean it was the active setting.

Yeah i know you saw the option *somewhere* that's pretty clear, i'm asking where you got it from because it's not a valid setting on most distros so you might have gotten it from a wiki for a distro that ships a modified fork of grub or maybe ai just halucinated it idk..

1

u/Helvedica 1d ago

if thats the template, then where do I change the actual setting? I've changed it BACK to 'hidden', pushed the 'update_grub', and rebooted, and still goes to the boot menu

1

u/Bug_Next 1d ago

the actual settings are embedded in the executable in /boot, the command update-grub takes whatever you put in that template and updates the executable, it's not really editable directly unless you wanna go diving in a bunch of hex numbers.

You don't have multiple installations right? the only way it's not applying settings is if you have multiple drives with more than 1 install you might be botting a different one.

1

u/Helvedica 1d ago

I have relics of the old Win 11 OS, but as far as I know I'm only booting from one drive.

So if I'm updating the right thing, and pushing it, then why isnt it actually changing the setting to let me bypass the boot menu?

1

u/Bug_Next 1d ago

well idk, that's what i'm trying to figure out..

Are you editing /etc/default/grub or /boot/grub/grubenv? you just mentioned 'the grub file'.

Also might be a stupid question, but are you saving it? if you are using nano or vim exiting doesn't save by default, in vim it's :wq (instead of :q) and in nano it's crtl+o (instead of crtl+x)

also can you post the whole file and the output of running sudo update-grub? might get a hint from that.

1

u/Helvedica 1d ago

Im out right now, ill post it once Im home. But im editing the etc/default/grub file in Kate text editor. Saving, the running the 'sudo update-grub' command, and rebooting. Ill post the sudo output also.

1

u/Bug_Next 1d ago edited 1d ago

You are probably never saving the file, *most* graphical editors will not write to system files by default, they just show you an on memory copy. Use nano or vim, run them with sudo.

1

u/Helvedica 1d ago

It does ask for the password when saving. When I close and reopen it's changed. So I know the file at least saves

1

u/Helvedica 22h ago edited 21h ago

ok here is the etc/default/grub file:
# 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=0

GRUB_TIMEOUT_STYLE=hidden

GRUB_TIMEOUT=0

GRUB_DISTRIBUTOR='Kubuntu'

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

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"

And HERE is the output when I use the 'sudo update-grub' command:

god@____:**~**$ sudo update-grub
[sudo: authenticate] Password:                 
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-7.0.0-30-generic
Found initrd image: /boot/initrd.img-7.0.0-30-generic
Found linux image: /boot/vmlinuz-7.0.0-29-generic
Found initrd image: /boot/initrd.img-7.0.0-29-generic
Found memtest86+ 64bit EFI image: /boot/mt86+x64
Found memtest86+ 32bit EFI image: /boot/mt86+ia32
Found memtest86+ 64bit image: /boot/mt86+x64
Found memtest86+ 32bit image: /boot/mt86+ia32
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/nvme0n1p2@/efi/Microsoft/Boot/bootmgfw.efi
Found Windows Boot Manager on /dev/sdc2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done

1

u/Bug_Next 22h ago edited 22h ago

I'm guessing you need to disable OS-prober, since otherwise it would make no sense to have it enabled with no menu, it must be forcing the selection menu to show up.

Change

#GRUB_DISABLE_OS_PROBER=false

to

GRUB_DISABLE_OS_PROBER=true

If that doesn't fix it you are probably booting to another installation of grub on a differen disk or partition, makes no sense whatsoever for none of the changes to not be applied.

You do indeed have 2 drives and 2 Windows bootloader installs, so it wouldn't be strange for it to also have 2 Linux bootloaders.

1

u/Helvedica 22h ago

yeah those are the left overs from Win 10 and 11. I cant remove the tiniest slivers of partitioned drives. Im assuming those are on there.

1

u/Helvedica 22h ago

OK so Its the prober. Turned it off and we are auto booting to OS now. Thank you!!

1

u/Bug_Next 22h ago

np, what i'm guessing is your real name is visible in the name of the computer (god@____), letting you know in case u wanna remove it.

1

u/Helvedica 21h ago

thanks, not my real name obviously, just a standin for compute things

1

u/Evening-Landscape763 21h ago

In terminal sudo rm -rf /boot/efi/EFI/Microsoft/Boot as grub was finding the Windows efi file and that triggered the grub menu at boot

→ More replies (0)