{"id":2739,"date":"2024-02-04T18:52:49","date_gmt":"2024-02-04T18:52:49","guid":{"rendered":"https:\/\/hauweele.net\/~gawen\/blog\/?p=2739"},"modified":"2024-02-04T20:35:33","modified_gmt":"2024-02-04T20:35:33","slug":"install-arch-linux-on-efi","status":"publish","type":"post","link":"https:\/\/hauweele.net\/~gawen\/blog\/?p=2739","title":{"rendered":"Install Arch Linux on EFI"},"content":{"rendered":"<p>Most what you will find in this post comes from <a href=\"https:\/\/gist.github.com\/chriscandy\/16899e0d701a05654cb4f79ef2d2d062\">this gist<\/a>. I&#8217;m rewritting this here as a note in any case. Some more info about the installation process <a href=\"https:\/\/wiki.archlinux.org\/title\/installation_guide\">here on ArchWiki<\/a> and also more info about the <a href=\"https:\/\/hauweele.net\/~gawen\/blog\/?p=2710\">post-installation process<\/a>.<\/p>\n<ol>\n<li>Boot USB flash drive and make sure it&#8217;s connected via Ethernet.<\/li>\n<li>Change terminal keys if you are not in qwerty:\n<pre>loadkeys fr<\/pre>\n<\/li>\n<li>Disable the beeping sound (this one will save your ears and sanity):\n<pre>setterm -blength 0<\/pre>\n<\/li>\n<li>Check if the system was booted with UEFI:\n<pre>cat \/sys\/firmware\/efi\/fw_platform_size<\/pre>\n<p>It should exists and be 64 if it&#8217;s booted in UEFI x86_64. If that&#8217;s the case, continue.<\/li>\n<li>Check that you have an IP address and try a ping to check your Internet connectivity:\n<pre>\r\nip address\r\nping 8.8.8.8\r\n<\/pre>\n<\/li>\n<li>Update system clock and check status:\n<pre>\r\ntimedatectl set-ntp true\r\ntimedatectl status<\/pre>\n<\/li>\n<li>Enable SSH, this might be useful if you want to continue the installation from elsewhere or transfer files via sftp:\n<pre>systemctl start sshd<\/pre>\n<\/li>\n<li>List the disks then proceed with creating the partitions:\n<pre>\r\nfdisk -l\r\ncfdisk \/dev\/sda\r\n<\/pre>\n<p>Create a EFI partition of 256M to 512M, a several GB swap partition and what is left with a Linux root partition.<\/li>\n<li>Format the partitions:\n<pre>\r\nmkfs.fat -F32 \/dev\/sda1\r\nmkfs.ext4 -L root -m 0 \/dev\/sda3\r\n<\/pre>\n<\/li>\n<li>Mount the root partition:\n<pre>\r\nmount -o noatime \/dev\/sda3 \/mnt\r\n<\/pre>\n<\/li>\n<li>Install the base packages:\n<pre>\r\npacstrap -Ki \/mnt base linux linux-firmware\r\n<\/pre>\n<\/li>\n<li>Generate the <i>fstab<\/i>:\n<pre>\r\ngenfstab -U -p \/mnt >> \/mnt\/etc\/fstab\r\n<\/pre>\n<\/li>\n<li>Chroot in the filesystem:\n<pre>\r\narch-chroot \/mnt\r\n<\/pre>\n<\/li>\n<li>Configure the terminal keyboard:\n<pre>vim \/etc\/vconsole.conf<\/pre>\n<\/li>\n<li>Set the timezone:\n<pre>\r\nln -sf \/usr\/share\/zoneinfo\/Europe\/Brussels \/etc\/localtime\r\n<\/pre>\n<\/li>\n<li>Update the hardware clock:\n<pre>\r\nhwclock --systohc\r\n<\/pre>\n<\/li>\n<li>Install other packages:\n<pre>\r\npacman -S grub efibootmgr dosfstools openssh os-prober mtools net-tools inetutils netctl dhcpcd dhclient vim\r\n<\/pre>\n<\/li>\n<li>Edit and set-up the locale:\n<pre>\r\nvim \/etc\/locale.gen\r\nlocale-gen\r\n<\/pre>\n<\/li>\n<li>Setup root password:\n<pre>\r\npasswd\r\n<\/pre>\n<\/li>\n<li>Create and mount EFI directory:\n<pre>\r\nmkdir \/boot\/EFI\r\nmount -o noatime \/dev\/sda1 \/boot\/EFI<\/pre>\n<\/li>\n<li>Time to install the GRUB bootloader and write the config:\n<pre>\r\ngrub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck\r\ngrub-mkconfig -o \/boot\/grub\/grub.cfg\r\n<\/pre>\n<\/li>\n<li>If needed you might configure an extra entry within the GRUB boot list, for instance for a dualboot with FreeBSD. To that end, edit <code>\/etc\/grub.d\/40_custom<\/code> and add (at the end of this file):\n<pre>\r\nmenuentry FreeBSD {\r\n  insmod ufs2\r\n  set root='(hd0,gpt3)'\r\n  chainloader \/boot\/loader.efi\r\n}\r\n<\/pre>\n<p>Then update the grub configuration with: <\/p>\n<pre>grub-mkconfig -o \/boot\/grub\/grub.cfg<\/pre>\n<\/li>\n<li>Time to reboot:\n<pre>\r\nexit\r\nreboot\r\n<\/pre>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Most what you will find in this post comes from this gist. I&#8217;m rewritting this here as a note in any case. Some more info about the installation process here on ArchWiki and also more info about the post-installation process. &hellip; <a href=\"https:\/\/hauweele.net\/~gawen\/blog\/?p=2739\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[1137,1138,769,6],"class_list":["post-2739","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-arch","tag-archlinux","tag-install","tag-linux"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2739"}],"version-history":[{"count":0,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2739\/revisions"}],"wp:attachment":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}