Installing Ubuntu Desktop 21.10 on Raid 0
14.02.2022
Some laptops, like the Lenovo T440p has no PCI-Nvme SSD, but it has more than one SATA interface. To be specific: It has one regular 2.5" SATA bay, one via a HDD-Caddy-Adapter and a third one via a 42 mm M.2 SATA interface, if no GSM/LTE-Modem is installed.
So the idea was to use every SATA-port and install Ubuntu on a Raid 0 configuration with mdadm. Ubuntu 21.10 Desktop (and older versions) do not support a Raid configuration during the installation. But the Server installation does. So we are installing a Desktop ontop of a server installation.
These are the needed tools:
- a Laptop with 2 or more SATA drives
- a bootable Ubuntu 21.10 Server installation USB stick
- and a internet connection
Ubuntu 22.04 LTS
Sadly I wasn't able to do the same steps with Ubuntu 22.04 Server. So in order to get Ubuntu 22.04, an installation of Ubuntu 21.10 is needed first and then an upgrade to Ubuntu 22.04.
Ubuntu 21.10
The first steps of the installation do not require special attention. It is only necessary to mention, that the installer has been updated. When the "guided storage configuration" shows up, "custom storage layout" needs to be selected:
If there are still existing partitions, they must be deleted, os it looks something like this:
In this case, I have a 128GB, one 240GB and a 256GB SSD in the laptop. Not the perfect solution for Raid 0, but it is working.
Since mdadm, the raid software, isn't available during boot, one 1GB (or more) partition is need on one drive for the boot process.
The biggest drive gets cut off by around 15GB for the boot partition, which is just a ext4-partition with the mount point on
The other partitions are ~128GB, and 2x ~250GB. It is important, that each partition remains "unformatted":
At the end, the layout should look like this:
Now, the raid-configration via "Create software RAID (md)" is needed. Here, just the Raid level (0 striped) is needed and the empty partitions:
After the Raid was created, just a root partition and a SWAP partition with the sice of the installed memory is needed, so it looks like this:
From this point, the installtion is straight forward:
- providing user information
- and setting the root password
I didn't install any software, since (or at least) the openssh server got automatically uninstalled during the next steps. It can later be reinstalled with:
After the installation was complete and the machine as been rebooted, it needs to be updated and upgraded:
Now, "tasksel" gets installed in order to remove the server componets and adding the Desktop GUI:
"tasksel" can be executed by simply running
On the next screen
got selected (nay other availabe desktop is possible, too) and all other points got unselected e.g.
and/or
It is important not to perform a reboot after "taskel" has finished. With the uninstallation of the server componets, also "mdadm", got removed, which provids the software raid. Without this package, Ubuntu cannot boot. So it is important to reinstall it:
After mdadm is available again, a short scan is needed:
Now, the oupput of
should look like this:
and it is now safe to perfom a reboot.
After a login, it may happen, that no ssids in the WI-FI window are available:
This can be fixed by editing the .yaml files in
(e.g. "00-installer-config.yaml" in my case)
The yaml-file can look like this:
After adding this line to the .yaml-files, the configuration needs to be applied with:
If the ssids are still not shown, a reboot is needed.
So you get a relatively clean Ubuntu installation on a software raid. Of course, the performance is not as great as with a PCI-Nvme-SSD, but it is also better than with a single SATA-SDD.
The raid performance can be tested with the following command:
/dev/md0 can also be replaced with a single SSD-device like "/dev/sda"
This is the result of the individual SSDs in the system:
where sda is the 128GB SSD (Adata SP900), sdb the 256GB (Transcend TS256GMTS430S) one and sdc the 240GB (Intenso High Performance) SSD. This the result of the Raid-0 setup: