Moving/Copying EFI partition to end of disk

I see @ in Thunar. Sorry for my ignorance, but what is ls? Linux System?

ESP? The EFI partition where I copied the Garuda EFI to?

Yes and exactly why it cannot be found with os-prober and added to grub :face_with_raised_eyebrow:

Sheila

1 Like

What exactly is the top id? I believe in that other person’s instance it equaled 5, but if that is the partition number, Garuda is 4. Is that what this references? Partition#? EFI is #1.

Sheila

1 Like

ls is the command line equivalent of thunar.
Stands for ‘list’ meaning list files

Like ‘dir’ in DOS

1 Like

I have no idea. Your writer has a language problem

Reading between the lines, it means the partition containing the EFI filsystem

We already knew that

1 Like

Yes.
ESP stands for efi system partition
Same thing as what gparted labels as EFI partition

1 Like

Well, duh. I use that all the time, but I wasn’t thinking in context of terminal commands. So I need to be at command prompt where when I use the ls command, “@” will be listed as one of them. Okay. Got it.

And the symlinks will sit in the /boot/efi (on partition #1) and point back to those subvolumes of partition #4 (Garuda) in @/boot.

Thanks,
Sheila

2 Likes

Sorry, I tend to speak in CLI language
But I do sometimes use Thunar.
Sounds like you have a grasp of the problem now.
You may soon own the only multiboot Garuda on the planet

2 Likes

Okay. After doing something wrong and making MX unbootable, I think I finally got it right. At least it’s the first time “Garuda Linux Bird of Prey” has appeared after update-grub.

myviolinsings@mx--acer:/media/myviolinsings/406d8c92-eb3f-4642-8532-fe14c97261cd
$ sudo ln -s @/boot boot
[sudo] password for myviolinsings:          
myviolinsings@mx--acer:/media/myviolinsings/406d8c92-eb3f-4642-8532-fe14c97261cd
$ sudo ln -s @/etc etc
myviolinsings@mx--acer:/media/myviolinsings/406d8c92-eb3f-4642-8532-fe14c97261cd
$ sudo update-grub
Generating grub configuration file ...
Found theme: /boot/grub/themes/mx_linux/theme.txt
Found linux image: /boot/vmlinuz-6.5.0-1mx-ahs-amd64
Found initrd image: /boot/intel-ucode.img /boot/initrd.img-6.5.0-1mx-ahs-amd64
Found mtest-64.efi image: /boot/uefi-mt/mtest-64.efi
Found Garuda Linux Bird of Prey (Soaring) on /dev/nvme0n1p4
Adding boot menu entry for EFI firmware configuration
done

First I did the same thing above from the MX Linux root (while active). Then I mounted the Garuda partition and navigated to that directory before performing the same symlink creation there. Updated grub and rebooted.

Voila, the 4th menu entry in the MX Linux boot menu was Garuda on nvme0n1p4. I chose it, login screen appeared and I logged in. A moment of breath-holding while the screen stayed pinkish without any windows, etc. But then all my start up app windows appeared with one single error on the desktop:

Could not load QML component.

Had no idea what that meant, but figured maybe something with the look/feel of the Garuda environment?

AI (in Duck Duck Go):
A QML component is a reusable, encapsulated QML type with a well-defined interface, often defined in .qml files. In the context of Garuda Linux, which is an Arch-based distribution, QML components are used within the Qt framework to create user interfaces that are fluid and visually appealing, leveraging the capabilities of Qt Quick for dynamic and animated applications.

Proceeded to update (everything looked the same to me). Although a couple of warnings appeared before updating that I had not seen before:

Starting full system upgrade...
warning: kf6-servicemenus-rootactions: local (1.1.0-5) is newer than chaotic-aur (1.1.0-1)
resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: nvidia-utils will be installed before its mesa dependency
warning: dependency cycle detected:
warning: xdg-desktop-portal-kde will be installed before its plasma-workspace dependency

But the updates completed. Looking at the sys specs Garuda does show that my EFI (the MX one we are using) is 98% full. So I do intend to expand that partition once I move MX to another and upon creating a new one for MX, will leave 256 MiB free at the start to allow that EFI to expand to 512 MB.

One of the tools I like in Garuda is the diagnostic data “logs” I can access easily. Pacman used os-prober and detected MX 23.4 Libretto on its partition and added boot menu entry. Was a bit worried about that because I did not know if running that from Garuda, it would take back over my grub menu.

I did find that this partition is almost full as well. The culprit is all of my backup images. Those “btrfs snapshots” are about 20 GB ea. At 89% full, I will have to give some of that unused partition back to Garuda.

After updates/reboot, MX Linux still came up with Garuda as a boot option. So this did work. Now for the hard part. The restructuring of all my partitions to ensure none are near full and that EFI has twice the space.

The first thing is to “shrink” MX back to about 90% full so that I have space to “move/copy” it to another partition. Then I can delete the current MX partition in order to leave the space at the beginning and give it to EFI by expanding it. That smaller partition will then have to house Garuda as it needs less space than MX. Finally, I will ensure MX has about half the 1 TB drive.

Then I will need to start all over since my 5 TB ext HDD I use for all computer CZ images/home backups as well as my CD library and computer games, is also almost full on the Linux partition of 2 TB.

I will be spending the next week or so trimming that one down and probably have to do the same thing with that drive by shrinking the NTFS partition of 3 TB so that I can gain it on the Linux side.

Thanks,
Sheila

1 Like

Well apparently this is not as easy as I thought. I moved MX to my ext SSD; tried copying the EFI partition to a separate partition I made on that SSD (fat32) but got errors in trying to copy it to a larger partition. Gparted said to use check to enlarge the EFI partition to use the entire partition, but it did not succeed. Well, I had no plans to do anything with the EFI other than enlarge, so continued.

But Even though I have the 256 MB empty partition ahead of it, Gparted does not allow me to expand EFI to that space.

Is there something different about expanding an EFI or FAT32 partition as what I did with MX is not working in this case.

Thanks
Sheila

1 Like

I think expanding a partition forwards is tricky.
You might need to move the partition forwards into empty space, then expand it backwards.

Back it up, you dont want to lose all that great work getting garuda to boot.

When you move MX, to external disk, check its UUID when you put it back. It may not boot if the UUID of ‘/’ has changed. Fix it by editing /etc/fstab and redoing update-grub ( because the uuid is in grub.cfg as well as in fstab)

1 Like

When I grew MX at the start of this adventure, it was simple. I simply deleted the partion to the right (it was empty) and then resized and it worked. But it was ext4. Just wondered if EFI is recognized by GParted as something special and so it will not do it. I tried again by dragging the slider to expand but it still came back with the triangle exclamation mark. It currently says Size 511 MB; USED 4.5 MB; Unused 251.5 MB.

I copied the Garuda to part 5, which was about 130 GB larger and also unused. I have not deleted the Garuda on part 4 yet. I am going to reboot and see if my EFI is now messed up. I may have to restore that partition.

And I had already thought about the fstab and update grub as the UUIDs are gonna change. First, let’s deal with the EFI as it makes me nervous being 98% used.

Sheila

1 Like

Yes, EFI is messed up. Got Grub “e”. Booted live session and got boot rescue and EFI Bootloader options:

With all of those “@” am I looking at only Garuda?

Sheila

1 Like

You might have to make a new larger fat32 partition and copy the filestystem to it.
I dont understand why it would not expand in gparted.
I always do it with the menu, not drag and drop, but I have never tried it on an ESP fat32 partition.
There is something about expanding to the left (forward)… cant remember what exactly, but it needs to move the filesystem to do that, whereas expanding to the right only has to add unused space.

1 Like

That’s the weird part. If it is saying its size is now 511, it DID resize, but it is still messed up or I would not have had the non-booting issue.

I had read here that you cannot do it with GParted (EFI that is). Have to basically back it up; delete & recreate.

So now the question is, the best way to get my latest EFI back. I’m afraid I have to get it back to same size in order to copy the original one back as that is where the issue began, trying to paste a smaller EFI into a larger partition in Gparted.

What do you think of the MX options I screenshot? Should I choose one of them or just use a live session and chroot into my MX root?

Thanks,
Sheila

2 Likes

Whoa! I chose the hd2 (which I knew was that external SSD) and it booted to my MX. Guess when I copied that EFI partition over to it, it did work.

Now I have to figure out how to get this EFI back on the internal FAT32 partition.

Sheila

1 Like

That is the EFI bootloader, not grub
I would be going to the BIOS and see if you can choose some other boot choice and get a grub menu…look at the boot menu in the bios

No harm trying one of those menu items

1 Like

I know. I couldn’t get to grub from just normal boot, so went to live MX session from USB and found the Boot Rescue, which had “choose an EFI” menu and it scanned for EFI on my internal drive and my external SSD.

As for BIOS, I ONLY have MX, USB or External SSD; if I choose MX, I get:

Sheila

1 Like

I dont uinderstand… there shoukd be an entry that will start grub … I guess that is because the ESP really is damaged and the bios cant find grub.

Ok , it looks like you do have to restore the ESP.
Why not make a new larger than 512 partition, and restore it to that? CZ will restore to a larger partition.

1 Like

Well according to GParted, I already made it 511 MB. So should I use GParted to copy from my working ext SSD EFI to the EFI partition on internal drive? Or should I use CLI?

Thanks,
Sheila

Oops, just noticed you said CZ. If I need CZ, I will need to create the image off the ext SSD and then use CZ to restore to that partition? I will try.

Sheila

1 Like

I have never used it before, but can I use device to device to put the SSD EFI partition onto the internal EFI partition? Or do I need to just make an image of it in CZ and then restore to the internal partition?

Sheila

1 Like