Results 1 to 7 of 7

Thread: Change which grub controls booting

  1. #1
    Join Date
    Jul 2006
    Beans
    32

    Change which grub controls booting

    I added another Mint distro to a computer that was set up for Linux and windows already. My problem is that I want to use the original linux distro. I was able to change config in the controlling grub to boot the last successful boot but I would prefer to use everything from the distro that I am using. I dont want to reinstall the whole thing but can I just reinstall grub or at least change its configuration. I downloaded boot-repair but I am hesitant to use it until I know for sure that it wont wreck the whole thing.
    Any advice?

    Is it within the realm of possibility to run Ubiquity from the point only where Grub is installed? That always works flawlessly when I install a distro. Basically I want everything left alone except that I want to reinstall grub.
    Last edited by howefield; March 20th, 2021 at 05:09 PM. Reason: posts merged.

  2. #2
    Join Date
    May 2008
    Beans
    3,985
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Change which grub controls booting

    Quote Originally Posted by bwgolling View Post
    My problem is that I want to use the original linux distro.
    What is this distro?

  3. #3
    Join Date
    Jul 2006
    Beans
    32

    Re: Change which grub controls booting

    Sorry. Both are linux mint. just different de's

  4. #4
    Join Date
    Oct 2006
    Beans
    58,286

    Re: Change which grub controls booting

    Thread moved to the "MINT" forum.

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

    Re: Change which grub controls booting

    I think Mint uses Ubuntu as boot entry, not a unique entry in UEFI or ESP - efi system partition.

    I have reinstalled grub from main working install, but now just manually edit /EFI/ubuntu/grub.cfg.
    Ubuntu sets mount of ESP in fstab with umask=0077 which prevents editing. You can use live installer or edit fstab with defaults & reboot.
    I often change to defaults, but that may leave me open to security issues.
    Code:
    fred@z170-focal-k:~$ cat /boot/efi/EFI/ubuntu/grub.cfg 
    search.fs_uuid 54029c4f-0cbe-413e-80ce-78a4995b0551 root  
    set prefix=($root)'/boot/grub' 
    configfile $prefix/grub.cfg
    


    You can see what UUID to use with blkid or this:
    lsblk -o name,mountpoint,label,size,fstype,uuid,partuuid | egrep -v "^loop"

    If you have two drives with an ESP on second drive:
    I often install to a second drive and put the test install's UEFI entry into ESP on that drive, keeping my main working install's ESP unchanged, so I do not have to edit it.

    Posted work around to manually unmount & mount correct ESP during install #23 & #26
    https://bugs.launchpad.net/ubuntu/+s...y/+bug/1396379
    Others suggest disconnecting all other drives physically or logically in UEFI settings, so install drive is first drive.
    Or removing boot flag/esp flag from first drive, so only ESP is install drive. (I have not had that work, but others have.)
    Or if you have ESP on second or external drive, you can just reinstall grub, either manually or using Boot-Repair's advanced mode & full reinstall of grub to correct drive.

    I also like to turn off os-prober and only have the boot entries I want in 40_custom.
    How to: Create a Customized GRUB2 Screen that is Maintenance Free.- Cavsfan
    https://help.ubuntu.com/community/Ma...tomGrub2Screen
    https://www.gnu.org/software/grub/ma...-manual-config
    https://help.ubuntu.com/community/Grub2/CustomMenus
    http://ubuntuforums.org/showthread.php?t=2076205

    Last edited by oldfred; March 20th, 2021 at 05:19 PM.
    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.

  6. #6
    Join Date
    Jul 2006
    Beans
    32

    Re: Change which grub controls booting

    Thanks very much for the help. I think I can see what's up. Before I try though I think i will do some studying of grub docs. I'm tired of getting into this mess and having to stumble my way out of it.
    Your advice is very good and already gives me some understanding.
    Bruce

  7. #7
    Join Date
    Jun 2014
    Beans
    7,383

    Re: Change which grub controls booting

    The second install of Mint overwrote the grub files in the EFI partition from the first install because the directory created there is named "ubuntu". Same with other major derivatives of Ubuntu As stated above, the simplest solution is for you to use the blkid command to get the correct UUID of the drive/partition of the Mint you want booting and then as root (using sudo) mount the efi partition and replacee the current UUID in the grub.cfg file with the correct one. Oldfred showed you an example of the file, very simple to do.

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
  •