Difference between revisions of "RestoreGrub2"
(Standardising format & categorisation)
m (Fixed categories)
|Line 63:||Line 63:|
Revision as of 11:40, 19 April 2020
This page describes ways to restore your PCLinuxOS GRUB2 bootloader.
Your bootloader may end up corrupt or overwritten by another operating system due to many factors such as user error, power loss or malware etc. In such situations you may find yourself in search of a way to restore your bootloader to a state in which it will normally load your favourite PCLinuxOS.
To fix or restore the GRUB2 bootloader on your PCLinuxOS system please follow these steps outlined below:
Boot from good media
Boot a recent PCLinuxOS LiveOS and open a root terminal to execute the commands given below:
Mount your PCLinuxOS root partition
mkdir -p /mnt mount /dev/sdaX /mnt
(replace sdaX with whatever your root partition is)
If this is a UEFI system mount the EFI System Partition (ignore this step for a BIOS/legacy system)
mount /dev/sdaY /mnt/boot/EFI
(replace sdaY with whatever your ESP is)
Run the following commands to re-install the grub bootloader code
for i in /sys /proc /dev; do mount -B $i /mnt$i; done chroot /mnt /boot/grub2/install.sh
If all goes well you will see:
Installation finished. No error reported.
Exit the chroot environment with CTRL-D
Undo the mounts and then reboot.
for i in /sys /proc /dev; do umount /mnt$i; done umount /mnt/boot/EFI #if necessary umount /mnt reboot