The installer includes semi-automated UEFI installation. This article concerns manual installation.
As Arch-wiki entries are some times too theoretical and offer little practical solution assistance, and since booting uefi systems has caused a headache to users in most linux installations, we dedicate this section as a supplement to the Arch entry. The article is a generous contribution by an Obarun community member marianarlt who has developed a high level of expertise in setting up the bootloader for various UEFI capable or non-Bios systems. In addition an important amendment and bug discovery, in relation to mounting efivarfs, was made by techore in this forum thread and in this forum thread.
As with any other manual you should first read the whole text with attention and then apply the content. When installing Obarun to boot with UEFI make sure you boot your live medium accordingly[1]
Before running % sudo obarun-install
you want to make sure the above requirements are satisfied and you made up your mind about any optional steps. Your installation disk is most probably going to be sda but you should make sure with lsblk
.
The most minimal layout for Obarun on UEFI could be as follows:
Partition | Type | Size | Mountpoint | File System |
---|---|---|---|---|
/dev/sda1 | esp | 550MB+[2] | /efi[3] | Fat32[4] |
/dev/sda2 | root | Rest | / | Ext4 |
More realistically you may want to do something similar to the following though:
Partition | Type | Size | Mountpoint | File System |
---|---|---|---|---|
/dev/sda1 | esp | 550MB+[2:1] | /efi[3:1] | Fat32[4:1] |
/dev/sda2 | swap | 2GB+[5] | Swap | |
/dev/sda3 | root | 30GB+[6] | / | Ext4 |
/dev/sda4 | home | Rest | /home | Ext4 |
Your actual needs may differ and layouts and formats may be changed to accomodate those needs as mentioned before. This example is a tried and safe, easy to configure and maintain, layout. The following instructions will therefore apply to this example.
Please inform yourself well when choosing different file systems and layouts, including encryption.
Log in to the live media shell with user oblive
and password toor
Set up your disk layout (preferably with gdisk).
Make sure you choose the right disk! (
lsblk
when in doubt!)
sudo gdisk /dev/sda
o
.y
.n
.ENTER
then for the ending sector type +550M
and confirm.ef00
and confirm.n
.ENTER
then for the ending sector type +2G
and confirm.8200
and confirm when prompted for the identifier.n
and by now you get the idea, make it the size you want for your root partition.8304
which stands for: Linux x86_64 root (/).8302
which stands for: Linux /home.w
. You will exit out of gdisk.Format the partitions accordingly. You can use labels to make further reference easier (highly recommended; useful for fstab/EFISTUB etc.)
% sudo mkfs.vfat -n ESP /dev/sda1
% sudo mkswap -L SWAP /dev/sda2
% sudo mkfs.ext4 -L ROOT /dev/sda3
% sudo mkfs.ext4 -L HOME /dev/sda4
Mount the partitions to prepare for the installation:
% sudo mount /dev/sda3 /mnt
% sudo mkdir /mnt/boot && mount /dev/sda1 /mnt/boot`
% sudo mkdir /mnt/efi && mount /dev/sda1 /mnt/efi
% sudo mount /dev/sda4 /mnt/home
% sudo swapon /dev/sda2
efivarfs and sysfs-efivars
/sys/firmware/efi/efivars
during boot, then you need to manually mount it to expose UEFI variables to userspace tools like efibootmgr:# mount -t efivarfs efivarfs /sys/firmware/efi/efivars
The above command should be run both outside (before) and inside the chroot, if arch-chroot is not used. Also consult your local documentation on efivar:
man efivar
Make sure you have a network connection established. Arch Wiki>
Run sudo obarun-install
*
yes
when prompted.No
Launch a shell on /mnt (7)
. This will chroot you into your install and let you install additional packages.Choose your bootloader
For the sake of simplicity it is, for now, discouraged to use syslinux for booting layouts other than BIOS/MBR.[8]
This manual provides two easy to set up options for booting a UEFI/GPT scheme for you to choose from.
EFISTUB Arch Wiki
This is just your motherboads integrated UEFI bootloader. That is right. Your UEFI motherboard already got a pretty sophisticated bootloader integrated. Why not just use it?
It makes for a minimalistic and direct boot approach. You configure it to boot right off vmlinuz-linux which is the default Arch Linux EFI application.
Some people find it difficult to set up and maintain but it actually requires less configuration than most bootloaders and just as much when changing your boot entry.
Some EFI implementations, especially early ones, might behave weird when trying to control the UEFI boot menu.
GRUB Arch Wiki
The well known major bootloader of a many Linux distributions. Now that you know that your UEFI already is a bootloader you should understand that installing a dedicated bootloader software to your operating system is actually superfluous.
That is because UEFI will now boot off the GRUB EFI application which in return will chain towards the default Arch EFI application vmlinuz-linux.
Some people find this easier to control though and to set up with multi boot configurations.
Now that you know about both it is up to you to decide. They are both easy to set up.
Make sure to finish the installation as outlined in the Step by Step section and that you are not inside of the obarun-install script!
% sudo efibootmgr -c -d /dev/sda -p 1 -L "Obarun" -l \vmlinuz-linux -u "root=LABEL=ROOT ro resume=LABEL=SWAP quiet initrd=\intel-ucode.img initrd=\initramfs-linux.img"
Any custom kernel parameters go between the brackets of the -u option as demonstrated with the
quiet
parameter. Adjust the microcode to your architecture or delete it from the command.
# 66 Reboot
From here on whenever you want to change the boot entry you would want to delete the existing one with sudo efibootmgr -b 0000 -B
where 0000
must match your Obarun entry and then recreate it with the above command. Refer to the provided links for more details.
% sudo arch-chroot /mnt
Do not use any other command to chroot into the installation!
Make sure you are chrooted with the root user active.
# pacman -S grub
# grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=grub
# grub-mkconfig -o /boot/grub/grub.cfg
# exit
# 66 reboot
From here on whenever you want to change the boot entry you would want to edit /etc/default/grub
and/or the scripts in /etc/grub.d/
and rebuild with the grub-mkconfig
command. Refer to the provided links for more details.
As you see the complicated part with bootloaders in general is the system setup itself. Instructing the bootloader can be a one liner in an UEFI configuration. The Obarun team hopes that this was of help to you. Further information and discussion can be found in the Obarun forum.
To boot your live media in UEFI mode go into your motherboards boot menu after pressing the power button on your PC. This is specific to your motherboard and often shows briefly on the first screen that appears after pressing the power button. Most times it is one of the function Keys F1‑F12. Inside your motherboards boot menu choose to run your live medium with UEFI. The entry will literally say "UEFI" and the device name (most probably a USB flash drive).
If after booting your live medium you're still unsure you may issue ls /sys/firmware/efi/efivars
. If booted in UEFI mode this command will print a lot of names with long numbers else it will print nothing. ↩︎
Don't go smaller on the size for your EFI system partition. It is unnecessary with todays disk sizes and may cause confusion and bugs in older EFI implementations. To learn more about EFI/UEFI in general refer to the very in depth and excellent articles written by Rod Smith, the creator of rEFInd: https://www.rodsbooks.com/efi-bootloaders/principles.html ↩︎ ↩︎
Arch is deprecating the mount point /boot/efi for the ESP in favor of /efi. See Mount_the_partition
It is important to realize that the actual mount point of the ESP does not matter in terms of how the UEFI functions. The ESP will always be searched by the UEFI no matter the mount point, for the EFI application to boot from. The only importance of the mount point is when configuring the bootloader.
The mount point of the GRUB EFI application is passed to the NVRAM entry. That then gets booted by the UEFI which then in return chain loads itself into the vmlinuz-linux EFI application.
EFISTUB uses /boot for convenience as the EFI bootloader will get configured to directly boot the vmlinuz-linux EFI application from that default location. ↩︎ ↩︎ ↩︎
The UEFI specification mandates support for the FAT12, FAT16, and FAT32 file systems (see UEFI specification version 2.8, section 13.3.1.1). Still any conformant vendor can optionally add support for additional file systems as is for example, the firmware in Apple Macs which supports the HFS+ file system). ↩︎ ↩︎
Try to compensate your memory for RAM intensive tasks. If you know you do a lot of memory intensive tasks which require more RAM than you have installed then raise this. You may also lower this or not use any swap at all if you have a lot of RAM. Remember that Arch based Linux distros like Obarun need a swap for hibernation though. ↩︎
When sizing the root partition with a separate home partition think about future system upgrades, huge applications and other things you might install on the road. Don't be too shabby here. ↩︎
Technically that is not correct. By specification the UEFI will search anywhere inside of the EFI system partition for an EFI application called BOOTX64.EFI for 64-bit systems and BOOTIA32.EFI for 32-bit systems. GRUB can even be instructed to install this way which would make NVRAM entries unnecessary. ↩︎
That does not mean you can not boot UEFI/GPT with syslinux. However it still has some limitations as of 2019 and requires some expertise which would imply more overall instructions to this manual. Refer to the Arch Wiki for details. UEFI_Systems ↩︎