Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running "sudo update-grub" in terminal seems to run twice #749

Open
vjr opened this issue Feb 11, 2025 · 2 comments
Open

Running "sudo update-grub" in terminal seems to run twice #749

vjr opened this issue Feb 11, 2025 · 2 comments

Comments

@vjr
Copy link
Member

vjr commented Feb 11, 2025

What Happened?

I usually run sudo apt update then sudo apt full-upgrade (and also flatpak update) in the terminal instead of (please don't judge me) looking in the about plug or appcenter.

Whenever there's a kernel update I noticed the part where it processes /etc/default/grub seems to run twice. I can repro this by just doing sudo update-grub which causes it to seem to run twice with output such as the following:

vishal@blackbird:~$ sudo update-grub
[sudo] password for vishal: 
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found theme: /boot/grub/themes/whitesur/theme.txt
Found background image: /boot/grub/themes/whitesur/background.jpg
Found linux image: /boot/vmlinuz-6.8.0-53-generic
Found initrd image: /boot/initrd.img-6.8.0-53-generic
Found linux image: /boot/vmlinuz-6.8.0-52-generic
Found initrd image: /boot/initrd.img-6.8.0-52-generic
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found theme: /boot/grub/themes/whitesur/theme.txt
Found background image: /boot/grub/themes/whitesur/background.jpg
Found linux image: /boot/vmlinuz-6.8.0-53-generic
Found initrd image: /boot/initrd.img-6.8.0-53-generic
Found linux image: /boot/vmlinuz-6.8.0-52-generic
Found initrd image: /boot/initrd.img-6.8.0-52-generic
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
vishal@blackbird:~$

I have multiple OS installations in a "penta-boot" including Windows and the above was run with temporarily setting GRUB_DISABLE_OS_PROBER=true in /etc/default/grub if this is relevant to the issue. Here is the output of sudo update-grub with the option set to false just FYI but the issue occurs with the flag set to true as shown above:

vishal@blackbird:~$ sudo update-grub
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found theme: /boot/grub/themes/whitesur/theme.txt
Found background image: /boot/grub/themes/whitesur/background.jpg
Found linux image: /boot/vmlinuz-6.8.0-53-generic
Found initrd image: /boot/initrd.img-6.8.0-53-generic
Found linux image: /boot/vmlinuz-6.8.0-52-generic
Found initrd image: /boot/initrd.img-6.8.0-52-generic
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/nvme0n1p1@/efi/Microsoft/Boot/bootmgfw.efi
Found KDE neon User Edition (24.04) on /dev/nvme0n1p7
Found openSUSE Tumbleweed on /dev/nvme0n1p8
Found Debian GNU/Linux trixie/sid on /dev/nvme0n1p9
done
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found theme: /boot/grub/themes/whitesur/theme.txt
Found background image: /boot/grub/themes/whitesur/background.jpg
Found linux image: /boot/vmlinuz-6.8.0-53-generic
Found initrd image: /boot/initrd.img-6.8.0-53-generic
Found linux image: /boot/vmlinuz-6.8.0-52-generic
Found initrd image: /boot/initrd.img-6.8.0-52-generic
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/nvme0n1p1@/efi/Microsoft/Boot/bootmgfw.efi
Found KDE neon User Edition (24.04) on /dev/nvme0n1p7
Found openSUSE Tumbleweed on /dev/nvme0n1p8
Found Debian GNU/Linux trixie/sid on /dev/nvme0n1p9
done
vishal@blackbird:~$

Steps to Reproduce

  1. Run sudo update-grub in the terminal.
  2. Observe Sourcing file '/etc/default/grub' happening twice.

Expected Behavior

Should appear to run (print the Sourcing file '/etc/default/grub' and related output) only once.

Host OS

elementary OS 8 (Circe) daily.

Image Version

elementary OS 8 daily running on bare metal as the main OS with other OS's installed alongside.

Hardware Platform

64-bit AMD/Intel (x86)

Log Output

Hardware Info

No response

Contents of /etc/default/grub

etc_default_grub.txt

@vjr
Copy link
Member Author

vjr commented Feb 11, 2025

IIRC this also occurs on a fresh stock install of OS8 stable or daily.

@vjr
Copy link
Member Author

vjr commented Feb 11, 2025

Edited the main issue description to attached my /etc/default/grub file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant