Deleted boot partition and now stuck at splash screen

I had to install windows alongside endeavour and during that process i accidentally deleted the boot partition of linux. Now when i restart my pc, it just stays at the splash screen. I had to manually go to boot menu and select the windows boot manager or the other option “yes”. Both of them boote into windows directly. I cannot access endeavour os anymore.

How do i restore grub bootloader and the os selection screen to come up automatically without having to go to boot menu everytime?

My root file system is is of btrfs with timeshift snapshots enabled.

Basic method is to chroot into existing EndeavourOS installation and reinstall grub.

I haven’t used btrfs. But the process should be the usual : Live ISO → mount partition → chroot → grub-install → grub-mkconfig.

3 Likes

In addition to @flyingcakes post, perhaps if you could boot from your live usb and post the output of the following commands, we would have a better picture of your setup:

sudo parted -l

efibootmgr -v

In case of UEFI system, and if you by this mean that you deleted the EFI system partiton of your EnOS and now you have a new one, then you would need to edit your /etc/fstab an change the UUID of your EFI to match that of the new partition.

Also for chrooting into a system on BTRFS the following post by @dalto should give you some idea:

2 Likes

Welcome to the forum! :smile:

This might also give some background info:

2 Likes

Already tried that before, got an error something like

Proc Mount point doesn’t exist, error setting up chroot

root@elementary:/home/elementary# parted -l
Model:  USB DISK 2.0 (scsi)
Disk /dev/sda: 62.0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  19.0GB  19.0GB               Ventoy   msftdata
 2      19.0GB  19.0GB  33.6MB  fat16        VTOYEFI  hidden, msftdata
 3      19.0GB  62.0GB  42.9GB  ntfs                  hidden, msftdata


Model: ATA TOSHIBA MQ01ABD1 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name                          Flags
 1      1049kB  1075MB  1074MB  fat32                                         boot, esp
 2      1075MB  11.8GB  10.7GB  linux-swap(v1)                                swap
 3      11.8GB  355GB   344GB   btrfs
 4      355GB   895GB   540GB   btrfs                                         hidden
 5      895GB   895GB   105MB   fat32           EFI system partition          boot, esp
 6      895GB   895GB   16.8MB                  Microsoft reserved partition  msftres
 7      895GB   1000GB  104GB   ntfs            Basic data partition          msftdata
 8      1000GB  1000GB  532MB   ntfs                                          hidden, diag

root@elementary:/home/elementary# efibootmgr -v
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 2001,0000,0002,2002,2003
Boot0000* Yes	PciRoot(0x0)/Pci(0x17,0x0)/Sata(0,0,0)/HD(1,GPT,76d8e290-d6f0-a941-b690-3fc9348a0e71,0x800,0x200000)/File(\EFI\EndeavourOS\grubx64.efi)A01 ..
Boot0001* USB HDD: USB DISK 2.0	PciRoot(0x0)/Pci(0x14,0x0)/USB(3,0)/HD(2,GPT,30261dfe-e372-6fd1-6a10-3495c732af09,0x2357fd8,0x10000)RC
Boot0002* Windows Boot Manager	HD(5,GPT,85acd513-78d3-43ed-aca3-299b6c37a0df,0x683b6800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...,................
Boot2001* EFI USB Device	RC
Boot2002* EFI DVD/CDROM	RC
Boot2003* EFI Network	RC

my endeavour iso didnt boot for some reasons so i booted into elementry live.

I mean everything in my /dev/sda1 partition, which was configured with boot flag and /boot/efi as mount point, was deleted (not the partition but the contents of it).

1      1049kB  1075MB  1074MB  fat32                                         boot, esp 
5      895GB   895GB   105MB   fat32           EFI system partition          boot, esp

Alright, then the solution is as mentioned before in the thread to mount your root/system and efi partitions, chroot into your system and re-install the booyloader.

I am not sure how an elementary live usb would work in this situation.
I would make a bootable EnOS/Arch live usb and do the following:

1. sudo mount /dev/sda2 /mnt -o subvol=@
2. sudo mount /dev/sda1 /mnt/boot/efi
3. arch-chroot /mnt
4. grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=EndeavourOS
5. grub-mkconfig -o /boot/grub/grub.cfg
6. exit

Reboot.

If you get any kind of error messages etc. please post them back here for the forum members to review.

If after this, you only get the boot option for EnOS, you would need to do the following in your enos system:

Add

GRUB_DISABLE_OS_PROBER=false

to

/etc/default/grub

and regenerate grub.cfg

sudo grub-mkconfig -o /boot/grub/grub.cfg

If you don’t have os-prober in your system, install it with:

sudo pacman -S os-prober

Hope this helps.

5 Likes

Before reboot run efibootmgr and confirm boot order is correct. If not use -o option to reorder, particularly for USB stick boot.

2 Likes

Thanks everyone​:heart:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.