Manjaro Difference between pages "GRUB/Restore the GRUB Bootloader" and "Installation Guides"

Difference between pages "GRUB/Restore the GRUB Bootloader" and "Installation Guides"

From Manjaro
(Difference between pages)
imported>Petsam
 
imported>Verityproductions
 
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.
{{Tip|For the best results, please ensure that Manjaro is connected to the internet prior to starting the installation process.}}
 
 
= Boot the Manjaro Installation Media =
 
'''1.''' Insert and boot your Manjaro installation media.
 
'''2.''' Select your '''preferred language''' (F2) and '''keyboard layout''' (F3).
 
{{tip|Setting the language and keyboard layout are undertaken by pressing the ''Function'' (F) keys. As many computers have multiple functions assigned to each function key, it may be necessary to hold down another key first to use them. For example, on a HP G62 laptop, to use the function keys, the 'fn' key must first be pressed and held.}}
 
 
'''3.''' Boot Manjaro Linux. It does not matter which boot option you choose, as the installation media is being used solely to repair/reinstate the GRUB, and not to install a fresh system.
 
'''4.''' Open the terminal or access the command line of the live CD.
 
* '''From the desktop environment''': open a terminal from your desktop menu, and enter ''sudo su'' in the terminal.
 
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:
 
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:
 
lsblk -f
 
  or
 
sudo blkid -o list -c /dev/nul
 
 
In this particular instance, '''having used the assisted preparation method to install Manjaro earlier''', the partitions for the author's Manjaro system are as follows:
 
* '''/dev/sda1''': Boot partition
* '''/dev/sda2''': Swap partition
* '''/dev/sda3''': Manjaro system
* '''/dev/sda4''': Space for personal files.
 
 
If you are still unsure, then you can also 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). If a separate partition for the GRUB exists, it will be marked as 'bootable', and should only be about 100MB in size.
 
 
'''3.''' Mount your Manjaro system partition. The syntax to mount the Manjaro system partition is:
 
mount /dev/'''[partition used for Manjaro system]''' /mnt
 
 
In this instance, as the Manjaro system partition is ''/dev/sda3'', this will be mounted using the following command:
 
mount /dev/'''sda3''' /mnt
 
 
'''IF''' you have used a separate partition for your GRUB bootloader, then this must also be mounted. The syntax to mount a separate partition used to boot is:
 
mount /dev/'''[partition used for GRUB]''' /mnt/boot
 
 
In this instance, a separate partition --''/dev/sda1''-- has been used for the GRUB, and will be mounted using the following command:
 
mount /dev/'''sda1''' /mnt/boot
 
{{note|Again, if you have not used a separate boot partition, then it (obviously) does not need to be mounted!}}
 
 
'''4.''' Change to the root directory of your mounted partitions.
 
cd /mnt
 
This is undertaken so that you are working from  --and with-- your installed system, rather than the installation media. To do so, it will be necessary to enter a series of commands in the following order:
 
mount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/dev
mount -t devpts pts /mnt/dev/pts/
chroot /mnt
 
 
= Restore GRUB =
 
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 ==
 
'''1.''' Install a new GRUB bootloader with the following command:
 
grub-install /dev/sda
{{Note|sda is the disk device where you want to install GRUB. You can check it using ''lsblk -f'' or using GParted as explained before.}}
 
 
'''2.''' Recheck to ensure the that installation has completed without any errors:
 
grub-install --recheck /dev/sda
 
 
'''3.''' Finally, configure the freshly installed GRUB bootloader:
 
update-grub
 
 
All done! Now close the terminal and reboot your system to use your freshly re-installed GRUB.
 
 
== For UEFI Systems ==
 
