Manjaro Difference between pages "Limit the size of .log files & the journal" and "UEFI - Install Guide"

Difference between pages "Limit the size of .log files & the journal" and "UEFI - Install Guide"

From Manjaro
(Difference between pages)
imported>Handy
 
imported>Aaditya
 
Line 1: Line 1:
= Introduction =
=Introduction=


NOTE: This page is still a work in progress.
At this stage of the game, installing a Linux distro on a UEFI can be the trickiest part of the installation.


UEFI is the commonly agreed on name for both the EFI & UEFI
standards which merged. It does not include the old EFI v1,
or Apple's own non-standard version of EFI.


Log files & the systemd journal do the same thing in different ways. They keep a record of everything that happens on your computer system. This makes it possible to understand what is going right & what is going wrong. As an example, if your system had been infiltrated by an ssh attack, this could be verified in the log/journal. So these log files are good for more than tracking troublesome hardware, or driver problems, badly written network manager code or the plethora of other problems that the complex & dynamic GNU/Linux system has to deal with.  
So the following guide can be a huge time & frustration saver for some users.


These logs are an absolute blessing, as not all systems have them, & any server administrators who does have them would be very grateful as they can be the bread & butter of what they do.
<br clear="all" />


Generally only server administrators have use for logs that go back any length of time. Few users who run distros on their desktop, Notebook, Netbook... machines, need to keep such huge log files, histories going back for many months or even years, on their system, are a waste of space & also makes viewing your log files more cumbersome.
==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 first topic on this page will briefly cover the '''systemd journal''' ====
<br clear="all" />
==The Simple steps:==


