Results 1 to 5 of 5

Thread: Enable a particular OS to update-grub

  1. #1
    Join Date
    Nov 2006
    Beans
    73

    Enable a particular OS to update-grub

    I have my laptop set up for UEFI boot, and it is partitioned like this:

    1. /dev/sda1 efi (Mounted as /boot/efi)
    2. /dev/sda2 ext4 (UbuntuUnity 22.04)
    3. /dev/sda3 ext4 (Ubuntu 20.04)
    4. /dev/sda4 swap
    5. /dev/sda5 ext4 (Mounted as /home)


    Both Ubuntu versions mount partitions 1 and 5 as shown in the list.

    If I am running the OS on partition 2 and run update-grub after making changes to /etc/default/grub, then the next time I reboot the machine I see my changes in the boot menu as expected. But if I run the OS on partition 3 (which was installed before the other) and make any such changes, they have no effect at all on the actual boot process.

    Since the version on partition 3 is my "default" system at the moment, is there some way for me to enable it, rather than the other OS, to make changes to the grub boot menu?
    Last edited by DavidS; June 12th, 2023 at 04:50 PM.

  2. #2
    Join Date
    May 2008
    Beans
    4,132
    Distro
    Ubuntu 24.04 Noble Numbat

    Re: Enable a particular OS to update-grub

    It looks like Ubuntu 22.04 on /dev/sda2 is controlling grub at the moment.

    Boot into Ubuntu 20.04 on /dev/sda3
    Open a terminal and enter:-
    Code:
    sudo grub-install /dev/sda
    Code:
    sudo update-grub
    If there are errors in the terminal output, please post the command and output within code tags.
    If no errors, reboot and see if your preferred grub menu appears.

  3. #3
    Join Date
    Nov 2006
    Beans
    73

    Re: Enable a particular OS to update-grub

    Thank you so much for that answer. I now have my system set up as I want it!

  4. #4
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Enable a particular OS to update-grub

    Note that a major update to grub, will reinstall it.
    So if 22.04 gets update, you may just have to redo the update in 20,04, if you still want it as the default.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  5. #5
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    14,233
    Distro
    Xubuntu 24.04 Noble Numbat

    Re: Enable a particular OS to update-grub

    DavidS; Hey --

    I too multi-boot 'buntus and my final solution to controlling grub is to disable /etc/grub.d/30_os-prober in my secondary systems; such then only my primary system controls booting.

    but --- more than one way
    THE current(cy) in Documentation:
    https://help.ubuntu.com/community/PopularPages

    Happy ubuntu'n !

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •