#[Solved]Deleted my efi partition, what to do now?
100 messages · Page 1 of 1 (latest)
Can you post the output of lsblk -f and point out what each partition is?
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1
│ vfat FAT32 ESP 236C-CC06 740.6M 28% /boot/efi
├─sda2
│ swap 1 ada265ac-21ca-4516-b65c-8cbc819b49b6
│ └─cryptswap
│ swap 1 cryptswap
│ d68e7d7b-c4c7-45b2-9d9f-152cb7ca1fc8 [SWAP]
├─sda3
│ crypto 2 ARCH_LUKS
│ 54da6e10-61f4-494a-afb9-9a97d2cc3f9b
└─sda4
ext4 1.0 a64da53b-4685-40f7-bcc8-02053f5e0dd0 182.6G 6% /
zram0
[SWAP]
nvme0n1
│
├─nvme0n1p1
│ vfat FAT32 SYSTEM
│ 8694-8975
├─nvme0n1p2
│
├─nvme0n1p3
│ ntfs Windows
│ 322891282890EBDB
├─nvme0n1p4
│ ntfs Nilesh
│ 01D842CE05F8FE90
└─nvme0n1p5
ntfs Windows RE tools
A0B2C926B2C901B0
My roots are on separate partitions
just efi
is sda1 your ESP?
sda1 is where my efi was
tree /boot/efi
Here
There should be an arch-install-scripts package in the POP OS repo that provides arch-chroot.
Ok
Will look into it.
Since you use full system encryption, I assume you mount sda1 as /boot in arch?
Well, cryptsetup open whatever arch luks.
Yes
and mount arch rootfs in /mnt
sda1 in /mnt/boot
I see you have both grub and systemd-boot, which one do you use for arch?
What is the current output of efibootmgr?
I used grub
BootCurrent: 0005
Timeout: 0 seconds
BootOrder: 0005,0003,0006,0004,0000,0001,0002,0007,9999
Boot0000* Ultramarine
Boot0001* Windows Boot Manager
Boot0002* Internal Hard Disk
Boot0003* GRUB
Boot0004* Fedora
Boot0005* Pop!_OS 22.04 LTS
Boot0006* Linux Boot Manager
Boot0007* Internal Hard Disk
Boot9999* USB Drive (UEFI)
Once the mounting process is complete, you can reinstall grub from chroot to add the EFI entry back.
Ok, So I just have to mount the ESP to /mnt/boot and then run grub-install then config the grub right? For that I will need to unmout the efi partition right?
Can I do these things by going into the /EFI/ direcectory and then
1.grub-install /dev/sda --target=x86_64-efi --efi-directory=/boot
efibootmgr -c -d /dev/sda -p 1 -L <ArhcLinux> -l /EFI/<pop-os>/grubx64.efi
For that I will need to unmout the efi partition right?
Nope has to be mounted
Just reinstall grub https://wiki.archlinux.org/title/GRUB
GRUB will call efibootmgr,
You can simply reinstall GRUB, which will call efibootmgr. Or you can use this efibootmgr command directly
It also seems to me that the path should be \EFI\GRUB\grubx64.efi
And Pop OS uses EFISTUB
PopOS?
Please read the history before posting
So, the thing is that I want to have both arch and pop os as choices available to boot... So will just installing GRUB do that? Cz there is GRUB present in ESP of POP the same one. I will update when i get on PC.
The UEFI standard is designed so that only one ESP is effectively needed for any number of operating systems.
No unique ESP for each OS required
If you have grub in place, you can simply add it to the boot entries
Some firmware made by mediocre vendors would delete entries if there were many, hence this is a possible explanation for the disappearance of the original grub entry.
However, it seems to me that you have mounted esp under an OS as /boot in the past, judging by the presence of the grub tree in the output of tree /boot/efi.
Nah... The POP os Had the only option to delete the format the efi file and then only install the OS
This is very rude of Pop OS.
Can you explain why the grub files are in the ESP, which is now mounted as /boot/efi?
Do you mount it as /boot in arch?
In arch I mounted my esp as /boot, and in pop its boot/efi, it did it automatically since it was GUI installation.
POP os Had the only option to delete the format the efi file
Judging by the presence of grub files on the ESP, I don't think Pop OS has formatted your ESP,
You can restore the grub boot entry with efibootmgr.
Well, Could you please explain the steps, If you don't want that's okay.
efibootmgr -c -d /dev/sda -p 1 -L <ArhcLinux> -l /EFI/<pop-os>/grubx64.efi
I believe that you already know how to do that.
Well I don't completely understand the underlying concept for the moment, I just understand this command and I found it in a guide online.
Do I need to run the second one only? or the whole
efibootmgr -c -d /dev/sda -p 1 -L "A Title For this Boot Entry" -l '\EFI\GRUB\grubx64.efi'
Yes, I understood what the command is doing, but I was talking about how the things, behave in my systems.
efibootmgr adds the boot entry by manipulating the efi variables in the nvram.
Whoa, there
I never new this tool existed
Looks like it's in my book marks now
Ok, So I'm going to run the command OK?
Yes, it won't cause any harm other than a new boot record.
Change the boot record title to whatever you like
Yes, the first command had the title I myself changed, Learnd that you put <thisng to change in > angle brackets
Do backward slash and forward slash matter here?
Only windows have \backwards slashes
UEFI standard uses \, however, this should not matter here since efibootmgr automatically converts / to \
Here
Created new boot EFI entry, but I don't have all these OS's in my efi? What are all the others doing there?
the 008 One Arch Linux, I just created.
Now, should I restart?
Yes, give it a try
Your phrasing is rather confusing to me.
Sorry, English is not my native
I'm saying about all these other enteries, other that POP OS and ARCH LINUX, What are they doing there? I didn't put them there and I don't have any other OS on dev/sda
I'm in my arch now
Boot entries are stored as variables in a NVRAM (non-volatile random-access memory) chip on your motherboard. Unless you explicitly delete the entries, they will remain there.
Thanks, but I didn't get the option to choose POP
OH, I didn't knew that
I am no clairvoyant, can you be more specific?
Again, Sorry
So, I did get the grub menu but It only had arch in it
It didn't had the option to choose to boot pop os
Is it because grub read /boot first
then /boot/efi?
[Solved]Deleted my efi partition, what to do now?
That's exactly how it works, grub lives in its own kingdom of /boot/grub.cfg and doesn't care about boot entries in nvram.
then, DO i need to manual add pop with the same command?
You can select these boot entries from your firmware's boot menu.
If you want to have some fun, it's possible to run Doom directly in UEFI without an OS.
https://github.com/Cacodemon345/uefidoom
hey, I wanted to ask you this question, How long have you been using linux?
I can't remember exactly, maybe 8 years.
And the classic version is now also open source (GPL v3).