{{Warning|You need to be [https://wiki.archlinux.org/index.php/Change_Root chrooted] for this procedure as mentioned in the [[Restore_the_GRUB_Bootloader#Identify_and_Prepare_the_Installed_Partition.28s.29 | previous step.]]}}
 
 
1.) First of all check the partition for the ESP (EFI System Partition). An ESP is a fat32 partition and contains .efi files for booting.
 
It can be checked using Gparted or from the terminal using ''fdisk -l''
 
 
('''Note:'''
''If you do not have a EFI partition'', you will need to create it.
Use Gparted for that.
 
Type- ''fat32''
 
Size- ''512 mb to 1 gb'')
 
 
2.) Create the ''/boot/efi'' directory
sudo mkdir /boot/efi
 


3.) Mount the EFI partition as ''/boot/efi''
Installation guides for every release of Manjaro have been provided bellow for both beginners and experienced users. These guides may also be used to install Manjaro as a main operating system, or within a virtual machine environment using '''[https://www.virtualbox.org/ Oracle's Virtualbox]'''. Rebooting your computer (or starting your virtual machine) after connecting your installation media should be sufficient to start the process.  If you find that your computer continues to boot into your existing operating system despite this, then check that:
sudo mount /dev/sdXY /boot/efi
X = Alphabet of the drive = a,b,c ...
Y = Partition number of the EFI partition = 1,2,3,4...


Example - ''/dev/sda4''
* The ISO Download and/or installation media has not been corrupted, and that
* Your disc drive or USB flash-drive - depending on which you are using to install - is listed higher up in the boot order than your hard drive (i.e. that they will be booted from first).


Checking and amending your boot order if necessary will require either going into your computer's ''BIOS settings'' (if installing Manjaro as your main operating system), or Virtualbox's ''System Settings'' (if installing in a virtual machine).


4.) Re-install Grub.
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck


= Quick Guides =


5.) Update Grub configuration file.
<div style="float: left; width: 50%">
sudo update-grub
* [[Installation to SSD (quick guide)]] '''<font color="green">(NEW!)</font color>'''
: ''An example of how to install Manjaro to SSD for experienced users''.


=== Note ===
</div>


If you get something like
<div style="float: right; width: 50%">
* [[cfdisk Basic Partitioning Scenarios]]
: ''How to create two or three partition schemes to install Manjaro''.


EFI variables are not supported on this system.
</div>
<div style="clear: both"></div>


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 '''efivarfs''' module:
= Manjaro 0.8.2 Installation Guides =
sudo modprobe efivarfs


and in the chroot
{{Tip|It is recommended that unless there is a specific reason to do otherwise, most users - beginners and experienced alike - should use the standard Stable Installer for the best results.}}
mount -t efivarfs efivarfs /sys/firmware/efi/efivars


In addition to the standard '''Stable Installer''', Manjaro 0.8.2 also provides the experimental '''Testing Installer''', which is <u>specifically aimed at more experienced users</u>. The Testing Installer provides several new - and advanced - features not otherwise found in the Stable Installer. This includes supporting the ''Unified Extensible Firmware Interface'' ('''[http://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface EFI]'''), ''B-tree file system'' ('''[http://en.wikipedia.org/wiki/Btrfs btrfs]'''), and ''Redundant Array of Independent Disks'' ('''[http://en.wikipedia.org/wiki/RAID RAID]''') storage system.


And if you get something like
<div style="float: left; width: 50%">


