Difference between revisions of "UEFI - Install Guide"

imported>Aaditya
imported>Aaditya
(23 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=Introduction=
= Introduction =


At this stage of the game, installing a Linux distro on a UEFI can be the trickiest part of the installation.
At this stage of the game, installing a Linux distro on a UEFI can be the trickiest part of the installation.
Line 11: Line 11:
<br clear="all" />
<br clear="all" />


==Target computer:==
== Target computer ==


The following guide will install Manjaro as the sole installation on a machine with UEFI enabled, Secure boot disabled using GUID Partition Table  (GPT) disk(s).
The following guide will install Manjaro as the sole installation on a machine with UEFI enabled, Secure boot disabled using GUID Partition Table  (GPT) disk(s).


<br clear="all" />
<br clear="all" />
==The Simple steps:==
== The steps ==


* 1. Download your preferred Manjaro version (XFCE, Openbox, Cinnamon, KDE, ...), must be 64-bits.
* 1. Download your preferred Manjaro version (XFCE, Openbox, Cinnamon, KDE, ...), must be 64-bits.
Line 43: Line 43:
   from Nvidia or ATI.
   from Nvidia or ATI.


* 5. Open terminal & enter:
 
{{Tip|Since Manjaro-0.8.9, UEFI support is also provided in the Graphical Installer, so one can simply try the Graphical installer and skip the instructions given below for the CLI installer.}}
 
 
* 5. To use the Graphical Installer select the '''Install Manjaro''' option from the Manjaro Welcome screen or from the desktop.
 
 
=== Advanced instructions (for CLI installer) ===
 
 
* 5-b. Open terminal & enter:


  $ sudo setup
  $ sudo setup


* 6. Now, we are in the CLI Installer (the graphical installer doesn't support UEFI yet).  
* 6. Now, we are in the CLI Installer.  
'''Choose 2.''' Use testing installer (EFI support).
'''Choose 2.''' Use testing installer (EFI support).


Line 63: Line 73:
  then please post here: [http://forum.manjaro.org/index.php?topic=5268.0]
  then please post here: [http://forum.manjaro.org/index.php?topic=5268.0]


So, if '''8.1''' (Auto-Prepare) is chosen, you skip the process below and go to 9...
'''If 8.1''' (Auto-Prepare) was chosen, you skip the process below and go to point 9 below.


  * When you '''click 2.''' Partition Hard Drives,  
  * When you '''click 2.''' Partition Hard Drives,  
Line 73: Line 83:
  * '''Important Step:''' Create a 50~250MB EFI Partition,
  * '''Important Step:''' Create a 50~250MB EFI Partition,
   mine is 100MB (code: ef00)
   mine is 100MB (code: ef00)
{{Note|If you already have an EFI partition (for example created by Windows), then that can be also be used instead of creating a new EFI partition.}}
  * When you are done, go to '''4. Set Filesystem'''
  * When you are done, go to '''4. Set Filesystem'''
   '''Mountpoints.''' (Again, instructions on manually
   '''Mountpoints.''' (Again, instructions on manually
Line 78: Line 89:
  * '''Important Step:''' Format the EFI Partition you
  * '''Important Step:''' Format the EFI Partition you
   created as '''VFAT''' and mount on /boot/efi
   created as '''VFAT''' and mount on /boot/efi
{{Note|If you are re-using your EFI partition (that was created by Windows previously (or any other OS), then there is no need to format. Formatting will wipe the previous bootloader. Only mounting the EFI partition as '''/boot/efi''' is required in that case.}}


* 9. '''Choose 3.''' Install system and wait...
* 9. '''Choose 3.''' Install system and wait...
Line 85: Line 97:
* 11. When you are done, go to '''5. Install bootloader.''' Choose EFI_x86_64 > GRUB (2) UEFI x86_64,  '''DON'T select BIOS GRUB.'''
* 11. When you are done, go to '''5. Install bootloader.''' Choose EFI_x86_64 > GRUB (2) UEFI x86_64,  '''DON'T select BIOS GRUB.'''


* 11.1 It will ask to format the EFI Partition you created earlier as FAT32, just mark Yes.
* 11.1 It will ask to format the EFI Partition you created earlier as FAT32.
{{Note|Formatting not required if reusing previous EFI partition.}}


* 12. If it gives a error in the final stages saying "efivars kernel module was not properly loaded", don't worry, the system will work fine!
* 12. If it gives a error in the final stages saying "efivars kernel module was not properly loaded", don't worry, the system will work fine!
Line 93: Line 106:
* 14. '''Click 6.''' Quit
* 14. '''Click 6.''' Quit


====Note====
=== Note ===


To make sure that Grub was installed correctly, open a terminal and type-
To make sure that Grub was installed correctly, open a terminal and type-


  sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
  sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
To remake the Grub configuration so that any other OS can be detected, open a terminal and type-
sudo grub-mkconfig -o /boot/grub/grub.cfg


* 15. Shutdown, remove the DVD or USB, and boot. Your system should appear now!
* 15. Shutdown, remove the DVD or USB, and boot. Your system should appear now!
DONE, SYSTEM INSTALLED!


<br clear="all" />
<br clear="all" />
Line 108: Line 122:


For UEFI install the Disk partition table should be of type '''GPT (Guid Partition Table).'''
For UEFI install the Disk partition table should be of type '''GPT (Guid Partition Table).'''
If you dont want to format your hard disk to GPT, but instead want to migrate from MBR to GPT while trying to save your data, can have a look at
http://www.rodsbooks.com/gdisk/mbr2gpt.html




Line 114: Line 131:
Its basically a fat32 partition which has the .efi files for booting.
Its basically a fat32 partition which has the .efi files for booting.


You can create the partition using Gparted.
You can create the partition using Gparted (type- fat32 or fat16 and size around 512 mb).


You would also need to install/check whether following packages are present-
You would also need to install/check whether following packages are present-
Line 121: Line 138:
  2. dosfstools
  2. dosfstools
  3. grub
  3. grub
[[Pacman_Overview | (How to install packages)]]




Line 140: Line 159:
5.) Update Grub configuration file.
5.) Update Grub configuration file.
  sudo update-grub
  sudo update-grub
'''Note-'''
If you get an error like
path '/boot/grub' is not readable by Grub on boot. Installation is impossible. Aborting
Then you will need to [https://wiki.archlinux.org/index.php/Change_Root chroot] as described [[Restore_the_GRUB_Bootloader#Identify_and_Prepare_the_Installed_Partition.28s.29|here]], and then perform Step 5 again.
If you get the following error :
EFI variables are not supported on this system.
then you should load the '''efivars''' module :
sudo modprobe efivars




Line 145: Line 177:


[[Restore the GRUB Bootloader]]
[[Restore the GRUB Bootloader]]
[https://forum.manjaro.org/index.php?topic=7315.msg120001#msg120001 https://forum.manjaro.org/index.php?topic=7315.msg120001#msg120001]


== Dual booting with Windows ==
== Dual booting with Windows ==
Line 151: Line 185:




'''In such cases install ''[http://www.rodsbooks.com/refind/index.html rEFInd]'''''
'''In such cases ''[http://www.rodsbooks.com/refind/index.html rEFInd]''''' can be used.




Line 164: Line 198:
Files will be present in  /usr/share/refind .
Files will be present in  /usr/share/refind .


2.Or use mine [https://www.dropbox.com/s/bafo0sp432pw2tj/refind.zip here]
2.Or using the instructions on the rEFInd website: [http://www.rodsbooks.com/refind/installing.html]
Extract the contents of the zip file.


=== Instructions ===
=== Instructions ===


Go inside the refind folder ('''/usr/share/refind''', or from the one obtained from my .zip file), and copy the files and folders to-
The '''refind-install''' command can be used to automatically install rEFInd (the EFI partition may need to be mounted for this to work). See the [https://wiki.archlinux.org/index.php/REFInd#Installation Arch wiki] for more details.
 
==== Manual install ====
 
Inside the refind folder ('''/usr/share/refind'''), copy the files and folders to-


  /boot/efi/EFI/Boot/
  /boot/efi/EFI/Boot/
Line 191: Line 228:
  bootx64.efi
  bootx64.efi


You need to '''''rename''''' it to ''windows.bootx64.efi''
You can '''''rename''''' it as ''windows.bootx64.efi''
Then you should rename ''refind_x64.efi'' to ''bootx64.efi''
Then you can rename ''refind_x64.efi'' to ''bootx64.efi''
And you are done!


The bootx64.efi files boot by default, hence rEFInd would now boot by default, and would detect your grubx64.efi(linux-manjaro) and efibootmgfw.efi (windows) automatically.
The bootx64.efi files boot by default, hence rEFInd should now boot by default, and detect grubx64.efi(linux-manjaro) and efibootmgfw.efi (windows) automatically.


'''Note'''-
'''Note'''-
Line 212: Line 248:
to create '''/boot/efi/EFI/Manjaro/grubx64.efi'''
to create '''/boot/efi/EFI/Manjaro/grubx64.efi'''


The rEFInd package currently doesnt contain an icon for Manjaro, so I customised one myself from an existing one on the net and upload it here as well. It should be placed in the Manjaro directory referred to earlier, and is named as grubx64.png [http://www.rodsbooks.com/refind/themes.html#icons]


[https://www.dropbox.com/s/5so73fkyam8vqu2/grubx64.png rEFInd Manjaro Icon]
See also- [http://www.rodsbooks.com/refind/installing.html#naming http://www.rodsbooks.com/refind/installing.html#naming]
[[File:Grubx64.png]]
 
=== An alternative: chainloading via GRUB ===
 
 
An entry can be added to ''/etc/grub.d/40_custom''
 
menuentry 'Windows8 (UEFI)' {
insmod ntfs
set root=(hd0,gpt4)
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
boot
}
 
In this case (hd0,4) or /dev/sda4 is the EFI System partition where the Windows bootloader is present.
 
After adding the above entry, running '''sudo update-grub''' updates the GRUB configuration file so that an entry named '''Windows8 (UEFI)''' is added to the GRUB boot menu.
 
Related Forum thread: [http://forum.manjaro.org/index.php?topic=11998.0]
 
 
== Extras ==
 
=== Using Rufus on Windows to create installation media ===
 
[http://rufus.akeo.ie/ Rufus] users can use the following settings:


See this also- [http://www.rodsbooks.com/refind/installing.html#naming http://www.rodsbooks.com/refind/installing.html#naming]
* Click on the DVD icon and load your .iso
* Device: "choose your USB" (Attention: choose correctly,
  the device selected here will be formatted!!!)
* Partition scheme: GPT partition scheme for UEFI computer
* File system: FAT32
* Cluster size: "Don't modify"
* Volume label: "Don't modify"
* Click Start, and you are done (takes 2~5 min to complete).


==Feedback:==
== Feedback ==


Questions, suggestions, critics? Please post here: [http://forum.manjaro.org/index.php?topic=5268.0]
Questions, suggestions, critics? Please post here: [http://forum.manjaro.org/index.php?topic=5268.0]


== External Links ==
Youtube video: https://www.youtube.com/watch?v=36tDZIXn3-k


[[Category:Contents Page]]
[[Category:Contents Page]]
Anonymous user