The systemd journal has taken the place of log files though it will happily run in parallel with the standard type log files. These are still created & maintained by default in Arch & Manjaro, which means that even if you delete syslog-ng & all of the /var/log/*log files on reboot you will find the log files have been automatically created again, this will change in the future.
* 1. Download your preferred Manjaro version (XFCE, Openbox, Cinnamon, KDE, ...), must be 64-bits.


==== The second topic will cover handling log files ====
* 2. Burn the .iso to USB or DVD. For Windows users using USB media, Rufus [http://rufus.akeo.ie/] is highly recommended.


This topic will go into far more depth, it will covering the use of the '''logrotate''' command, '''logrotate.conf''', the '''/etc/cron.daily cron.weekly cron.monthly cron.yearly''', some ways to run created scripts, & a mention of the '''crontab''' method of running a script also. I'll try to make this section accessible to as many people as possible, which means this will be a long page.
* 2.1. Rufus (Windows) users should use the following settings:


<br clear="all"/>
* 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).


= The journal & the logs duplicate the same information =
* 3. Check your BIOS, UEFI must be ON and Secure boot OFF.


You can read the text of the log files in a text editor, or using the '''cat''', '''more''', '''less''' & such commands as you would on any other text file. The journal on the other hand requires the '''journalctl''' command to be able to access its contents. The following is a good way to read the journal:
* 4. Boot with your USB or DVD & use the rEFInd - Main Menu... to choose which GPU drivers you want to have installed, the open-source or proprietary:


  sudo journalctl
  * Boot Manjaro Linux ... (default) -
  This chooses the ''open-source - free'' GPU drivers.
* Boot Manjaro Linux ... (nonfree) -
  This option chooses the '''proprietary''' GPU drivers
  from Nvidia or ATI.


<br clear="all"/>
* 5. Open terminal & enter:


== How to set a maximum size limit for the journal ==
$ sudo setup


You need to use your text editor with root priviliges, starting it with '''sudo''' will do the job.
* 6. Now, we are in the CLI Installer (the graphical installer doesn't support UEFI yet).
'''Choose 2.''' Use testing installer (EFI support).


With a simple edit of the '''/etc/systemd/journald.conf''' you can set the maximum size limit of the '''/var/log/journal''' .
* 7. '''Choose 1.''' Set date and time - an easy intuitive configuration.


* Uncomment the following line & add the size limit that you want. I set mine to 50MB like this:
* 8. Now, '''Choose 2.''' Disk(s) preparation.
Go to '''2. Partition Hard Drives''' or follow the instruction in the next point '''8.1''' to automatically partition the entire disk.


SystemMaxUse=50M
* 8.1 If you want to use the entire disk, and don't want to manually configure your partitions, you can choose '''1. Auto-Prepare.'''


After a reboot, you should find that your journal is now somewhat less than 50MB (or whatever limit you set), as it needs to have some working space. Mine went to 38M from 391M.
Attention: I don't know for sure if using the
Auto-Prepare option of the installation will be
successful as I always prefer to manually configure
my partitions. Give it a try, if you have problems
then please post here: [http://forum.manjaro.org/index.php?topic=5268.0]


<br clear="all"/>
So, if '''8.1''' (Auto-Prepare) is chosen, you skip the process below and go to 9...


== The Journalctl command - a quick reference [http://www.freedesktop.org/software/systemd/man/journalctl.html]==
* When you '''click 2.''' Partition Hard Drives,
  you get a dialog saying "Do you want to use GUID
  Partition Table (GPT)", '''choose Yes'''.
* Partition your disk(s) as you want (Instructions on
  manually partitioning are beyond the scope of this
  guide.)
* '''Important Step:''' Create a 50~250MB EFI Partition,
  mine is 100MB (code: ef00)
* When you are done, go to '''4. Set Filesystem'''
  '''Mountpoints.''' (Again, instructions on manually
  partitioning are beyond the scope of this guide.
* '''Important Step:''' Format the EFI Partition you
  created as '''VFAT''' and mount on /boot/efi


Note: Following are few pointers on things
* 9. '''Choose 3.''' Install system and wait...
you can do to make using journalctl quicker,
easier & more effective, on your system.


==You don't have to use sudo with journalctl==
* 10. Now, go to '''4. Configure System''' and configure it the way you like (username, password, mirrorlist, system-name, ...).


Add your '''user''' to '''adm''' group. This gives your <user> full use of the '''journalctl''' command. No more need to use sudo.
* 11. When you are done, go to '''5. Install bootloader.''' Choose EFI_x86_64 > GRUB (2) UEFI x86_64,  '''DON'T select BIOS GRUB.'''
Swap "handy" for your username in the following:
# usermod -a -G adm handy


* 11.1 It will ask to format the EFI Partition you created earlier as FAT32, just mark Yes.


==See the whole line of the journalctl output text==
* 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!


You can pipe the output of journalctl to a file or to a text display tool like "More" or "Less", as follows:
* 13. If the installer asks you about copying grub/efi files to another folder in order to maintain compatibility in some systems, choose Yes.
 
$ journalctl -b -p err|less
Doing so, gives you a means of avoiding the truncation of output which some system displays configurations may experience.


===Use a ~/.bashrc alias to make this easy===
* 14. '''Click 6.''' Quit


I use the following ~/.bashrc alias:
====Note====
alias errors="journalctl -b -p err|less"
On entering '''errors''' in the Terminal, all errors or worse since the last boot are sent to (piped) to the Terminal based text display tool called '''Less''' which wraps the text output of the journalctl command. Apart from anything else, it makes the errors more useful for anyone reading them in the forum!


Type '''Q''' (upper or lower case) to close "Less".
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=grub-manjaro --recheck


===== Access to full journal containing info from the system & users: =====
* 15. Shutdown, remove the DVD or USB, and boot. Your system should appear now!


$ journalctl
DONE, SYSTEM INSTALLED!


=== Live view, shows the last 10 lines of the journal & all content as it happens: ===
<br clear="all" />


$ journalctl -f
== Dual booting with Windows ==


== Basic filtering: ==
Some manufactures EFI implementations cause GRUB not to be showed in the Boot Menu, or even if its there it can't be made default.


=== Shows all output to the journal since the last boot:===
In such cases install '''[http://www.rodsbooks.com/refind/index.html rEFInd]'''


$ journalctl -b
[[File:Refind.png]]


=== Shows all output with priority level ERROR & worse, since last boot: ===
There are two ways to install rEFInd-


  $ journalctl -b -p err
1.Install rEFInd from its website [http://www.rodsbooks.com/refind/installing.html] (detailed) or use pacman-
  sudo pacman -S refind-efi


Following is the above command with its output sent to a file called '''-ERRORS''' in your ''/home/<user>'' directory. Having the '''-''' at the beginning of the name should cause the file to be shown at the top of the list of files when viewing the contents of your '''~/''' (''/home/<user>'') directory. This command makes it easy to copy the contents of the -ERRORS file, & then paste it to the forum. Doing so allows us to display ALL of the command's output instead of only being able to cut & paste the truncated lines from our terminal:
Files will be present in /usr/share/refind .


$ Journalctl -b -p err > -ERRORS
2.Or just use mine [https://www.dropbox.com/s/bafo0sp432pw2tj/refind.zip here]
Extract the contents of the zip file.


== Filtering based on time: ==
=== Instructions ===


=== Since yesterday: ===
Go inside the refind folder (/usr/share/refind, or from the one obtained from my .zip file), and copy the files and folders to-


  $ journalctl --since=yesterday
  /boot/efi/EFI/Boot/


=== Give a specific time period: ===
'''Note-'''


$ journalctl --since=2012-10-15 --until="2011-10-16 23:59:59"
My ESP (EFI System Partition) is mounted at /boot/efi.


=== Pick a specific service & time period: ===
You need to copy these files to the Boot folder on your EFI partition, and the Boot folder itself will be present inside the EFI folder on the EFI Partition, so take note of it.


  $ journalctl -u httpd --since=00:00 --until=9:30
Now inside this boot folder, there will already be a file present-
  bootx64.efi


== Point journalctl at specific devices, services, binaries ==
You need to '''''rename''''' it to  ''windows.bootx64.efi''
Then you should rename ''refind_x64.efi'' to ''bootx64.efi''
And you are done!


=== Look at a specific device: ===
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.


$ journalctl /dev/sdc
''Note''-


=== Check on a binary: ===
a folder Manjaro(name could be some other also) containing the file grubx64.efi should also be present in /boot/efi/EFI/ folder


$ journalctl /usr/sbin/vpnc
The rEFInd 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.


=== Check on the interlieved output from two specifics: ===
[https://www.dropbox.com/s/5so73fkyam8vqu2/grubx64.png rEFInd Manjaro Icon]
[[File:Grubx64.png]]


$ journalctl /usr/sbin/vpnc /usr/sbin/dhclient


=== Show all systemd units that have been started in your journal: ===
==Feedback:==


$ journalctl -F _SYSTEMD_UNIT
Questions, suggestions, critics? Please post here: [http://forum.manjaro.org/index.php?topic=5268.0]
 
You can then interrogate the journal specifying any of those units.
 
== A summation ==
 
The Systemd Journal is capable of advanced functions beyond what has been mentioned here. The above is very good food for thought for people that are wondering if they need to be running '''syslog-ng''' or the like that creates most of the '''/var/log/*log''' files on their systems.
 
By experimenting with the above commands one can make an informed decision for themselves, though as mentioned at the beginning of the Journal section, Arch & therefore Manjaro still run both the new systemd journal & the old style log file system in parallel. So if you find the /var/log/*log files to be redundant & you want to be rid of them, various methods would be effective.
 
Currently I'm running my system with syslog-ng (& its dependency) deleted. I deleted all of the log files from the /var/log directory (leaving any that are in their own sub-directories), except for Xorg.0.log , Xorg.0.old , lastlog , btmp & wtmp (pacman.log turned up when pacman was used). The deleted log files came back on reboot, but having since deleted them again they have stayed deleted for multiple reboots.
 
= Managing /var/log/* files =
 
== Introducing Logrotate & friends ==
 
What is this Logrotate? [http://linux.die.net/man/8/logrotate] logrotate is a powerful tool used to manage the log files created by system processes. It can be instructed to automatically compress, rename in a variety of ways, remove logs, to do all of this & more in a way that maximizes the convenience of logs & conserves your system's resources. An enormous amount of control is available to users including running scripts on your rotated files.
 
A problem I face in trying to make this article about logrotate as simple as possible is that logrotate can be called in so many ways, & these ways are not mutually exclusive.
 
For example, logrotate can be called to run on a file, or multiple files in any combination or multiple of '''hourly, daily, weekly, monthly & yearly''', via scripts placed in the /etc/ in the already existing directories '''hourly daily weekly monthly''' the '''yearly''' directory can be added if required. '''crontab''' [http://www.adminschoice.com/crontab-quick-reference/] can be used to run logrotate or scripts as complex as a person needs. logrotate can be combined with other tools in anyway that a user can come up with to process these rotated files at any time & frequency.
 
<br clear="all"/>
==== The scope of this article ====
 
That said, much of the power of logrotate is for the benefit of those administering servers & will not be dealt with in the following. Though what we will deal with can be used on more than just our log files. We can use logrotate to backup any other files that we choose. I will expand on this at a later date.
 
<br clear="all"/>
 
== /etc/logrotate.conf & /etc/logrotate.d ==
 
The logrotate.conf configuration file largely dictates logrotate's behaviour, it holds global settings, but most of the work that logrotate does is via script files stored in the '''/etc/logrotate.d''' directory, which take precedence over the global settings held in logrotate.conf.
 
Applications such as Apache, MySQL, Cups & others, put scripts into the /etc/logrotate.d directory to manage their log files.
 
If you manually run the command '''sudo logrotate''', you will be presented with its usage template. logrotate needs you to specify the path to the script that you want it to use, including the logrotate.conf file which one may think due to its name would be automatically read, it is not.
 
To run logrotate & the logrotate.conf file you use the following command line:
 
logrotate /etc/logrotate.conf
 
<br clear="all"/>
=== Can I store & run my script files elsewhere? ===
A line exists in logrotate.conf that tells logrotate to run all of the scripts that exist in /etc/logrotate.d
 
include /etc/logrotate.d
 
We can use the '''include''' command in logrotate.conf to add other directories or use another directory instead of logrotate.d if we have reason to. Be careful what you do as there are files placed into the logrotate.d directory by other programs.
 
<br clear="all"/>
=== My settings in logrotate.conf don't effect all of the .log files? ===
 
Script files that are called via the logrotate.conf file take precedence over the global settings in logrotate.conf . That means that if you call a script from logrotate.conf that is located in the /etc/logrotate.d directory, then that script is more powerful than any of the global setting in logrotate.conf .
 
I use a script '''/etc.logrotate.d/rotate.logs''' that is set to work on all *.log files, & it does. The two that don't get rotated are called '''faillog''' & '''lastlog''' , apart from not having the '''.log''' file extension, these two files are not normal log files, they are accessed via terminal commands of the same name.
 
<br clear="all"/>
 
=== Can I store my scripts where I want? ===
 
Some applications such as Apache cups, drop scripts into /etc/logrotate.d to aid in their own self maintenance. We can use a location of our choosing for these or other scripts if we want. We just have to call its path in the /etc/logrotate.conf file, the same way, as shown in the following example:
 
include /home/handy/.config/mylogrotate
 
Apart from adding our own scripts to /etc/logrotate.d (or any other path that we have chosen to include), we can also add scripts into any of the previously mentioned '''/etc/ cron.hourly cron.daily cron.weekly cron.monthly''' folders. OR we can add a script into any of these folders that suit our needs that runs the logrotate /etc/logrotate.conf command which will have the logrotate.conf file, direct logrotate to the default /etc/logrotate.d directory where we have our script(s). OR to another directory where we have our script & have included the path in logrotate.conf . whew!
 
So you can see there are a variety of ways to call logrotate (let alone use it).
 
<br clear="all"/>
 
== Some uses for Logrotate ==
 
For example, script block below does the following, listed line by line:
 
* '''/var/log/*.log {''' specifies the file or the files as this example uses a wild card that says all files ending in .log , the '''{''' starts the list of commands that will be used on the file(s) just specified.
 
* '''daily''' Here we are saying cycle these commands daily, we can also say weekly, monthly, yearly (or specify other times with crontab)[http://www.adminschoice.com/crontab-quick-reference/].
 
* '''size''' is where we can place a size limit that will cause a file to be rotated. I placed a '''1M''' one megabyte size limit in the example.
 
* '''dateext''' this puts the date of the rotation on the new copy, so it would use this format: '''<file.name>.log-20130815'''
 
* '''rotate 7''' means keep 7 of our daily (in this script) backups, delete the oldest when it would become the 8th.
 
* '''compress''' is obvious, it uses gzip by default & adds a .gz extension to your file, which will make it look like this: <file.name>.log.1.gz you can choose other compression methods, I'm not going into that here.
 
* '''delaycompress''' tells logrotate to compress the newly rotated file in the next cycle. This has advantages in ease of access & also if the file is still being written to by a process after it has been rotated.
 
* '''copytruncate''' this is a great option, as it copies the contents of the file to a new new file <file.name>.log.1 & then deletes the contents of the original file. You can have no permission problems crop up when you do it this way.
 
* '''notifempty''' do nothing if the file is empty, which makes good logical sense.
 
* '''missingok''' if the file does not exist, give no error.
 
* '''}''' this curly bracket closes the block of commands.
 
/var/log/*.log {
  daily
  size 1M
  dateext
  rotate 7
  compress
  delaycompress
  copytruncate
  notifempty
  missingok
  }
 
The above script can be used as is, it does not need to be made executable, it just needs to be put somewhere that logrotate will see (in this example) every day.
 
We can use the above script block as a template, easily removing parts & modifying its relatively simple settings. It can duplicated in a script with each script block specifying custom settings tailored for individual files.
 
<br clear="all"/>
== An Example that you can modify to suit ==
 
I'll show how I have my system set, you can use the information already given on this page & other available on the web to fine tune your set up to suit your needs (if you have the need anyway).
 
=== Firstly - Be sure this file is here /etc/cron.daily/logrotate === 
#!/bin/sh
# nicenesses range from -20 (most favorable scheduling) to 19 (least favorable)
NICE=19
# 0 for none, 1 for real time, 2 for best-effort, 3 for idle
IONICE_CLASS=2
# 0-7 (for IONICE_CLASS 1 and 2 only), 0=highest, 7=lowest
IONICE_PRIORITY=7
CMD_LOGROTATE="/usr/bin/logrotate /etc/logrotate.conf"
if [ -x /usr/bin/nice ]; then
  CMD_LOGROTATE="/usr/bin/nice -n ${NICE:-19} ${CMD_LOGROTATE}"
fi
if [ -x /usr/bin/ionice ]; then
  CMD_LOGROTATE="/usr/bin/ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} ${CMD_LOGROTATE}"
fi
${CMD_LOGROTATE}
exit 0
 
<br clear="all"/>
=== Secondly - Create /etc/logrotate.d/rotate.logs using the following ===
 
## rotate all /var/log files with names ending in log
/var/log/*log {
## cycle through these commands once per day
  daily
## keep the results of 7 cycles
  rotate 7
## use gzip to compress each rotated (copied) log file
  compress
## compress the file on the next cycle
  delaycompress
## copy the contents of the log file to a new file <name>.log.1
## & then delete the contents of the original log file
  copytruncate
## do nothing to empty files
  notifempty
## create no errors if a file is missing
  missingok
## after the files have been rotated run the following command
  }
 
<br clear="all"/>
 
=== A Summary of the above example thus far ===
 
The First step puts a file into '''/etc/cron.daily''' which is an easy way to add the script to a daily cron job. Which means that script will be run everyday.
 
It basically runs this command:
 
logrotate /etc/logrotate.conf
 
As logrotate.conf goes through its list of commands it calls this one:
 
include /etc/logrotate.d
 
Which means that any scripts that are inside of '''/etc/logrotate.d''' are also run.
 
This brings us to the second step (above), where we created '''/etc/logrotate.d/rotate.logs''' . This script will be run everyday. The comments I added to the rotate.logs file above give a general idea of what it does. You can delete, modify & add to that script, but do it carefully.
 
=== The effect of running /etc/logrotate.d/rotate.logs everyday ===
 
Is that any file in /var/log that had '''log''' at the end of its name will be processed by the commands in the '''rotate.logs''' script. This will back up these files to a new file '''<name>.log.1''' & empty the original file to size 0. Any previous copies of with '''<name>.log.<number>''' will have their numbers bumped up one, until the day when they would have been given an 8, that is the day that they are deleted.
 
As well as this rotating (copying) & renaming of files, all files will be compressed in gzip format on the next rotation. Which means that you always have the current file & yesterdays file in /var/log in uncompressed format.
 
No files that are empty will be processed, & a file being missing will throw no errors.
 
<br clear="all"/>
 
=Support=
 
Following is a link to this page's forum counterpart where you can post any related feedback: [http://forum.manjaro.org/index.php?topic=6050.0]




[[Category:Contents Page]]
[[Category:Contents Page]]

Revision as of 16:00, 15 October 2013

Introduction

At this stage of the game, installing a Linux distro on a UEFI can be the trickiest part of the installation.

UEFI is the commonly agreed on name for both the EFI & UEFI 
standards which merged. It does not include the old EFI v1, 
or Apple's own non-standard version of EFI.

So the following guide can be a huge time & frustration saver for some users.


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 Simple steps:

  • 1. Download your preferred Manjaro version (XFCE, Openbox, Cinnamon, KDE, ...), must be 64-bits.
  • 2. Burn the .iso to USB or DVD. For Windows users using USB media, Rufus [1] is highly recommended.
  • 2.1. Rufus (Windows) users should use the following settings:
* 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).
  • 3. Check your BIOS, UEFI must be ON and Secure boot OFF.
  • 4. Boot with your USB or DVD & use the rEFInd - Main Menu... to choose which GPU drivers you want to have installed, the open-source or proprietary:
* Boot Manjaro Linux ... (default) - 
  This chooses the open-source - free GPU drivers.
* Boot Manjaro Linux ... (nonfree) - 
  This option chooses the proprietary GPU drivers
  from Nvidia or ATI.
  • 5. Open terminal & enter:
$ sudo setup
  • 6. Now, we are in the CLI Installer (the graphical installer doesn't support UEFI yet).

Choose 2. Use testing installer (EFI support).

  • 7. Choose 1. Set date and time - an easy intuitive configuration.
  • 8. Now, Choose 2. Disk(s) preparation.

Go to 2. Partition Hard Drives or follow the instruction in the next point 8.1 to automatically partition the entire disk.

  • 8.1 If you want to use the entire disk, and don't want to manually configure your partitions, you can choose 1. Auto-Prepare.
Attention: I don't know for sure if using the 
Auto-Prepare option of the installation will be 
successful as I always prefer to manually configure 
my partitions. Give it a try, if you have problems
then please post here: [2]

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

* When you click 2. Partition Hard Drives, 
  you get a dialog saying "Do you want to use GUID
  Partition Table (GPT)", choose Yes.
* Partition your disk(s) as you want (Instructions on
  manually partitioning are beyond the scope of this
  guide.)
* Important Step: Create a 50~250MB EFI Partition,
  mine is 100MB (code: ef00)
* When you are done, go to 4. Set Filesystem
  Mountpoints. (Again, instructions on manually
  partitioning are beyond the scope of this guide.
* Important Step: Format the EFI Partition you
  created as VFAT and mount on /boot/efi
  • 9. Choose 3. Install system and wait...
  • 10. Now, go to 4. Configure System and configure it the way you like (username, password, mirrorlist, system-name, ...).
  • 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.
  • 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!
  • 13. If the installer asks you about copying grub/efi files to another folder in order to maintain compatibility in some systems, choose Yes.
  • 14. Click 6. Quit

Note

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=grub-manjaro --recheck
  • 15. Shutdown, remove the DVD or USB, and boot. Your system should appear now!

DONE, SYSTEM INSTALLED!


Dual booting with Windows

Some manufactures EFI implementations cause GRUB not to be showed in the Boot Menu, or even if its there it can't be made default.

In such cases install rEFInd

Refind.png

There are two ways to install rEFInd-

1.Install rEFInd from its website [3] (detailed) or use pacman-

sudo pacman -S refind-efi

Files will be present in /usr/share/refind .

2.Or just use mine here Extract the contents of the zip file.

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-

/boot/efi/EFI/Boot/

Note-

My ESP (EFI System Partition) is mounted at /boot/efi.

You need to copy these files to the Boot folder on your EFI partition, and the Boot folder itself will be present inside the EFI folder on the EFI Partition, so take note of it.

Now inside this boot folder, there will already be a file present-

bootx64.efi

You need to rename it to windows.bootx64.efi Then you should 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.

Note-

a folder Manjaro(name could be some other also) containing the file grubx64.efi should also be present in /boot/efi/EFI/ folder

The rEFInd 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.

rEFInd Manjaro Icon File:Grubx64.png


Feedback:

Questions, suggestions, critics? Please post here: [4]

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