#[Solved] accidentally removed bootloader

92 messages · Page 1 of 1 (latest)

zealous vine
#

so, i was a dumbass today, and while trying to switch from grub to systemd bootloader i got cold feet and decided to remove it bootctl with sudo bootctl remove (i didn't realise the EFI partition would be removed utnil it was too late). Now my linux drive won't show in bios... help?

misty fog
#

first chroot into your system

zealous vine
#

im assumming you mean through a live USB?

zealous vine
#

okay, hold on, i'll be a couple mins while i reboot

misty fog
#

i hope you didnt destroy your boot partition

#

once you get in live iso

#

fdisk -l to make sure the boot partition still there

zealous vine
proud nebula
#

Hi, better yet boot into a GUI live usb like Endeavour or something like that and inspect your boot partition, if all it's ok just chroot and install again the boot loader following the arch guide (sorry for my english)

zealous vine
#

Is it okay?

misty fog
#

mount your root to /mnt and your boot to /mnt/boot

zealous vine
#

Sooooo, thatd be sudo mount /mnt / right?

#

Just making sure I've got them the right way around

misty fog
#

mount /dev/nvme0n1p2 /mnt
mount /dev/nvme0n1p1 /mnt/boot

zealous vine
#

Ah, okay, thanks. hold on

#

Okay, mounted those

proud nebula
#

Now install your boot loader

#

With chroot of course

zealous vine
#

Sooo, chroot bootctl install?

proud nebula
#

No no

zealous vine
#

Sorry, just wanna double check everything before running it

misty fog
#

arch-chroot /mnt

proud nebula
#

Yeh

zealous vine
#

Ah, okay, thanks

misty fog
#

cd /boot then ls

#

it would be nice to show me the files in that

zealous vine
misty fog
#

cool

proud nebula
#

Seems good

misty fog
#

just install systemd

#

sudo bootctl install

zealous vine
#

Will bootctl see the windows install that's sitting on a different SSD?

#

Like, I want the option to pick it from the bootloader

misty fog
#

sadly no

zealous vine
#

Ah

misty fog
#

you have to add it manually

zealous vine
#

Okay, is it easier to do that with grub or systemd?

misty fog
#

grub is always easier for dualboot

zealous vine
#

Ah, okay.... Then maybe I should stick with that...

#

What would I have to do to reinstall grub?

#

Assuming it got removed by the bootctl remove command

misty fog
#

im not familiar with grub :/

zealous vine
#

Ah

misty fog
#

but i think the wiki guide tells it

#

sudo grub-install --target=x86_64-efi --efi-directory=/mnt/boot --bootloader-id=grub

zealous vine
#

Ummmmmm

#

Not sure what I got wrong there

#

Do I need to come out of the chroot?

misty fog
#

i think no

#

i gave you the command on wiki

zealous vine
#

Just tried it with efi dir of just /boot at the suggestion of someone online, and it worked

#

So now reboot ig?

misty fog
#

wtf 💀

#

wait

#

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

zealous vine
#

Looks okay?

misty fog
#

yup

zealous vine
#

So now reboot?

#

Or run grub install again?

#

I've seen conflicting things

misty fog
#

wait

#

i remember something called osprober

#

sudo pacman -S os-prober

#

sudo os-prober

#

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

#

and then reboot

zealous vine
#

Oh!

#

It found windows

misty fog
#

yup

zealous vine
#

I tried that earlier (before the systemd shit and it didn't find anything!

#

Rebooting now

#

Ah, can't reboot as I'm in chroot

misty fog
#

:))

#

exit

#

umount all the partition

zealous vine
#

There we go, cheers

#

And we're back!! Thank you so much!

misty fog
#

yay

zealous vine
#

Isn't there a way to give you credit with a bot on here or something?

#

Or am I thinking of a different server?

misty fog
#

just reply me with "thanks"

zealous vine
cunning minnowBOT
#

axend.wav received a thank you cookie!

zealous vine
#

Yayyy!

#

[Solved] accidentally removed bootloader

misty fog
#

also mark this solved