Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32

Thread: Ugh, grub, boot-repair, and using multiple OS's.

  1. #1
    aeronutt is offline Grande Half-n-Half Cinnamon Ubuntu
    Join Date
    Feb 2009
    Location
    Central MD
    Beans
    853

    Question Ugh, grub, boot-repair, and using multiple OS's.

    Something is amiss. Depending on where or how I look, where I run update-grub, or how I run boot-repair, I get different 'information' and defaults.

    But I know the following has happened...

    I have multiple partitions with multiple OS's (currently, all Ubuntu based) on an SSD.
    Let's call the disk nvme, and the partitions nvme_p[1-6].

    a) If I load a new OS, the default location for grub is nvme, and that's what I select.
    b) If I run boot-repair, it does not allow me to place grub in nvme, rather it wants me to place it in nvme_p1, the /boot/efi partition, and I'VE DONE THAT ALSO.

    So, I've done BOTH (a) & (b). Which is likely the root of my problem.

    How do I fix this? How do I get boot-repair to load grub where all the other OS's load grub when I install an OS?

  2. #2
    Join Date
    Nov 2018
    Location
    Lucknow, India
    Beans
    90
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Ugh, grub, boot-repair, and using multiple OS's.

    Hi,

    Here is a post from Oldfred which may help you.

    https://ubuntuforums.org/showthread.php?t=2147295

    In one post he suggested not to use auto repair, rather asked a few details from the logs.

    Please attach link to the summary report, the auto fix sometimes can create more issues.
    https://help.ubuntu.com/community/Boot-Repair

    You can run this script with terminal & post its output to pastebin site. It is part of Boot-Repair's report, but Boot-Repair shows a lot more info.
    Updated fork as original bootinfoscript does not seem to be maintained
    https://github.com/arvidjaar/bootinfoscript
    Copy pasted from his post.

    Regards,
    Mitesh

  3. #3
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,739

    Re: Ugh, grub, boot-repair, and using multiple OS's.

    The Ubuntu installer (not used by Lubuntu) installs grub to the efi system partition (nvme_p1) even though the selector on the partitioning page defaults to a drive name (which in you case I assume is nvme). You cannot select where grub files are installed - that option is disabled.

    paragraph (b) should produce the same result.
    Last edited by Dennis N; November 10th, 2018 at 03:53 AM.

  4. #4
    aeronutt is offline Grande Half-n-Half Cinnamon Ubuntu
    Join Date
    Feb 2009
    Location
    Central MD
    Beans
    853

    Re: Ugh, grub, boot-repair, and using multiple OS's.

    ^ Thanks, so that's important to know!

    So, I ran boot-repair. Apparently successfully as I see all the OS's when the grub menu pops up, and am able to boot and log in (I haven't logged in to all the OS's yet). But.

    Here's the oddity. If I hit F12 while booting, I get a list of OS's that I haven't had loaded in 6 months or more. Fedora, and Neon. And those do NOT show up in the grub menu.

    https://i.imgur.com/HpVFy8Z.jpg
    Last edited by ajgreeny; November 10th, 2018 at 03:24 PM. Reason: Large image removed, link to replace.

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

    Re: Ugh, grub, boot-repair, and using multiple OS's.

    Please do not post screenshots or photos in line. Not everyone has highspeed Internet.
    You can easily attach screenshots with Forum's advanced Editor and paperclip icon.

    If you use the Forum's advanced editor, you can use the paperclip icon to attach screenshots. Post #4 1024x768 if photo
    http://ubuntuforums.org/showthread.p...8#post12229098

    UEFI remembers old installs. It only erases entries if you disconnect drive.
    You can use efibootmgr to manage UEFI boot entires or your UEFI.
    See also
    man efibootmgr

    Some entries like Windows UEFI may add back in when you reconnect a drive by looking at all the /EFI/xxxx folders in the ESP.

    Boot-Repair's report does not show all the details on NVMe drives. It uses bootinfoscript as first part of report & it does not yet include NVMe drives.
    Support NVMe and MMC devices bug oldfred request
    https://github.com/arvidjaar/bootinfoscript/issues
    I do not have NVMe drive & author needs someone to test changes to bootinfoscript with NVMe drive.

    See also post #2 above.
    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
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,739

    Re: Ugh, grub, boot-repair, and using multiple OS's.

    You probably already know all this, but here's what goes on:

    Each OS creates a different grub menu (from the other OSes) when you run sudo update-grub from it. Each OS puts itself first, then looks around for other OS to add entries for after that.

    Which grub menu appears when you boot the computer depends on the UEFI boot order*. The OS which is first in the UEFI boot order is the one whose grub menu you get on startup.

    *the command sudo efibootmgr run from the terminal will reveal the UEFI boot order. Normally, the last OS installed is first. But, you can use the efibootmgr command with -o option to change the order.

  7. #7
    aeronutt is offline Grande Half-n-Half Cinnamon Ubuntu
    Join Date
    Feb 2009
    Location
    Central MD
    Beans
    853

    Re: Ugh, grub, boot-repair, and using multiple OS's.

    ahhh....efibootmgr, something I was not aware of, thanks!

    So, everytime I think I kinda know what grub does, I prove myself wrong.

    Is there a layman's description of how grub manages multiple OS's, and what happens when one runs update-grub from 2 different OS's?

    I need pictures! lol

    Thanks for the help.

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

    Re: Ugh, grub, boot-repair, and using multiple OS's.

    Do not have pictures, but I currently have 4 or 5 Ubuntu installs, but have not finished Disco since they fixed installer.

    Each wants to update, but I maintain one as main working install, backup ESP, so I can restore it when one of my other installs changes it.
    On main working install I turn off os-prober and add my own entries in 40_custom, otherwise the update-grub takes a while to scan all the installs.

    There is a way to install without grub, have not tried it recently, but then you have to add entry to working version of grub in another install, either os-prober with sudo update-grub or manually in 40_custom.

    If you do not want grub installed from live installer:
    sudo ubiquity -b
    http://askubuntu.com/questions/83845.../838527#838527

    UEFI version of grub runs efibootmgr and adds a new entry and makes it first in boot order.

    I have tried renaming my install in /etc/default/grub and grub does create new folder in ESP, new entry in UEFI. But something in grub/shim file is hard coded to use /EFI/ubuntu/grub.cfg, so only that file is actually used for booting.

    UEFI uses GUID of your ESP - efi system partition, both of these entries really boot main install since it uses /EFI/ubuntu/grub.cfg.
    Code:
    fred@Bionic-Z170N:~$ sudo efibootmgr -v
    [sudo] password for fred: 
    BootCurrent: 0001
    Timeout: 1 seconds
    BootOrder: 0001,0000,0014,0015,0013
    Boot0000* ubuntu    HD(1,GPT,c371fe4e-a6db-4c46-b056-a4eea609f81d,0x800,0x639c000)/File(\EFI\UBUNTU\SHIMX64.EFI)
    Boot0001* bionic_18_04    HD(1,GPT,c371fe4e-a6db-4c46-b056-a4eea609f81d,0x800,0x639c000)/File(\EFI\BIONIC_18_04\SHIMX64.EFI)
    This uses UUID of you install. Rather trhan reinstall grub from main working install on sda (hd0), I just edited it to have correct UUID, drive & partition.
    Code:
    fred@Bionic-Z170N:~$ cat /boot/efi/EFI/ubuntu/grub.cfg
    #search.fs_uuid 75f5141c-8bab-4168-8855-4bf000406680 root hd1,gpt5 
    search.fs_uuid c29fc361-ea05-420b-b919-850aeef65dd4 root hd0,gpt4
    set prefix=($root)'/boot/grub'
    configfile $prefix/grub.cfg
    Last edited by oldfred; November 10th, 2018 at 04:13 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.

  9. #9
    aeronutt is offline Grande Half-n-Half Cinnamon Ubuntu
    Join Date
    Feb 2009
    Location
    Central MD
    Beans
    853

    Re: Ugh, grub, boot-repair, and using multiple OS's.

    Quote Originally Posted by oldfred View Post
    ...
    If you do not want grub installed from live installer:
    sudo ubiquity -b
    http://askubuntu.com/questions/83845.../838527#838527
    ...
    !!!!! THIS is what I've been looking for. I have not been happy since they removed the 'advanced' options from the live installer GUI that allowed you to install without (re)loading grub. Didn't know I could launch with that option turned off. I'll definitely try this next time, it's the way I prefer.

    Thanks!!!

  10. #10
    aeronutt is offline Grande Half-n-Half Cinnamon Ubuntu
    Join Date
    Feb 2009
    Location
    Central MD
    Beans
    853

    Re: Ugh, grub, boot-repair, and using multiple OS's.

    So, I have a followup question...

    I have 2 disks. One is now all data (it USED to have OS's on it), and the other disk is 5 partitions of EFI + OS's.

    I just installed another "test" OS on one of the partitions of my OS disk.

    And low and behold, EFI bootmanager yet again seemed to look at my data disk, see that it at one time LONG ago had Fedora on it, and put it FIRST in line to boot from. Ug.

    Is there any way to permanently "remove" the fact that my data disk at one time had (several) OS's loaded on it? Is there some flag, or sector on my data disk that has this 'history'?
    (I had recently run efibootmgr and deleted "fedora" from the list, but it has not popped back up.)

Page 1 of 4 123 ... LastLast

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
  •