{"id":23313,"date":"2024-10-25T00:09:12","date_gmt":"2024-10-24T21:09:12","guid":{"rendered":"https:\/\/kifarunix.com\/?p=23313"},"modified":"2024-10-25T00:09:15","modified_gmt":"2024-10-24T21:09:15","slug":"install-ubuntu-24-04-with-uefi-and-software-raid-1","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-ubuntu-24-04-with-uefi-and-software-raid-1\/","title":{"rendered":"Install Ubuntu 24.04 with UEFI and Software RAID 1"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1035\" height=\"584\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/ubuntu24-04-uefi-raid-1.png?v=1729804065\" alt=\"ubuntu 24.04 RAID 1 and UEFI\" class=\"wp-image-23344\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/ubuntu24-04-uefi-raid-1.png?v=1729804065 1035w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/ubuntu24-04-uefi-raid-1-768x433.png?v=1729804065 768w\" sizes=\"(max-width: 1035px) 100vw, 1035px\" \/><\/figure>\n\n\n\n<p>In this tutorial, we will guide you through the process to install Ubuntu 24.04 with UEFI and Software RAID 1. <strong>UEFI<\/strong> (Unified Extensible Firmware Interface) is the modern replacement for the traditional BIOS, offering improved security and faster boot times, making it the preferred choice for new installations. Software <a href=\"https:\/\/en.wikipedia.org\/wiki\/RAID\" target=\"_blank\" rel=\"noreferrer noopener\">RAID<\/a> 1 on the other hand is an implementation of Software Redundant Array of Independent Disks that mirrors data across two drives, creating an exact copy on each. This setup not only enhances data redundancy but also improves read performance, allowing for continued access to your data even if one drive fails.<\/p>\n\n\n\n<p>By the end of this tutorial, you will have a fully functional Ubuntu 24.04 system configured with RAID 1, ensuring that your data is safeguarded against single-drive failures. Whether you are a seasoned Linux user or a newcomer, this step-by-step guide will equip you with the knowledge and skills needed to set up a reliable and efficient system. Let\u2019s get started!<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#install-ubuntu-24-04-with-uefi-and-software-raid-1\">Install Ubuntu 24.04 with UEFI and Software RAID 1<\/a><ul><li><a href=\"#create-ubuntu-24-04-machine-with-raid-drives-and-uefi\">Create Ubuntu 24.04 Machine with RAID Drives and UEFI <\/a><\/li><li><a href=\"#launch-installation\">Launch Installation<\/a><\/li><li><a href=\"#guided-storage-configuration\">Guided Storage Configuration<\/a><\/li><li><a href=\"#initialize-raid-drives-as-boot-devices\">Initialize RAID Drives as Boot Devices<\/a><\/li><li><a href=\"#setup-raid-1-on-the-drives\">Setup RAID 1 on the Drives<\/a><\/li><li><a href=\"#creating-system-partitions-on-raid-1\">Creating System Partitions on RAID 1<\/a><\/li><li><a href=\"#proceed-with-ubuntu-24-04-os-installation-on-raid-1-drives\">Proceed with Ubuntu 24.04 OS installation on RAID 1 drives<\/a><\/li><li><a href=\"#confirm-ubuntu-24-04-os-disk\">Confirm Ubuntu 24.04 OS Disk<\/a><\/li><li><a href=\"#make-boot-devices-redundant\">Make Boot Devices Redundant<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-ubuntu-24-04-with-uefi-and-software-raid-1\">Install Ubuntu 24.04 with UEFI and Software RAID 1<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"create-ubuntu-24-04-machine-with-raid-drives-and-uefi\">Create Ubuntu 24.04 Machine with RAID Drives and UEFI <\/h3>\n\n\n\n<p>To demonstrate this setup, we will run Ubuntu 24.04 in a KVM virtual machine configured with two drives for the RAID 1 setup and enable UEFI as the machine type.<\/p>\n\n\n\n<p>Drives and Firmware Type:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1028\" height=\"853\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/ubuntu-24.04-RAID-drives-UEFI.png?v=1729784661\" alt=\"install Ubuntu 24.04 with UEFI and Software RAID 1\" class=\"wp-image-23315\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/ubuntu-24.04-RAID-drives-UEFI.png?v=1729784661 1028w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/ubuntu-24.04-RAID-drives-UEFI-768x637.png?v=1729784661 768w\" sizes=\"(max-width: 1028px) 100vw, 1028px\" \/><\/figure>\n\n\n\n<p>Alternatively, this same configuration can be implemented on physical hardware with dedicated drives.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"launch-installation\">Launch Installation<\/h3>\n\n\n\n<p>As usual, launch the installation of the Ubuntu 24.04 machine and go through the process. When you get to the storage configuration part, check the next section below on storage configuration to learn how to setup Ubuntu 24.04 OS with software RAID-1.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"guided-storage-configuration\">Guided Storage Configuration<\/h3>\n\n\n\n<p>To get the flexibility of creating your RAID partitions for your Ubuntu 24.04, select <strong>Custom Storage Layout<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1207\" height=\"973\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/custom-storage-layout.png?v=1729788410\" alt=\"ubuntu 24.04 custom storage layout\" class=\"wp-image-23318\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/custom-storage-layout.png?v=1729788410 1207w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/custom-storage-layout-768x619.png?v=1729788410 768w\" sizes=\"(max-width: 1207px) 100vw, 1207px\" \/><\/figure>\n\n\n\n<p>Click <strong>Done<\/strong> to proceed with storage setup.<\/p>\n\n\n\n<p>Now, this is how the layout is like before configuration.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1056\" height=\"963\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/default-layout.png?v=1729788451\" alt=\"ubuntu 24.04 installer storage layout\" class=\"wp-image-23319\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/default-layout.png?v=1729788451 1056w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/default-layout-768x700.png?v=1729788451 768w\" sizes=\"(max-width: 1056px) 100vw, 1056px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"initialize-raid-drives-as-boot-devices\">Initialize RAID Drives as Boot Devices<\/h3>\n\n\n\n<p>As you can see the message on the screen:<\/p>\n\n\n\n<p><strong>To continue you need to:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Mount a Filesystem at \/<\/strong><\/li>\n\n\n\n<li><strong>Select a boot disk<\/strong><\/li>\n<\/ul>\n\n\n\n<p>So, first of all, you need to initialize the two RAID drives as boot devices. This step is crucial as it determines which device the system will use to boot the operating system. Until you select a boot device and mount FS on \/, installation wont proceed.<\/p>\n\n\n\n<p>Since we are using two drives to configure a RAID 1 for Ubuntu 24.04, select each of the devices (click <strong>\/dev\/vdX<\/strong> or whatever it is, not the <strong>free space<\/strong>) and choose the option, <strong>Use As Boot Device<\/strong>. Remember the purpose of RAID 1 is redundancy, and you need to be able to boot your system if one of the drives gets corrupted.<\/p>\n\n\n\n<p>First Drive:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1074\" height=\"950\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/use-drive-as-boot-device-1.png?v=1729788499\" alt=\"\" class=\"wp-image-23320\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/use-drive-as-boot-device-1.png?v=1729788499 1074w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/use-drive-as-boot-device-1-768x679.png?v=1729788499 768w\" sizes=\"(max-width: 1074px) 100vw, 1074px\" \/><\/figure>\n\n\n\n<p>Second Drive, add as another boot device.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1065\" height=\"976\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/use-drive-as-boot-device-2.png?v=1729788509\" alt=\"use drive as boot device\" class=\"wp-image-23321\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/use-drive-as-boot-device-2.png?v=1729788509 1065w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/use-drive-as-boot-device-2-768x704.png?v=1729788509 768w\" sizes=\"(max-width: 1065px) 100vw, 1065px\" \/><\/figure>\n\n\n\n<p>You will notice that, once you initialize your drives as boot devices, an ESP (UEFI system partition, <strong>\/boot\/efi<\/strong>) is created and mounted.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"setup-raid-1-on-the-drives\">Setup RAID 1 on the Drives<\/h3>\n\n\n\n<p>You will notice that the option to create software RAID as well as LVM is now greyed out. This is because we have set both drives as boot devices.<\/p>\n\n\n\n<p>Therefore, select the <strong>free space<\/strong> on <strong>each<\/strong> device and <strong>add GPT partition<\/strong>.<\/p>\n\n\n\n<p>install Ubuntu 24.04 with UEFI and Software RAID 1<\/p>\n\n\n\n<p>Next, ensure the partition is left <strong>unformatted<\/strong>, since we will need to create RAID on it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1060\" height=\"947\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/leave-partition-unformatted.png?v=1729790301\" alt=\"install Ubuntu 24.04 with UEFI and Software RAID 1\" class=\"wp-image-23323\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/leave-partition-unformatted.png?v=1729790301 1060w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/leave-partition-unformatted-768x686.png?v=1729790301 768w\" sizes=\"(max-width: 1060px) 100vw, 1060px\" \/><\/figure>\n\n\n\n<p>Click <strong>Create<\/strong> to create unformatted partition.<\/p>\n\n\n\n<p>Do the same on the other drive.<\/p>\n\n\n\n<p>Now, again, you see the option to create software RAID as well as LVM is activated.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1057\" height=\"949\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/create-raid-lvm-activated.png?v=1729790338\" alt=\"\" class=\"wp-image-23324\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/create-raid-lvm-activated.png?v=1729790338 1057w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/create-raid-lvm-activated-768x690.png?v=1729790338 768w\" sizes=\"(max-width: 1057px) 100vw, 1057px\" \/><\/figure>\n\n\n\n<p>So, proceed to create RAID 1. Select <strong>&#8220;Create Software RAID (md)&#8221;<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Leave the default name<\/li>\n\n\n\n<li>RAID 1 is selected by default. Leave it with defaults.<\/li>\n\n\n\n<li>Now, select the two unformatted partitions created above to make the RAID.<br><img loading=\"lazy\" decoding=\"async\" width=\"780\" height=\"694\" class=\"wp-image-23325\" style=\"width: 780px;\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/create-raid-1.png\" alt=\"\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/create-raid-1.png?v=1729790428 1066w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/create-raid-1-768x684.png?v=1729790428 768w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/li>\n\n\n\n<li>Click <strong>Create<\/strong> when done.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"creating-system-partitions-on-raid-1\">Creating System Partitions on RAID 1<\/h3>\n\n\n\n<p>At this point, you have two options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Option 1: Creating System Partitions Directly on RAID Device (md0)<\/li>\n\n\n\n<li>Option 2: Creating a Volume Group on RAID Device (md0) on top of which you can create system partitions especially if you want to encrypt the drive.<\/li>\n<\/ul>\n\n\n\n<p>We will go without LVM and create partition direcly on the RAID 1 <strong>md0 <\/strong>device.<\/p>\n\n\n\n<p>So, if you this approach, select the RAID device, <strong>md0<\/strong> free space and click add <strong>add GPT partition<\/strong>.<\/p>\n\n\n\n<p>We will only create the root filesystem partition of EXT4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1059\" height=\"952\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/add-root-fileystem.png?v=1729790606\" alt=\"install Ubuntu 24.04 with UEFI and Software RAID 1\" class=\"wp-image-23326\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/add-root-fileystem.png?v=1729790606 1059w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/add-root-fileystem-768x690.png?v=1729790606 768w\" sizes=\"(max-width: 1059px) 100vw, 1059px\" \/><\/figure>\n\n\n\n<p>If you want, you can create more partitions and respective filesystem types.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1063\" height=\"956\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/boot-device-and-filesystem.png?v=1729790645\" alt=\"\" class=\"wp-image-23327\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/boot-device-and-filesystem.png?v=1729790645 1063w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/boot-device-and-filesystem-768x691.png?v=1729790645 768w\" sizes=\"(max-width: 1063px) 100vw, 1063px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"proceed-with-ubuntu-24-04-os-installation-on-raid-1-drives\">Proceed with Ubuntu 24.04 OS installation on RAID 1 drives<\/h3>\n\n\n\n<p>At this point, you have created and mounted root filesystem as well as boot devices and you are ready to proceed with installation.<\/p>\n\n\n\n<p>Thus, click <strong>done,<\/strong> confirm changes to the drives and continue.<\/p>\n\n\n\n<p>Reboot the system when installation is complete to boot into your Ubuntu 24.04 server with RAID 1 and UEFI!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"confirm-ubuntu-24-04-os-disk\">Confirm Ubuntu 24.04 OS Disk<\/h3>\n\n\n\n<p>If all went well, your system should just boot up normally.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1258\" height=\"894\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/ubuntu-24.04-grub.png?v=1729791278\" alt=\"\" class=\"wp-image-23329\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/ubuntu-24.04-grub.png?v=1729791278 1258w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/ubuntu-24.04-grub-768x546.png?v=1729791278 768w\" sizes=\"(max-width: 1258px) 100vw, 1258px\" \/><\/figure>\n\n\n\n<p>Login and confirm the changes.<\/p>\n\n\n\n<p>Devices:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1015\" height=\"745\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/devices.png?v=1729792068\" alt=\"\" class=\"wp-image-23330\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/devices.png?v=1729792068 1015w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/devices-768x564.png?v=1729792068 768w\" sizes=\"(max-width: 1015px) 100vw, 1015px\" \/><\/figure>\n\n\n\n<p>As you can see, we have the two drives, mounted as \/ under raid 1 configuration.<\/p>\n\n\n\n<p>From the RAID stats;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/prod\/mdstat<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>Personalities : [raid1] [raid0] [raid6] [raid5] [raid4] [raid10] \nmd0 : active raid1 vdb2[1] vda2[0]\n      51292160 blocks super 1.2 [2\/2] [UU]\n      \nunused devices: &lt;none&gt;\n<\/code><\/pre>\n\n\n\n<p>Where:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>md0<\/strong>: This indicates the name of the RAID array.\n<ul class=\"wp-block-list\">\n<li><strong>Active RAID 1<\/strong>: Specifies that the array is configured as RAID 1, which mirrors data across two disks for redundancy.<\/li>\n\n\n\n<li><strong>vdb2[1] vda2[0]<\/strong>: These are the physical devices included in the RAID array:\n<ul class=\"wp-block-list\">\n<li><code>vdb2<\/code> is the second partition of the second virtual disk.<\/li>\n\n\n\n<li><code>vda2<\/code> is the second partition of the first virtual disk.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>[2\/2] [UU]<\/strong>: This indicates the number of active devices in the array:\n<ul class=\"wp-block-list\">\n<li><strong>2\/2<\/strong>: There are two devices present, and both are active.<\/li>\n\n\n\n<li><strong>[UU]<\/strong>: Both devices are functioning correctly (indicated by &#8220;U&#8221; for &#8220;up&#8221;).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"make-boot-devices-redundant\">Make Boot Devices Redundant<\/h3>\n\n\n\n<p>As you can see from our devices screenshot above, the ESP partition that is currently being used is loaded under <strong>\/dev\/vda1<\/strong>. Remember we set both <strong>vda1<\/strong> and <strong>vdb1<\/strong> as boot devices. Now, how to make sure that, if either of the drives crushes, we can still be able to boot into our OS?<\/p>\n\n\n\n<p>As you can see now, <strong>ESP <\/strong> is on <strong>\/boot\/efi<\/strong> is on Drive 1, <strong>\/dev\/vda<\/strong>. Let&#8217;s poweroff the system, and detach the second drive, <strong>\/dev\/vdb<\/strong> and boot to see.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1331\" height=\"869\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/remove-drive-2.png?v=1729794515\" alt=\"\" class=\"wp-image-23334\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/remove-drive-2.png?v=1729794515 1331w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/remove-drive-2-768x501.png?v=1729794515 768w\" sizes=\"(max-width: 1331px) 100vw, 1331px\" \/><\/figure>\n\n\n\n<p>And when we boot, it boots fine.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1304\" height=\"941\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/boot-fine-with-drive-1.png?v=1729794695\" alt=\"\" class=\"wp-image-23335\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/boot-fine-with-drive-1.png?v=1729794695 1304w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/boot-fine-with-drive-1-768x554.png?v=1729794695 768w\" sizes=\"(max-width: 1304px) 100vw, 1304px\" \/><\/figure>\n\n\n\n<p>Drives;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1173\" height=\"572\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/one-drive.png?v=1729794714\" alt=\"\" class=\"wp-image-23336\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/one-drive.png?v=1729794714 1173w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/one-drive-768x375.png?v=1729794714 768w\" sizes=\"(max-width: 1173px) 100vw, 1173px\" \/><\/figure>\n\n\n\n<p>As you can see, one of the RAID drives is out!<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>Personalities : [raid1] [raid0] [raid6] [raid5] [raid4] [raid10] \nmd0 : active raid1 vda2[0]\n      51292160 blocks super 1.2 [2\/1] [U_]\n      \nunused devices: &lt;none&gt;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>vdb2 is out.<\/li>\n\n\n\n<li><strong>[2\/1]<\/strong>: 1 out of 2 devices is active<\/li>\n\n\n\n<li><strong>[U_]<\/strong>: First device is up and running. The second device is missing or not functioning.<\/li>\n<\/ul>\n\n\n\n<p>But, what if vda device goes out! Well, this is a sample result of booting from the drive 2.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1059\" height=\"969\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/cannot-boot-on-drive2.png?v=1729799459\" alt=\"\" class=\"wp-image-23338\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/cannot-boot-on-drive2.png?v=1729799459 1059w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/10\/cannot-boot-on-drive2-768x703.png?v=1729799459 768w\" sizes=\"(max-width: 1059px) 100vw, 1059px\" \/><\/figure>\n\n\n\n<p>As you can see, the <strong>init<\/strong> system is unable to find the boot device that is defined on the <strong>\/etc\/fstab<\/strong> file. Remember, <strong>\/boot\/efi<\/strong> was on \/dev\/vda1 during curtin installation and since we have removed this device or &#8220;this device has crashed&#8221; and the second device, \/dev\/vdb1 UUID was different from \/dev\/vda1 UUID, the init system wont find it and thus it will trigger the &#8220;timed out waiting for dev device&#8221; error.<\/p>\n\n\n\n<p>So, how to ensure that both boot devices, \/dev\/vda1 and \/dev\/vdb1 have the same UUID as defined on fstab?<\/p>\n\n\n\n<p>While the system is booted correctly, with both drives in place, get the fstab contents;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/etc\/fstab<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code># \/etc\/fstab: static file system information.\n#\n# Use 'blkid' to print the universally unique identifier for a\n# device; this may be used with UUID= as a more robust way to name devices\n# that works even if disks are added and removed. See fstab(5).\n#\n# &lt;file system&gt; &lt;mount point&gt;   &lt;type&gt;  &lt;options&gt;       &lt;dump&gt;  &lt;pass&gt;\n# \/ was on \/dev\/md0p1 during curtin installation\n\/dev\/disk\/by-id\/md-uuid-c56bf47a:1eea5e7d:b67dde6b:9edd4170-part1 \/ ext4 defaults 0 1\n# \/boot\/efi was on \/dev\/vda1 during curtin installation\n\/dev\/disk\/by-uuid\/82B2-B77E \/boot\/efi vfat defaults 0 1\n\/swap.img\tnone\tswap\tsw\t0\t0\n<\/code><\/pre>\n\n\n\n<p>Boot device, vda1 UUID is <strong>82B2-B77E<\/strong><\/p>\n\n\n\n<p>Confirm with <strong>blkid<\/strong> command;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>blkid<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\/dev\/vdb2: UUID=\"c56bf47a-1eea-5e7d-b67d-de6b9edd4170\" UUID_SUB=\"59f73e67-4d88-c50e-f881-04448dd254ed\" LABEL=\"ubuntu-server:0\" TYPE=\"linux_raid_member\" PARTUUID=\"08f7f490-c31d-45d6-9a5b-76b721a115e2\"\n<strong>\/dev\/vdb1: UUID=\"82C6-AF47\" BLOCK_SIZE=\"512\" TYPE=\"vfat\" PARTUUID=\"989fc25f-6f49-44b8-be1d-5e36e48672dc\"<\/strong>\n\/dev\/md0p1: UUID=\"28dd75dc-9521-48f2-849b-a85d1bc65010\" BLOCK_SIZE=\"4096\" TYPE=\"ext4\" PARTUUID=\"ff028f11-f996-46ba-9d17-e290c7139d23\"\n\/dev\/vda2: UUID=\"c56bf47a-1eea-5e7d-b67d-de6b9edd4170\" UUID_SUB=\"b9ef4a9f-230c-2038-3676-59bf9e11de4e\" LABEL=\"ubuntu-server:0\" TYPE=\"linux_raid_member\" PARTUUID=\"640af299-ccba-444c-bd60-4ee6dc71f1a3\"\n<strong>\/dev\/vda1: UUID=\"82B2-B77E\" BLOCK_SIZE=\"512\" TYPE=\"vfat\" PARTUUID=\"35a36d5e-88c6-4193-b1f0-48b5f04de14e\"<\/strong>\n<\/code><\/pre>\n\n\n\n<p>As you can see, the two boot devices have different UUID, and yet only one entry can be defined on fstab.<\/p>\n\n\n\n<p>So, to ensure this is same, let&#8217;s clone <strong>\/dev\/vda1<\/strong> to <strong>\/dev\/vdb1<\/strong> so they can have similar properties.<\/p>\n\n\n\n<p><strong>Be cautious while using dd command against devices!! Double check the input and output devices!<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dd if=\/dev\/vda1 of=\/dev\/vdb1  status=progress<\/code><\/pre>\n\n\n\n<p>When done, let&#8217;s confirm the UUIDs of both boot devices.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>blkid | grep -E \"vda1|vdb1\"<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\/dev\/vdb1: <strong>UUID=\"82B2-B77E\"<\/strong> BLOCK_SIZE=\"512\" TYPE=\"vfat\" PARTUUID=\"989fc25f-6f49-44b8-be1d-5e36e48672dc\"\n\/dev\/vda1: <strong>UUID=\"82B2-B77E\"<\/strong> BLOCK_SIZE=\"512\" TYPE=\"vfat\" PARTUUID=\"35a36d5e-88c6-4193-b1f0-48b5f04de14e\"\n<\/code><\/pre>\n\n\n\n<p>Now, they have same UUID for boot devices.<\/p>\n\n\n\n<p>As such, if one of the RAID drives for root filesystem crushes, you should still be able to boot into the other.<\/p>\n\n\n\n<p>Also, our the UEFI boot manager is one and the same, and boot device part UUID is automatically updated based on available device, so no need, I believe, to create bootloader manually on the drive!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>efibootmgr -v<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>BootCurrent: 0001\nTimeout: 0 seconds\nBootOrder: 0002,0001,0000,0003\nBoot0000* UiApp\tFvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)\/FvFile(462caa21-7614-4503-836e-8ab6f4662331)\n      dp: 04 07 14 00 c9 bd b8 7c eb f8 34 4f aa ea 3e e4 af 65 16 a1 \/ 04 06 14 00 21 aa 2c 46 14 76 03 45 83 6e 8a b6 f4 66 23 31 \/ 7f ff 04 00\nBoot0001* UEFI Misc Device\tPciRoot(0x0)\/Pci(0x2,0x4)\/Pci(0x0,0x0){auto_created_boot_option}\n      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 \/ 01 01 06 00 04 02 \/ 01 01 06 00 00 00 \/ 7f ff 04 00\n    data: 4e ac 08 81 11 9f 59 4d 85 0e e2 1a 52 2c 59 b2\nBoot0002* Ubuntu\tHD(1,GPT,35a36d5e-88c6-4193-b1f0-48b5f04de14e,0x800,0x219800)\/File(\\EFI\\ubuntu\\shimx64.efi)\n      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 98 21 00 00 00 00 00 5e 6d a3 35 c6 88 93 41 b1 f0 48 b5 f0 4d e1 4e 02 02 \/ 04 04 34 00 5c 00 45 00 46 00 49 00 5c 00 75 00 62 00 75 00 6e 00 74 00 75 00 5c 00 73 00 68 00 69 00 6d 00 78 00 36 00 34 00 2e 00 65 00 66 00 69 00 00 00 \/ 7f ff 04 00\nBoot0003* EFI Internal Shell\tFvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)\/FvFile(7c04a583-9e3e-4f1c-ad65-e05268d0b4d1)\n      dp: 04 07 14 00 c9 bd b8 7c eb f8 34 4f aa ea 3e e4 af 65 16 a1 \/ 04 06 14 00 83 a5 04 7c 3e 9e 1c 4f ad 65 e0 52 68 d0 b4 d1 \/ 7f ff 04 00\n<\/code><\/pre>\n\n\n\n<p>You can now test by rebooting the machine with single drive. I tested this and OS boots fine with each single drive!<\/p>\n\n\n\n<p>And that is pretty much it on how to install Ubuntu 24.04 with UEFI and Software RAID 1. In our next guide, we will how to create software RAID 1 with LVM encryption and UEFI.<\/p>\n\n\n\n<p>Check out our other tutorials on Ubuntu 24;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/?s=ubuntu+24.04\" target=\"_blank\" rel=\"noreferrer noopener\">Ubuntu 24.04 Howtos<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we will guide you through the process to install Ubuntu 24.04 with UEFI and Software RAID 1. UEFI (Unified Extensible Firmware Interface)<\/p>\n","protected":false},"author":10,"featured_media":23344,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121],"tags":[],"class_list":["post-23313","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/23313"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=23313"}],"version-history":[{"count":15,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/23313\/revisions"}],"predecessor-version":[{"id":23346,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/23313\/revisions\/23346"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/23344"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=23313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=23313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=23313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}