Difference between revisions of "GRUB/Restore the GRUB Bootloader"
Views
Actions
Namespaces
Variants
Tools
m
→Boot the Manjaro Installation Media
imported>Aaditya |
imported>Petsam |
||
(9 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
__TOC__ | |||
= Overview = | = Overview = | ||
As with any Linux operating system, the GRUB ('''GR'''and '''U'''nified '''B'''ootloader) is responsible for booting up Manjaro. If for any reason your GRUB is not working --perhaps due to being corrupted, mis-configured, or even deleted-- then it may not be necessary to reinstall Manjaro. '''The GRUB can instead be fully repaired and restored, retaining your installed Manjaro system'''. To undertake this task, you will need to use your Manjaro installation media, such as, a CD/DVD or USB Flashdrive. | As with any Linux operating system, the GRUB ('''GR'''and '''U'''nified '''B'''ootloader) is responsible for booting up Manjaro. If for any reason your GRUB is not working --perhaps due to being corrupted, mis-configured, or even deleted-- then it may not be necessary to reinstall Manjaro. '''The GRUB can instead be fully repaired and restored, retaining your installed Manjaro system'''. To undertake this task, you will need to use your Manjaro installation media, such as, a CD/DVD or USB Flashdrive. | ||
= Boot the Manjaro Installation Media = | = Boot the Manjaro Installation Media = | ||
Line 17: | Line 21: | ||
* '''From the desktop environment''': open a terminal from your desktop menu, and enter ''sudo su'' in the terminal. | * '''From the desktop environment''': open a terminal from your desktop menu, and enter ''sudo su'' in the terminal. | ||
or | or | ||
= | * '''From the command line''' of the Manjaro Architect Edition or having used option '''5. System Rescue''' : enter the default login username ''root'' and then the password "manjaro" to log in. | ||
=Chroot into your existing Manjaro Installation= | |||
{{note| Look here to read more about [https://wiki.archlinux.org/index.php/Change_Root chroot](ing).}} | |||
There are 2 different ways to chroot into your exising Manjaro installation: Using mhwd-chroot or doing it manually. Please choose one: | |||
==Use mhwd-chroot== | |||
'''1.''' First, use an application called ''gparted'', which should be in Menu > System > GPartEd. This will provide a simple visual illustration of the partitions on your hard drive(s). | |||
Alternatively, you can use | |||
lsblk -f | |||
to list all your partitions. | |||
'''2.''' [https://forum.manjaro.org/index.php?topic=21472.0 mhwd-chroot] is a tool to easily chroot into an installed Linux installation from a live boot of a Manjaro Installation Media. Install it with | |||
sudo pacman -S mhwd-chroot | |||
Start mhwd-chroot from your Start Menu or in your terminal one of the following commands: | |||
sudo mhwd-chroot | |||
sudo mhwd-chroot-shell | |||
Next, choose the root partition of your existing Manjaro installation. | |||
== Manually Identify and Prepare the Installed Partition(s) == | |||
'''1.''' Ensure that you are using the Root account, which is identified by a hash ('#') at the beginning of the command line, rather than a dollar ('$'). To switch to Root, enter the command: | '''1.''' Ensure that you are using the Root account, which is identified by a hash ('#') at the beginning of the command line, rather than a dollar ('$'). To switch to Root, enter the command: | ||
sudo su | sudo su | ||
'''2.''' List your partitions. This is necessary in order to identify the partition your Manjaro system is installed on. If you have used a separate boot partition, it will be necessary to identify this as well. For a list of your paritions, enter the command: | '''2.''' List your partitions. This is necessary in order to identify the partition your Manjaro system is installed on. If you have used a separate boot partition, it will be necessary to identify this as well. For a list of your paritions, enter the command: | ||
Line 71: | Line 106: | ||
''' | '''4.''' Change to the root directory of your mounted partitions. | ||
cd /mnt | cd /mnt | ||
Line 84: | Line 119: | ||
= Restore GRUB = | |||
pacman -S mtools os-prober | First, install the software applications ''mtools'' and ''os-prober''. mtools is a collection of tools to access MS-DOS disks from GNU/Linux and Unix without mounting them. os-prober is a utility that detects if there are any other operating systems present. Install them both with the following command: | ||
sudo pacman -S mtools os-prober | |||
== For BIOS Systems == | == For BIOS Systems == | ||
Line 109: | Line 145: | ||
All done! Now close the terminal and reboot your system to use your freshly re-installed GRUB. | All done! Now close the terminal and reboot your system to use your freshly re-installed GRUB. | ||
== For UEFI Systems == | == For UEFI Systems == | ||
Line 156: | Line 193: | ||
Then install the {{ic|efibootmgr}}, {{ic|dosfstools}} and {{ic|grub}} packages and try steps 4 and 5 again. | Then install the {{ic|efibootmgr}}, {{ic|dosfstools}} and {{ic|grub}} packages and try steps 4 and 5 again. | ||
If it still doesn't work, then try exiting the chroot environnment by typing '''exit''', then loading the ''' | If it still doesn't work, then try exiting the chroot environnment by typing '''exit''', then loading the '''efivarfs''' module: | ||
sudo | sudo modprobe efivarfs | ||
and in the chroot | |||
mount -t efivarfs efivarfs /sys/firmware/efi/efivars | |||
And if you get something like | And if you get something like | ||
Line 183: | Line 222: | ||
grub-install --target=x86_64-efi --efi-directory=/install/boot/efi --bootloader-id=manjaro --boot-directory=/install/boot --recheck --debug | grub-install --target=x86_64-efi --efi-directory=/install/boot/efi --bootloader-id=manjaro --boot-directory=/install/boot --recheck --debug | ||
After the above you could chroot and try the '''update-grub''' command as earlier. | |||
= Troubleshooting = | |||
= | === Arch Linux is not recognized === | ||
If Arch Linux wasn't recognized after an update-grub then probably your Arch installation is missing the package lsb-release. | |||
=More= | |||
[https://forum.manjaro.org/index.php?topic=7552.0 Forum topic] | |||
[ | [https://wiki.archlinux.org/index.php/GRUB The Arch Wiki] | ||
= | Post for support at the [http://forum.manjaro.org/index.php?board=3.0 forums] | ||
[[Category:Contents Page]] | |||
[ | |||
[[Category:Contents Page]] | [[Category:Contents Page]] |