grub-install: error: failed to get canonical path of `union'.


means that probably you forgot to [[Restore_the_GRUB_Bootloader#Identify_and_Prepare_the_Installed_Partition.28s.29 | chroot]].
* [[Installation Guide for Beginners 0.8.2|Installation Guide for Beginners]]
: ''A simple guide where no technical knowledge or expertise is required''.


'''See also'''


[http://wiki.manjaro.org/index.php?title=UEFI_-_Install_Guide UEFI Install Guide]
* [[Installation Guide for Experienced Users 0.8.2|Installation Guide for Experienced Users]]
: ''Manually partition your hard disk and edit the necessary configuration files''.
</div>


[https://wiki.archlinux.org/index.php/GRUB#UEFI_systems_2 Arch Wiki:GRUB#UEFI_systems_2]
<div style="float: right; width: 50%">


=== Alternative method ===


Mount the ext4 Manjaro root partition at {{ic|/install}}
* [[Installation Guide for the NET Edition 0.8.2|Installation Guide for the NET Edition]]
: ''Build your own Manjaro system from the ground up!''
</div>
<div style="clear: both"></div>


Mount the vfat Manjaro efi partition at {{ic|/install/boot/efi}}


And then install Grub as:


grub-install --target=x86_64-efi --efi-directory=/install/boot/efi --bootloader-id=manjaro --boot-directory=/install/boot --recheck --debug
= Manjaro 0.8.0 and 0.8.1 Installation Guides=


After the above you could chroot and try the '''update-grub''' command as earlier.
Both guides provided are virtually identical. The only real difference between them is that the ''Guide for Beginners'' utilises the '''assisted preparation''' method to automatically prepare and partition your computer's hard disk for you. The ''Guide for Experienced Users''  requires that the '''hard disk be prepared and partitioned manually'''. The ''Guide for Beginners'' also provides additional detail and explanations on how to edit various configuration files, while the ''Guide for Experienced Users'' assumes existing knowledge and expertise.


<div style="float: left; width: 50%">


= Troubleshooting =


=== Arch Linux is not recognized ===
* [[Installation Guide for Beginners 0.8.0-1|Installation Guide for Beginners]]
If Arch Linux wasn't recognized after an update-grub then probably your Arch installation is missing the package lsb-release.
: ''Automatically partition your computer's hard disk''.


</div>


=More=
<div style="float: right; width: 50%">


[https://forum.manjaro.org/index.php?topic=7552.0 Forum topic]


[https://wiki.archlinux.org/index.php/GRUB The Arch Wiki]
* [[Installation Guide for Experienced Users 0.8.0-1|Installation Guide for Experienced Users]]
: ''Requires manual preparation and partitioning of your computer's hard disk''.
</div>
<div style="clear: both"></div>


Post for support at the [http://forum.manjaro.org/index.php?board=3.0 forums]


=See Also=


[[Category:Contents Page]]
* '''[[Download Manjaro]]'''
* '''[[Check a Downloaded ISO Image For Errors]]'''
* '''[[Burn an ISO File]]'''




[[Category:Getting Started]]
[[Category:Contents Page]]
[[Category:Contents Page]]

Revision as of 20:10, 7 December 2012

Overview

Tip
For the best results, please ensure that Manjaro is connected to the internet prior to starting the installation process.

Installation guides for every release of Manjaro have been provided bellow for both beginners and experienced users. These guides may also be used to install Manjaro as a main operating system, or within a virtual machine environment using Oracle's Virtualbox. Rebooting your computer (or starting your virtual machine) after connecting your installation media should be sufficient to start the process. If you find that your computer continues to boot into your existing operating system despite this, then check that:

  • The ISO Download and/or installation media has not been corrupted, and that
  • Your disc drive or USB flash-drive - depending on which you are using to install - is listed higher up in the boot order than your hard drive (i.e. that they will be booted from first).

Checking and amending your boot order if necessary will require either going into your computer's BIOS settings (if installing Manjaro as your main operating system), or Virtualbox's System Settings (if installing in a virtual machine).


Quick Guides

An example of how to install Manjaro to SSD for experienced users.
How to create two or three partition schemes to install Manjaro.


Manjaro 0.8.2 Installation Guides

Tip
It is recommended that unless there is a specific reason to do otherwise, most users - beginners and experienced alike - should use the standard Stable Installer for the best results.

In addition to the standard Stable Installer, Manjaro 0.8.2 also provides the experimental Testing Installer, which is specifically aimed at more experienced users. The Testing Installer provides several new - and advanced - features not otherwise found in the Stable Installer. This includes supporting the Unified Extensible Firmware Interface (EFI), B-tree file system (btrfs), and Redundant Array of Independent Disks (RAID) storage system.


A simple guide where no technical knowledge or expertise is required.


Manually partition your hard disk and edit the necessary configuration files.


Build your own Manjaro system from the ground up!


Manjaro 0.8.0 and 0.8.1 Installation Guides

Both guides provided are virtually identical. The only real difference between them is that the Guide for Beginners utilises the assisted preparation method to automatically prepare and partition your computer's hard disk for you. The Guide for Experienced Users requires that the hard disk be prepared and partitioned manually. The Guide for Beginners also provides additional detail and explanations on how to edit various configuration files, while the Guide for Experienced Users assumes existing knowledge and expertise.


Automatically partition your computer's hard disk.


Requires manual preparation and partitioning of your computer's hard disk.


See Also

Cookies help us deliver our services. By using our services, you agree to our use of cookies.