Recovering GRUB and Repairing Your OS Using a Live USB Session
Hello everyone,
I recently faced an issue where I installed the latest kernel and needed to remove the newly installed kernel files from the boot
directory. Unfortunately, I accidentally deleted the entire grub
directory in the process. As a result, I couldn't boot my OS since GRUB was missing. Although reinstalling the OS is an option, I didn't want to lose my data. If you ever find yourself in a similar situation or need to repair your OS while preserving your data, here is a step-by-step guide to recover GRUB using a live USB session.
Create a Live USB:
Download the ISO file of your Linux distribution.
Use a tool like Etcher (Windows) or dd
(Linux) to flash above ISO file and create a bootable USB drive.
Boot from the Live USB:
Open a Terminal:
Identify Your Root Partition:
#sudo fdisk -l
/dev/sda1
)Mount the Root Partition:/mnt
:/dev/sda
with your disk if different)update-grub
<br>
sudo reboot
<br>
It looks like you're new here. If you want to get involved, click one of these buttons!