How to recover my partition please help

I by mistake deleted one sub partition of my endevour OS Disk and I lost boot capabilities and I am not sure if I deleted the System or what happened but I still can see my endevourOS partiton in my gparted


I tried adding the flag boot but I didn’t work, right now I am booting from USB

It looks like you deleted your EFI partition.

That is fixable.

You need to recreate the partition, chroot into the install and reinstall the bootloader.

1 Like

Ok, thanks!!, could you tell me some big step by step on this? So I can try googling the little things i need to do?, thank you very much for the answer I was ready having a breakdown

I am not in a spot to do that right now but hopefully someone else will come along soon to provide detailed instructions. I mostly responded just to let you know that all was not lost. :slight_smile:

I would wait for someone to guide you because you don’t want to make things worse by doing it wrong.

In the meantime, do you know if you were using grub or systemd-boot?

I always use systemD-boot as it is the recomemnded one during installation, and thanks

Right now things are okay because gparted shows the 1 GB unallocated space that you will use to create the efi partition. So just don’t mess with it until @dalto or someone else gives you the correct instructions. I’m not very well versed with systemd-boot so i don’t want to give you bad information and cause any issues since i know this is easily repairable. Maybe @pebcak is around? He’s very good at this. :wink:

Thanks a lot, I will wait for the help, I have another bootable OS for now, but the one lost is my main one

Hi!, sorry to bother could you help me on this?

Would be like this:

  1. boot into Live ISO
  2. recreate the efi partition using fat32 flag as boot
  3. follow: https://discovery.endeavouros.com/system-rescue/arch-chroot/2022/12/ only this terminal will be chrooted all following commands will need to be run in this chrooted terminal!
sudo mount /dev/nvme0n1p2 /mnt/
sudo mount /dev/nvme0n1p1 /mnt/efi
sudo arch-chroot /mnt
  1. – recreate loader-entries:
    create this file, and save it as per example k-install and make it executable: chmod +x k-install
    and run ./k-install
    in chrooted terminal use nano in case or what ever you like as cli editor nano k-install
#!/usr/bin/env bash

# Find the configured esp
esp=$(bootctl -p)

# Prepare the efi partition for kernel-install
machineid=$(cat /etc/machine-id)
if [[ ${machineid} ]]; then
    mkdir ${esp}/${machineid}
else
    echo "Failed to get the machine ID"
fi

# Run kernel install for all the installed kernels
reinstall-kernels
  1. edit /efi/loader/loader.conf and add timeout to 5 so it will show the boot menu…

  2. reinstall bootloader files bootctl install

I missed something?
Could be you need to fix UUID for the efi Partition in /etc/fstab from old to new…
lsblk -f will show the new one…


nano /etc/fstab and exchange old /efi UUID with the new one… (yours differ from mine indeed)

2 Likes

will try this thanks A LOT

wait a second i add some more to it… just tested in a VM :wink:

In the step 2 I want to reactivate my partition but I cannot edit the flags of my 1gb partition that is supposed to be mu efi
I can create a new one tough,using what you suggested Processing: IMG_20240912_165157830_HDR.jpg…


you need to do this after formatted to fat32

Got it, will format it thanks

if something is unclear simply ask :wink:

Sorry even after creating a new fat32 I can edit flags

Never mind I dumb didn’t know gparted required a “commit” feature

1 Like

2024-09-13_01-05

yes it does need to actually commit.

I got to the last part without issues, just one last thing in the UUID i am not getting anything from lsblk -f, might I restart without modiying it?

it will not boot