Announcement

Collapse
No announcement yet.

Dual booting *buntu EFI installs???

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Dual booting *buntu EFI installs???

    How does one configure dual booting when Ubuntu, Kubuntu, and who knows how many other flavors use "ubuntu" in the EFI directory for booting? Thanks goodness KDEneon finally moved away from using "ubuntu" in /efi

    p.s. I still haven't moved away from legacy grub bios booting...

    Please Read Me

    #2
    I have Kubuntu 24.04, 24.10, Deepin 23 and MX 23 installed over 2 NVMe's. The PC setup will detect all entries in the EFI directories in both NVME's and give you a choice from which to boot first. In my case Kubuntu 24.04 which will then be the default when you turn on the PC. The Kubuntu grub will display all the installed entries from which to choose
    Last edited by GerardV; Yesterday, 06:15 PM.
    sigpic

    Comment


      #3
      Neon definitely does use/have that /ubuntu/ dir. It is hard coded into Ubuntu's grub packaging and configuration
      However, take a look inside and see what it's boot.cfg references. It should point to neon's /boot/grub/
      Here is mine:
      Code:
      search.fs_uuid 63a67de9-25de-489a-b2d5-911658a1989e root
      set prefix=($root)'/@/boot/grub'
      configfile $prefix/grub.cfg
      Note that the grub.cfg in /boot/efi/EFI/ubuntu/ is identical to the one in /boot/efi/EFI/neon/
      I have no clue as to why or what it means, but all ubuntu based variants do the same thing neon does, while all official Flavours share the same layout/configuration.

      ​All of neon's actual boot loader is in /boot/efi/EFI/neon/ dir. Other ubuntu-based distros do the same, unless they build their own grub packaging. I don't think any do.



      Here is a fairly good description of the Ubuntu setup:
      https://askubuntu.com/questions/1512...ed-on-the-same
      A salient point it makes:
      Most Linux distros nowadays are shipped with the GRUB bootloader. Technically, GRUB is also a boot manager (i.e. it can show a menu of options to the user when the computer starts).
      Basically, with multiple Ubuntu Flavours installed, and using the same EFI partition, it is basically the same as an MBR setup: The Last Ubuntu Installed takes over grub duties, since they are all using the same exact directory and file structure. Anyone using the old skool MBR setup is probably familiar with this.


      Now, with EFI, you can get around this by simply using multiple EFI partitions. You can have them on different drives, and even multiples on the same drive, as I understand it. Never done so myself, and Windows probably doesn't like it.

      With dual drive setups, I use a separate EFI on each when dual booting, as it gives me a completely separate set of boot loader locations for fallback purposes. You just choose which one via your board's boot menu hotkey, or by setting your preferred boot order in the EFI firmware (aka BIOS) settings.


      Clear as mud?

      fwiw, things are similar with other distros with different 'spins', like Fedora if using grub iirc.
      I am not sure if the new-ish systemd-boot (instead of grub) can also 'solve" this, but I haven't looked into that. Too much hackery, even for me.
      Last edited by claydoh; Yesterday, 08:49 PM.

      Comment


      • oshunluvr
        oshunluvr commented
        Editing a comment
        I have not had trouble dual booting Neon and (K)ubuntu so the /ubuntu folder does not seem to have a negative impact. Try to dual boot Kubuntu and Ubuntu is a different matter.

      #4
      Originally posted by claydoh View Post


      Now, with EFI, you can get around this by simply using multiple EFI partitions. You can have them on different drives, and even multiples on the same drive, as I understand it. Never done so myself, and Windows probably doesn't like it.


      .
      And i have read of instances where Windows modified the EFI partition after an update and wipes all other entries in that partition. So if you want to dual boot with Windows i would recommend too, to use a different drive.

      sigpic

      Comment


        #5
        From various posts, it does seem Windows may complicate things. I'm not sure because I haven't tested anything with Windows. (I don't have a copy of any Windows anymore, although once was an XP (quasi-)expert.).

        I don't know about all this. At one time, I ran bunches of Linux tests for dual-booting. It all worked!
        But I have seen posts indicating that some people are having varying results trying to dual boot Ubuntu's.
        Maybe it's their UEFI behaving peculiarly or not cooperating at all? Maybe their level of competence in setting things up? Maybe Windows goofs everything up?
        It's detailed stuff. I have been left feeling that it's best to use 1 operating system per computer!! 😅

        FWIW, Here's my last quick version:
        https://www.kubuntuforums.net/forum/...820#post545820

        ======================
        I used 5 methods for dual-booting, summarized in the Cheat Sheet as follows:

        Dual-booting Kubuntu: A summary of 5 options
        3 facts:
        (1) GRUB from the last installed OS will take over the booting show.
        (2) All Ubuntu-based distributions use the (same) directory name ubuntu in the ESP: /boot/efi/EFI/ubuntu; the last installed OS will overwrite previous /EFI/ubuntu contents. Other non-Ubuntu OSs have their own /EFI subdirectory.
        (3) The last-installed OS or installed boot manager becomes first in UEFI BootOrder.
        --> Fix this using either efibootmgr -o; or if GRUB, using sudo grub-install (and sudo update-grub).

        5 methods for dual booting:
        #1, #2, #3, do nothing special:
        (1) Use rEFInd. (2) Use GRUB2-EFI. (3) Use the UEFI firmware.
        Or, try #4 or #5:

        (4) Ubuntu-based OSs: set up separate subdirectories of EFI: /boot/efi/EFI/<some_ubuntu_distribution>
        Set up the dual-boot: Both LinuxX and LinuxY are Ubuntu derivatives, using the same ESP.
        Disable Secure Boot in firmware. Install LinuxX, boot into it, then:
        Code:
        sudo grub-install --bootloader-id=<some_name_for_LinuxX> --no-uefi-secure-boot
        Repeat with LinuxY. Optional: adjust BootOrder and generate new boot menus.

        (5) Separate ESPs:
        GParted: set up the ESPs and the OS partitions you need, give each ESP a label you will recognize. Install each OS, in sequence, with this procedure: Turn off all ESPs (turn off their boot flags) except for the ESP you wish to be used by the OS you are about to install now. Install the OS using the Manual installation method. Repeat for each OS. Then turn on all ESPs (re-set their boot flags in GParted).​
        ======================

        At the level of the NVRAM variables in UEFI lists, there is a matter of labels that one can play with.
        Copied from that how-to:

        Labels: Setting (and "changing") labels for UEFI Boot variables--useful for multiple "ubuntu" OSs

        Fact: You can't edit or modify an existing boot entry. Instead, you must CREATE a new boot variable labeled whatever you wish. Then, if you wish, you can delete the old boot variable.
        The setup: The UEFI boot variable BootXXXX uses ESP sdxn and the boot-loader file /EFI/<directory_current>/<boot_loader>. Goal: Change the label to NewLabel.
        Solution
        To create a new boot variable having the label NewLabel and pointing at the same ESP sdxn and same bootloader: /EFI/<directory_current>/<boot_loader>, boot (in UEFI mode) the OS (represented by BootXXXX). Issue the command:
        Code:
        sudo efibootmgr -c -d /dev/sdx -p n -L NewLabel -l \\EFI\\<directory_current>\\<boot_loader>
        (This registers in UEFI firmware a NVRAM variable with Label L = NewLabel.)

        To delete the old boot variable (having the old label):
        Code:
        sudo efibootmgr -b XXXX -B
        --> This deletes only the listing of the variable in UEFI firmware. It does not delete anything in the ESP or in the Linux filesystem. The output of efibootmgr -v is identical for both the old and the new boot variables: they point at the same /EFI/<directory_current>/<boot_loader>.
        Updating GRUB2-EFI: Getting an update to GRUB or running sudo grub-install (which updates <boot_loader>) in this OS will not break either the new or the old boot variable.​
        ======================

        I don't do this stuff anymore! If I ever did again dual boot, it would be with just two Linux OSs, even two Ubuntu's,
        and for that small configuration, almost any method would work.
        (Translation: You could learn to cope with it without too much stress.)
        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #6
          Originally posted by Qqmike View Post
          But I have seen posts indicating that some people are having varying results trying to dual boot Ubuntu's.
          Really, is isn't a problem per se, it is just that installing multiple Flavours ends up with the last installed one overwriting the files in /boot/efi, opposed to having individual boot loaders, as would be expected if they were two different distros.

          Now, on a multi disk setup, with multiple efi partitions, what I think happens for some is that the Ubuntu#2 install is successful. BUT their boot order is still set to boot Ubuntu#1, which has zero knowledge of the new OS install. So they don't see the new Ubuntu#2 in its grub menu. Similar things could happen back in the olden MBR tymes, where you had your main Grub on the MBR, and your other distros with grub installed to a partition. And you forget where you were

          To add to this, since Grub now recommends not having the os_prober enabled after the initial OS install, updating Grub on Ubuntu#1 never detects the new Ubuntu#2
          And users might have no idea that there are even multiple boot loaders involved, let alone no os-prober action, or that there is even a hardware boot menu to use to get do a different OS.

          Comment


            #7
            claydoh
            And you forget where you were
            I think that hits the nail on the head. In general, with the Ubuntu's people don't know where they are or where they were!
            Running efibootmgr, you get multiple listings of "ubuntu," which doesn't help (unless you don't mind deciphering the GUIDs/UUIDs).
            That's where the business of "labeling" comes into play, that I mentioned in the how-to, but that takes some effort and focus.
            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #8
              Funny thing is I do have a Windows install on my PC and it's UEFI lol. My BIOS lets me boot either EFI or Legacy mode. I only installed it to try and run a NVME firmware update that came packaged for Windows. I've only booted it twice. Of course the P.O.S. firmware updater didn't work. TIP: Don't buy Adata products.

              Claydoh's and Qqmike's posts do a could job validating my complaint. Could it be more complicated? It's almost like we finally got GRUB working well and the uber-nerds decided we can't have it that easy. That's why I haven't switched to UEFI. Why? Full disclosure, I stuck with LILO for a couple years after GRUB came out, LOL. Maybe it's me

              Please Read Me

              Comment

              Working...
              X