{"id":1592,"date":"2021-12-16T13:26:27","date_gmt":"2021-12-16T10:26:27","guid":{"rendered":"https:\/\/files2.tojikon.net\/files-cloud\/2021\/04\/22\/how-to-re-install-grub-on-arch-linux\/https:\/\/files2.tojikon.net\/files-cloud\/2021\/04\/22\/how-to-re-install-grub-on-arch-linux\/"},"modified":"2021-12-16T13:26:27","modified_gmt":"2021-12-16T10:26:27","slug":"how-to-re-install-grub-on-arch-linux","status":"publish","type":"post","link":"https:\/\/tojikon.net\/en\/1592-how-to-re-install-grub-on-arch-linux\/","title":{"rendered":"How to re-install Grub on Arch Linux"},"content":{"rendered":"<section id=\"related_posts\">\n<div class=\"block-head\">\n<h3>Related Articles<\/h3>\n<\/div>\n<\/section>\n<p>Is your Arch Linux system\u2019s Grub bootloader broken? Need to re-install it to make your Arch system bootable again? As it turns out, with a quick trick in the Arch Linux installer ISO, you can! In this guide, we\u2019ll show you how!<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-400366 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux.png\" alt=\"\" width=\"1200\" height=\"609\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux.png 1200w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux-4.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux-5.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux-7.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\"\/><\/p>\n<h2>Before we begin<\/h2>\n<p>Fixing Grub in Arch Linux means connecting to the internet over the command-line in the installer. If you use Ethernet, the connection is automatic, and there\u2019s nothing to configure. However, if you use WiFi, you\u2019ll need to connect manually.<\/p>\n<p>To connect to WiFi in the Arch Linux installer, check out the official Wiki. It will walk you through setting up a WiFi connection in the installer.\u00a0<\/p>\n<h2>Downloading Arch Linux ISO and creating USB<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-190897 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux.jpg\" alt=\"\" width=\"1200\" height=\"600\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux.jpg 1200w, https:\/\/www.addictivetips.com\/app\/uploads\/2017\/04\/Arch-Linux-Boot-Menu-300x150.jpg 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux-2.jpg 768w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux-3.jpg 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux-4.jpg 680w\" sizes=\"(max-width: 1200px) 100vw, 1200px\"\/><\/p>\n<p>If you need to reinstall Grub on Arch Linux, you\u2019ll need the installation ISO on USB. If you\u2019ve lost your original installation ISO file, you\u2019ll need to download the ISO and create a new bootable USB.<\/p>\n<p>Note: if you\u2019ve still got your original Arch Linux USB installer, you may skip this section of the guide.\u00a0<\/p>\n<p>To get your hands on the Arch Linux ISO file, head over to ArchLinux.org. Once on the website, find the \u201cDownload\u201d button, and select it with the mouse. You\u2019ll then download your Arch Linux ISO file to the spare PC or Mac you are making your Arch Linux USB on.<\/p>\n<p>With the ISO file downloaded, head over to Etcher.io\u00a0and download the latest version of the app. Etcher is cross-platform and will run on Windows, Mac OS, and any Linux OS.<\/p>\n<p>After downloading Etcher, open it up and follow the step-by-step instructions below to create your new ISO file.\u00a0<\/p>\n<p><strong>Step 1:<\/strong> Find the \u201cFlash from file\u201d button, and click on it with the mouse. When you select the \u201cFlash from file\u201d button, Etcher will open up a file browser window. Using this window, locate the Arch Linux ISO file and select it to add to the app.<\/p>\n<p><strong>Step 2:<\/strong> Insert your USB flash drive into the computer\u2019s USB port. After inserting it, click on the \u201cSelect target\u201d button and open up the device selection area. Then, use it to click on the USB flash drive you\u2019ll use to install the Arch Linux ISO.<\/p>\n<p><strong>Step 3:<\/strong> Locate the \u201cFlash!\u201d button, and click on it with the mouse. Upon clicking on the \u201cFlash!\u201d button, Etcher will begin flashing the Arch Linux ISO file to your USB flash drive.\u00a0<\/p>\n<p>When the flashing is complete, unplug the USB from the spare PC, and plug it into your Arch Linux system. Then, boot into the Arch PC\u2019s BIOS, and set it up to boot from USB.<\/p>\n<h2>Mounting your Arch Linux installation\u00a0<\/h2>\n<p>You must mount your Arch Linux installation in the installer to re-install Grub. To do this, start by running the\u00a0<strong>lsblk\u00a0<\/strong>command. The\u00a0<strong>lsblk\u00a0<\/strong>command will list all attached storage devices on the system.<\/p>\n<p>From here, locate your root partition. In this example, the root partition\u2019s drive label is \/dev\/sda2. Please keep in mind that your root partition will differ. You will need to determine what your root partition is using\u00a0<strong>lsblk<\/strong>.<\/p>\n<p>Once you\u2019ve figured out what your root partition\u2019s drive label is, mount it to the <code>\/mnt<\/code> folder using the <strong>mount\u00a0<\/strong>command.<\/p>\n<pre>\nmount \/dev\/sda2 \/mnt\n<\/pre>\n<p>After mounting the root partition, you will need to mount the boot partition. This part is tricky, and it differs depending on what type of installation your Arch Linux system is.<\/p>\n<h3>UEFI<\/h3>\n<p>If you installed Arch Linux in UEFI mode, you likely have a dedicated UEFI partition of about 512 MB in size or so. In this example, the UEFI boot partition is <strong>\/dev\/sda1<\/strong>\u00a0and mounts at <code>\/boot\/efi\/<\/code> in Arch Linux.<\/p>\n<p>Note: your UEFI boot partition label will differ from the\u00a0<\/p>\n<p>To mount the UEFI partition in the installer, use the following\u00a0<strong>mount\u00a0<\/strong>command.<\/p>\n<pre>\nmount \/dev\/sda1 \/mnt\/boot\/efi\n<\/pre>\n<p>Please keep in mind that each Arch Linux system is different. During the installation, you chose mount points for your UEFI boot partition. If your mount point differs from <code>\/boot\/efi<\/code>, you\u2019ll need to specify this in place of the example command below to be able to access it in the Arch Linux installer.<\/p>\n<p>Can\u2019t figure out where your UEFI partition mounts to? Check out your fstab file with the command below. It outlines where each partition in Arch Linux mounts.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-400364 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux-1.png\" alt=\"\" width=\"1200\" height=\"267\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux-1.png 1200w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux-8.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux-10.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux-11.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\"\/><\/p>\n<pre>\ncat \/mnt\/etc\/fstab\n<\/pre>\n<h3>Non-UEFI<\/h3>\n<p>If you installed Arch Linux in Non-UEFI mode, the bootloader is installed directly to the root partition\u2019s MBR. There\u2019s no need to mount anything other than the root partition to fix grub.<\/p>\n<h2>Re-installing grub<\/h2>\n<p>If your Grub is broken on Arch Linux, you can simply re-install it to fix it. To re-install it, you\u2019ll need to first access your existing Arch Linux system in the Arch Chroot. To do that, enter the\u00a0<strong>arch-chroot\u00a0<\/strong>command below.<\/p>\n<pre>\narch-chroot \/mnt\n<\/pre>\n<p>By entering the command above, you\u2019ll be accessing your Arch Linux installation. From here, Grub can easily be re-installed.\u00a0<\/p>\n<h4>Grub re-install UEFI<\/h4>\n<p>To re-install Grub on a UEFI system, enter the commands below. Remember to change <strong>\u2013efi-directory=\/boot\/efi<\/strong> if your EFI directory isn\u2019t <strong>\/boot\/efi<\/strong>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-400366 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux.png\" alt=\"\" width=\"1200\" height=\"609\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux.png 1200w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux-4.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux-5.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux-7.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\"\/><\/p>\n<pre>\npacman -S grub efibootmgr os-prober\ngrub-install --target=x86_64-efi --efi-directory=\/boot\/efi --bootloader-id=grub\ngrub-mkconfig -o \/boot\/grub\/grub.cfg\n<\/pre>\n<h4>Grub re-install Non-UEFI<\/h4>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-400367 size-full\" src=\"https:\/\/www.addictivetips.com\/app\/uploads\/2021\/04\/install-grub-fs8.png\" alt=\"\" width=\"1200\" height=\"546\" srcset=\"https:\/\/www.addictivetips.com\/app\/uploads\/2021\/04\/install-grub-fs8.png 1200w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux-12.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux-14.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-re-install-grub-on-arch-linux-16.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\"\/><\/p>\n<p>To re-install Grub on a Non-UEFI system, enter the commands below. Be sure to change <strong>\/dev\/sda<\/strong> in the second command to reflect the hard drive you\u2019ve installed Arch Linux on.<\/p>\n<pre>\npacman -S grub\ngrub-install --recheck --target=i386-pc \/dev\/sda\ngrub-mkconfig -o \/boot\/grub\/grub.cfg\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Related Articles Is your Arch Linux system\u2019s Grub bootloader broken? Need to re-install it to make your Arch system bootable again? As it turns out, with a quick trick in the Arch Linux installer ISO, you can! In this guide, we\u2019ll show you how! Before we begin Fixing Grub in Arch Linux means connecting to &hellip;<\/p>\n","protected":false},"author":1,"featured_media":1593,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21],"tags":[33],"_links":{"self":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1592"}],"collection":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/comments?post=1592"}],"version-history":[{"count":0,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1592\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media\/1593"}],"wp:attachment":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media?parent=1592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/categories?post=1592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/tags?post=1592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}