elementary / os-patches

Patched packages for elementary OS and the tools that keep them up-to-date
GNU General Public License v3.0
18 stars 10 forks source link

Grub timeout regardless of settings #178

Closed cassidyjames closed 3 years ago

cassidyjames commented 3 years ago

What Happened

We're still getting a forced grub timeout in OS 6 images. I've tested Ubuntu 20.04 on the same hardware with the same settings and do not get a forced grub screen there. It's also the same with and without full disk encryption enabled.

Expected Behavior

Grub doesn't show by default, but only shows on boot failure or holding a key down (like Ubuntu).

Steps to Reproduce

  1. Install OS 6 Beta 2
  2. Boot your new install
  3. See grub

Platform Information

OS 6 Beta 2

abrattic commented 3 years ago

This answer may be of some help: https://askubuntu.com/a/1036957

Kisuke-CZE commented 3 years ago

I had same prolem with father's PC after fresh installation of Linux Mint 20, which is like elementaryOS based on Ubuntu 20.04 LTS.

Solution was this: https://forums.linuxmint.com/viewtopic.php?f=46&t=287026#p1588204

lazarus-cm commented 3 years ago

Will this be fixed and made available before the Release Candidate does anyone know?

TommyLuco commented 3 years ago

I fixed it. The issue is that you guys have a couple of different grub.cfg files. The one affecting the startup times is hidden in /boot/efi/EFI/ubuntu/grub/grub.cfg

I've set the timeout to 0 in that one and it affected the boot time.

No offense but might be the time to maybe clean up the whole grub setup.

tomaswarynyca commented 3 years ago

The problem is still present in the final version @cassidyjames

hotsezus commented 3 years ago

Found out that executing update-grub writes changes into /boot/grub/* and not somewhere into /boot/efi/EFI/ubuntu/*. So, nothing is being changed in /boot/efi/EFI/ubuntu/grub/grub.cfg.

Btw, i'd like to mention that it would be great if we could place loader in /boot/efi/EFI/elementary to avoid conflicts with Ubuntu

tomaswarynyca commented 3 years ago

I found a solution @hotsezus

sudo sh -c 'echo GRUB_RECORDFAIL_TIMEOUT=0 >> /etc/default/grub';
sudo grub-mkconfig -o /boot/efi/EFI/ubuntu/grub/grub.cfg
cassidyjames commented 3 years ago

@tomaswarynyca I'm unable to reproduce. Can you provide more information about your install? Legacy/BIOS mode or EFI? Encryption? Secure boot?

tomaswarynyca commented 3 years ago

Sure @cassidyjames, my notebook is ASUS-X512DA I have EFI, Secure boot & Encryption Up I put the command that fixes it, there's a line to be set

emcek commented 3 years ago

I have same problem at my HP Probook 640 G2 with EFI and full disk encryption (not sure if about secure boot but 90% is on)

bobcatzoo commented 3 years ago

@tomaswarynyca I'm unable to reproduce. Can you provide more information about your install? Legacy/BIOS mode or EFI? Encryption? Secure boot?

I installed on my second SSD drive, EFI and disabled Secure boot(thinkpad P52), every time I update /etc/default/grub time out setting and update-grub, It still 30s countdown. Also I think maybe this also the reason of black screen when logging in after suspend. Beside after I install VMware 16, when first launch it, VMware ask me to locate the kernel-5.11.... But when I switch to Ubuntu 20.04.2, these problems mentioned above doesn't appear.

Hope this will be useful to solve the problem.

davidmhewitt commented 3 years ago

This should now be resolved after a round of system updates and another update-grub. Please comment if not.

tomaswarynyca commented 3 years ago

@davidmhewitt Why are you closing this? It's not related to your patch. The solution I found was to add this line https://github.com/elementary/os-patches/issues/178#issuecomment-896769076

davidmhewitt commented 3 years ago

@davidmhewitt Why are you closing this? It's not related to your patch. The solution I found was to add this line #178 (comment)

So we've dropped the Ubuntu patch that's enabling that recordfail timeout (https://github.com/elementary/os-patches/pull/186), and we've fixed the issue that's causing update-grub to write config to the wrong place (#196), which is both lines of your workaround in your linked comment.

It's possible that there is yet another cause for this issue, so I'll re-open for now, but this should be solved.

tomaswarynyca commented 3 years ago

If I remove GRUB_RECORDFAIL_TIMEOUT=0 from /etc/default/grub the grub displays 30s I wonder, was it right remove quick-boot-lvm.patch?

davidmhewitt commented 3 years ago

I'm going to close this now as I've confirmed this to be resolved on my own hardware using LVM and secure boot. I don't need to apply any workarounds and the timeout is no longer present after a fresh install with the latest version of our patched grub installed.

LZeugirdor commented 1 year ago

Having this issue with elementary os 7

Kisuke-CZE commented 1 year ago

Probably same issue on all Ubuntu derivates for years. It appears if you are booting with EFIBOOT. Had this issue on ElementaryOS 6, same applies for last 2 versions of Linux Mint.

Solution is by my experience:

sudo sh -c 'echo GRUB_RECORDFAIL_TIMEOUT=0 > /etc/default/grub.d/51_fix_efiboot.cfg';
sudo update-grub

(Solution works until you reinstall. It should survive any package updates.)

Odi-3 commented 1 year ago

So what should we elementary os 7 users do? Should we wait for an update? @davidmhewitt

dmatavel commented 1 year ago

Perhaps the issue should be re-opened since Elementary OS 7 Horus is having the same problem.

Invarianz commented 1 month ago

I'm facing the same issue on Elementary OS 7.1 Horus. The GRUB Timeout Settings do not get reflected in the grub config. I still get 30s of timeout regardless of any changes in /etc/default/grub followed by sudo update-grub.

However, I also changed a kernel parameter via GRUB_CMDLINE_LINUX_DEFAULT and checked after sudo update-grub and a reboot in /proc/cmdline if it was correctly set. I can confirm that this works. So only the TIMEOUT settings seem to be ignored.