Announcement

Collapse
No announcement yet.

Fun with UEFI and dual booting *buntus and maybe a little help?

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

    Fun with UEFI and dual booting *buntus and maybe a little help?

    I have been using Kubuntu 22.02 on my laptop instead of KDEneon for a couple years because I had several issues with Neon back then on this laptop and Kubuntu was more reliable. Today I decided to try and install Neon again because I want to see how Plasma 6 works on this 4k laptop.

    NOTE: I am a total UEFI noob. This laptop is literally my only UEFI computer. It came with Win10 (still has it) and thus must be UEFI.

    One of the issues I had in the past with Neon is it used "ubuntu" as it's EFI folder and therefore overwrote the Kubuntu folder which is also "ubuntu". I noticed a little while back that Neon had "branded" GRUB better and shows up as "KDE neon" in GRUB. So as a test, I installed Neon in a VM with UEFI enabled and sure enough it had created a UEFI folder as "neon" but ALSO created the "ubuntu" folder. Both folders had the same content. So armed with this knowledge - and a backup of the /boot/efi folder - I install KDEneon to the laptop.

    Unsurprisingly, when I rebooted KDEneon booted up. I went into the UEFI menu on the laptop and moved "ubuntu" back to the top and rebooted but it booted back to Neon. I opened /boot/efi/ubuntu and - again unsurprisingly - it had put kdeneon in the ubuntu folder. So I edited the contents of that folder back to point to Kubuntu instead of Neon and Kubuntu booted again.

    Here's the dilemma; KDEneon will not boot from the laptop UEFI menu. It seems although there is a "neon" folder along with the "ubuntu" folder, only the ubuntu folder is being used by the laptop regardless if I select neon or ubuntu in the laptop's UEFI boot menu

    This is not that big of a deal because I can add KDEneon to the GRUB menu even though OS-prober isn't picking up the Neon install at all so I have to write a custom entry for GRUB.

    However, the questions:
    1. Is there a way to get both *buntu installs to be bootable directly from the laptop UEFI menu?
    2. What if I want to add a third *buntu like Kubuntu24.04?
    I should probably explain that both these install reside on the same BTRFS file system as is my habit.
    Last edited by oshunluvr; May 15, 2024, 02:53 PM.

    Please Read Me

    #2
    I should check. I have never had an issue dual-booting neon and *buntu, though it has been a little bit since I have done so with a shared efi directory.
    I don't have any systems with enough space on the main (or only) drive atm to easily test this.

    One can have multiples. But having multiple EFIs on the same disk may not be supported by your EFI firmware (aka the BIOS ).
    Having them on different disks is supported, and normally what I do.
    Which might not be possible on all laptops, of course.

    Yes, there is an Ubuntu directory in there, but that is from Ubuntu's hard-coded setup, but only one file is in there.
    My (poor) memory seems to indicate that this can be copied or moved, or something along those lines, for multi-buntu boots.

    Ooh, maybe some tips here:
    https://forums.linuxmint.com/viewtopic.php?t=411629
    I did not read it all

    Comment


      #3
      The details of how grub does UEFI have varied. My practice for over a decade has been to get grub to work acceptably then leave it for years, not updating grub at all; then, it just works and an update or install doesn't break the boot. The last time (May 2023 says the timestamps) I looked at this closely the Ubuntu grub used EFI/ubuntu/grub.cfg even if the computer had booted from EFI/foo/grubx64.efi. If it still works like that, it would explain your experience; regardless of what you select on the UEFI menu, it still goes to EFI/ubuntu/grub.cfg and wherever that points.

      EFI/ubuntu/grub.cfg is just a stub that points to where the full grub.cfg is. (I now use it to run my manually maintained john_grub.cfg, on a subvolume just for grub independent of any install.)

      For a while, from 16.04 to 18.04 at least, the stub grub.cfg was ignored and the path to the full grub.cfg was baked into the .efi executable. One could see it using strings -10 on the .efi file.

      I think that if you really want the UEFI menu to control the boot, you'll have to use multiple EFI partitions. I have avoided that, preferring a grub menu that I maintain manually. The flakiness of my desktop's UEFI has encouraged this; it multiplies entries, and generates junk entries, and can multiply the junk entries.
      Regards, John Little

      Comment


        #4
        The ESP of the SSD where both my KDE neon and Kubuntu 23.10 test installations are installed (/dev/sda1) looks like this:
        Code:
        root@PC-Kubuntu2404:/mnt/sda1/EFI# ll
        drwxr-xr-x 12 root root 1024 Apr 14 20:57 ./
        drwxr-xr-x  5 root root  512 Jan 1  1970  ../
        drwxr-xr-x  2 root root  512 Apr 30 09:19 BOOT/
        drwxr-xr-x  2 root root  512 Dez 7  2022  debian/
        drwxr-xr-x  2 root root 1024 Apr 28 19:36 fedora/
        drwxr-xr-x  2 root root  512 Nov 30 2022  Garuda/
        drwxr-xr-x  2 root root  512 Dez 6  2022  neon/
        drwxr-xr-x  2 root root  512 Jun 27 2023  opensuse/
        drwxr-xr-x  2 root root  512 Feb 27 2023  tuxedo/
        drwxr-xr-x  2 root root  512 Feb 27 2023  tuxedo-fallback/
        drwxr-xr-x  2 root root  512 Nov 29 2022  ubuntu/
        
        root@PC-Kubuntu2404:/mnt/sda1/EFI# ll neon/
        drwxr-xr-x  2 root root     512 Dez 6  2022  ./
        drwxr-xr-x 12 root root    1024 Apr 14 20:57 ../
        -rwxr-xr-x  1 root root     108 Feb 17 2023  BOOTX64.CSV*
        -rwxr-xr-x  1 root root     126 Feb 17 2023  grub.cfg*
        -rwxr-xr-x  1 root root 2594696 Feb 17 2023  grubx64.efi*
        -rwxr-xr-x  1 root root  860824 Feb 17 2023  mmx64.efi*
        -rwxr-xr-x  1 root root  960472 Feb 17 2023  shimx64.efi*
        
        root@PC-Kubuntu2404:/mnt/sda1/EFI# ll ubuntu/
        drwxr-xr-x  2 root root     512 Nov 29 2022  ./
        drwxr-xr-x 12 root root    1024 Apr 14 20:57 ../
        -rwxr-xr-x  1 root root     108 Feb 26 13:07 BOOTX64.CSV*
        -rwxr-xr-x  1 root root     126 Apr 30 09:17 grub.cfg*
        -rwxr-xr-x  1 root root 2598792 Feb 26 13:07 grubx64.efi*
        -rwxr-xr-x  1 root root  860824 Feb 26 13:07 mmx64.efi*
        -rwxr-xr-x  1 root root  960472 Feb 26 13:07 shimx64.efi*
        It should cause no problems to have KDE neon and Kubuntu 23.10 installed in the same ESP as they name their directories differently…
        But in case of KDE neon this seems to not be true - at least with UEFI boot menus - in contrary to all other systems that name their directories differently!
        In GRUB itself KDE neon is recognized without problems here.


        PS:
        I use GRUB to control the boot (slightly modified by hand and with an additional custom.cfg), but it is in another ESP on an NVMe.
        All other GRUBs of the other 13 or 14 systems on this computer's storage media (a colourful mix of ext4, Btrfs and other file system types) have GRUB_DISABLE_OS_PROBER=true except the one from openSUSE Tumbleweed (my "backup" GRUB).

        PPS:
        If you wanted to boot two *Ubuntus (or Linux Mint and an *Ubuntu) with GRUB and wanted to have both /EFI/ubuntu/ directories separated (and you have two or more NVMes, SSDs or HDDs):
        just put one in the ESP of NVMe # 1 and the other one in the ESP of NVMe # 2 (just double-check their /etc/fstabs)… You could also use two separate ESPs on the same drive to do this, but there always is the risk that your specific UEFI does not support this (you can just try it, if you only have one storage medium, though - it nearly always works, but also have an eye on the /etc/fstabs here).
        In my case I also additionally have Linux Mint and Kubuntu 20.04 LTS on this SSD # 1 - the three (Mint, 20.04 & 23.10) keep overwriting each others/EFI/ubuntu/​ there. I don't care, because this does not matter at all for the GRUB boot loader (currently 24.04's) in my NVMe's ESP…

        By the way: this computer's UEFI also does not recognize KDE neon (and therefore does not list it in the UEFI boot menu - I really wonder why…), nor does it recognize different *Ubuntus or Mint that try to share the same ESP - but it does recognize and list TUXEDO OS 3, though.


        I hope this can help you a little bit to develop ideas.
        Last edited by Schwarzer Kater; May 15, 2024, 05:58 PM. Reason: layout, PS & PPS
        Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
        Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

        get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
        install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

        Comment


          #5
          In the spirit of looking for ideas ...
          this contains 5 ways to dual boot.

          UEFI Simplified, a quicker version
          https://www.kubuntuforums.net/forum/...l=1#post545820

          It does contain some advanced ideas (multiple ESPs, labeling, generalized GRUB2-EFI statement, etc.).

          Caveats, though:
          I wrote it in 2015.
          Written using an ASUS system (motherboard w/its UEFI firmware) -- fully tested everything, though, but only on that restricted system, with ext4.
          Hadn't even thought about Neon or BTRFS file system.
          I haven't looked at this material since then! I can't recall much of this stuff.
          As I've said somewhere before, I have since simplified things at home: 1 computer, 1 disk (SSD), 1 OS!
          Last edited by Qqmike; May 15, 2024, 08:40 PM.
          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

          Comment


            #6
            Thanks guys, for the info and ideas. This is a laptop with only a single drive so no dual-grub installs and dueling (not a mispelling) ESPs doesn't sound like fun, lol.

            I did consider the idea that GRUB itself is redirecting from Neon to Kubuntu. My first thought is to just use a dedicated GRUB install like I do on my desktop machine. I am of the same mind on this as JLittle. My GRUB install on my desktop is Ubuntu server 20.04 stripped down and it hasn't been updated in a year or more. I sometimes boot into it if I need to do a BTRFS roll-back, otherwise it's just a host for the GRUB menu.

            Qqmike - I'm going to read through that post - I vaguely remember you posting that when UEFI was still rather new. In spirit, I want to get at least a basic grip on UEFI because I assume that in the near future "legacy" booting will be just that - a legacy. I guess my concern is overlapping multi-boot distros all using "ubuntu" folders in UEFI and how to deal with that.

            In actual practice, the laptop is for travel (I was on the road 1-2 weeks a month for a decade) and I rarely muck with it. As I said in the OP I just want to be able to try out newer releases on it before jumping to the next distro.

            Schwarzer Kater: my ESP looks the same - except just Windows, ubuntu (Kubuntu), and neon. The file lists are the same and neon/grub.cfg points correctly to /@neon/boot/grub/grub.cfg as it should but it just doesn't boot to neon.

            My gut says (no real evidence) that the *buntu distros all use ubuntu/grub.cfg and the neon folder in the ESP is just there as the source folder from installation. Like Neon installer created the neon folder, then copied it over the ubuntu folder. After the installation, the ubuntu folder had clearly been over-written by the neon installation.

            Please Read Me

            Comment


              #7
              I guess my concern is overlapping multi-boot distros all using "ubuntu" folders in UEFI and how to deal with that.
              And that how-to addresses that issue.
              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

              Comment

              Working...
              X