Software & AppsOperating SystemLinux

How To Install Ubuntu 18.04 Desktop with RAID 1 and LVM on UEFI BIOS Machines

Ubuntu 15

In this tutorial, we will be discussing how to install Ubuntu 18.04 Desktop with RAID 1 and LVM on UEFI BIOS machines. This process involves partitioning, setting up RAID 1, configuring Logical Volume Manager (LVM), and installing Ubuntu on the configured system.

Quick Answer

In this tutorial, we have covered the step-by-step process of installing Ubuntu 18.04 Desktop with RAID 1 and LVM on UEFI BIOS machines. This involves partitioning the drives, setting up RAID 1 for redundancy, configuring Logical Volume Manager (LVM), and installing Ubuntu on the configured system. It is a comprehensive process that ensures data protection and flexibility in system configuration.

Prerequisites

Before we begin, you will need:

  • Two identical hard drives.
  • A machine with UEFI BIOS.
  • A bootable USB or CD containing Ubuntu 18.04 Server.

Step 1: Boot From the Installation Media

First, boot your machine from the Ubuntu 18.04 Server installation media. When the installer starts, select “Install Ubuntu Server”.

Step 2: Partitioning the Drives

When you reach the partitioning step, choose the “Manual” option. This will allow you to manually configure your partitions.

First, remove all existing partitions on the drives, including logical volumes and RAID devices.

Next, create a 512MB EFI System Partition (ESP) at the beginning of each drive. This partition is necessary for the UEFI firmware to boot your system.

Then, create a second partition on each drive for the Physical Volume (PV) for RAID.

Step 3: Setting Up RAID 1

Now, we will set up RAID 1. Select “Create MD device” and choose RAID1 with 2 active disks. This will create a mirrored RAID array, meaning that all data will be written identically to both drives. This provides redundancy in case one drive fails.

Step 4: Configuring LVM

Next, we will configure the Logical Volume Manager (LVM). Select “Configure the Logical Volume Manager” and create a volume group (VG) on the RAID device.

Then, create logical volumes (LV) for swap, root, tmp, var, and home. These logical volumes will be used for different parts of your system.

Finally, set the appropriate mount points and file systems for each logical volume. For example, the root logical volume should be mounted at “/”, the home logical volume should be mounted at “/home”, and so on.

Step 5: Completing the Installation

Once you have finished partitioning and setting up LVM, finish partitioning and write the changes to the disk. Then, allow the installation program to complete and reboot the system.

Step 6: Cloning the EFI Partition

After the system reboots, you will need to clone the EFI partition from one drive to the other. This can be done with the dd command:

sudo dd if=/dev/sda1 of=/dev/sdb1

In this command, if specifies the input file (or in this case, the input partition), and of specifies the output file (or output partition). This command will create an exact copy of the EFI partition on the second drive.

Step 7: Updating the Boot Chain

Next, you will need to insert the second drive into the boot chain. This can be done with the efibootmgr command:

sudo efibootmgr -c -d /dev/sdb -p 1 -L "ubuntu2" -l \EFI\ubuntu\shimx64.efi

In this command, -c creates a new boot entry, -d specifies the disk, -p specifies the partition number, -L sets the label, and -l specifies the loader.

Step 8: Removing Unnecessary Wait During Boot

To remove the unnecessary wait during boot caused by the btrfs boot scripts, run the following command:

sudo apt-get purge btrfs-progs

This command removes the btrfs-progs package, which is not needed if you are not using btrfs.

Step 9: Updating the EFI Partition After a Grub Update

Finally, if you update grub-efi-amd64, you will need to update the EFI partition. This can be done with the same dd command used earlier to clone the partition.

Conclusion

In this tutorial, we have covered how to install Ubuntu 18.04 Desktop with RAID 1 and LVM on UEFI BIOS machines. This process involves several steps, but it provides a robust and flexible system configuration. Please remember to always backup your data before making any changes to your disk configuration.

Can I install Ubuntu 18.04 Desktop with RAID 1 and LVM on a machine with a BIOS instead of UEFI?

No, this tutorial is specifically for machines with UEFI BIOS. The process may be different for machines with traditional BIOS.

Do I need two identical hard drives to set up RAID 1?

Yes, RAID 1 requires two identical hard drives to mirror the data. If the drives are not identical, the RAID configuration may not work properly.

Can I use a different Linux distribution instead of Ubuntu 18.04 Desktop?

Yes, you can use a different Linux distribution, but the steps and commands may vary. This tutorial is specifically for Ubuntu 18.04 Desktop.

Can I skip the RAID 1 setup and only use LVM?

Yes, you can skip the RAID 1 setup and only use LVM if you prefer. However, RAID 1 provides redundancy and helps protect your data in case of drive failure.

Can I use this tutorial for Ubuntu 20.04 Desktop?

This tutorial is specifically for Ubuntu 18.04 Desktop. While the steps may be similar for Ubuntu 20.04 Desktop, there may be some differences. It is recommended to refer to the official documentation for the specific version you are using.

Leave a Comment

Your email address will not be published. Required fields are marked *