Installing Omarchy to an external USB device & troubleshooting boot issues
Over the past week or so, I’ve been test driving Omarchy as my primary OS. Omarchy is an opinionated Arch Linux distribution that ships with the modern tiling window manager Hyprland, something I had been interested in trying for some time. I wanted to install Omarchy to an external USB drive so that I could fall back to my existing Arch Linux installation on my internal drive if I ran into any issues. After the initial installation process seemed to complete successfully, I encountered boot failures that prevented the system from starting properly.
The problem: failed root mount on boot
After successfully installing Omarchy 2.0 to an external USB device, I encountered the following error during boot:
1
2
3
ERROR: Failed to mount ' ' on real root.
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
The issue in this case was that the bootloader could not locate or mount the encrypted root partition. To fix the issue, I needed to:
- Fix the kernel command line parameters in the Limine bootloader configuration so that I could mount and boot to the partition on my USB device
- Update the Limine configuration so that future updates to the kernel/OS did not break the bootloader configuration
Prerequisites
To fix the issue, you will need the following:
- Access to the emergency shell or another Linux system
- Root privileges on the system
- Basic understanding of Linux block devices and mounting
In my case, I was able to to fix the issue by booting to the existing Arch installation on my internal disk, but you could also do this by booting to a live CD environment for any linux distro.
Step-by-step solution
1. Identify block devices
First, identify the USB device with Omarchy and its partitions:
1
lsblk
The expected output should look similar to:
1
2
3
4
5
6
7
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 232.9G 0 disk
├─sda1 8:1 0 2G 0 part
└─sda2 8:2 0 230.9G 0 part
nvme0n1 259:0 0 465.8G 0 disk
├─nvme0n1p1 259:1 0 300M 0 part /boot/efi
├─nvme0n1p2 259:2 0 456.7G 0 part
In this example, sda represents the external USB device with:
sda1: Boot partition (2GB)sda2: Encrypted root partition (230.9GB)
2. Mount the boot partition
Mount the boot partition to access the Limine bootloader configuration:
1
sudo mount /dev/sda1 /mnt/
Replace
/dev/sda1with your actual boot partition device path if different.
3. Retrieve the root partition UUID
Get the UUID of your encrypted root partition:
1
sudo blkid /dev/sda2
This command will output something like:
1
/dev/sda2: UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="crypto_LUKS" PARTUUID="..."
Copy the UUID value as you’ll need it for the next step.
4. Update Limine configuration
Edit the Limine bootloader configuration file, /mnt/limine.conf, and locate the boot entry for Omarchy. Update the kernel_cmdline parameter with the following configuration:
1
kernel_cmdline: cryptdevice=UUID=YOUR_UUID_HERE:root root=/dev/mapper/root rootflags=subvol=@ rootfstype=btrfs rw quiet splash
Replace
YOUR_UUID_HEREwith the actual UUID you obtained in step 3.
Explanation of kernel parameters
cryptdevice=UUID=...:root: Specifies the encrypted deviceroot=/dev/mapper/root: Sets the root filesystem location after decryptionrootflags=subvol=@: Mounts the Btrfs subvolume named “@” as rootrootfstype=btrfs: Specifies Btrfs as the root filesystem typerw: Mounts the root filesystem as read-writequiet splash: Suppresses verbose boot messages and shows a splash screen
5. Configure persistent boot parameters
To ensure future kernel updates maintain the correct boot parameters and don’t get overwritten, edit the Limine entry tool configuration file /etc/limine-entry-tool.conf. Add or update the following line:
1
KERNEL_CMDLINE[default]+="cryptdevice=UUID=YOUR_UUID_HERE:root root=/dev/mapper/root rootflags=subvol=@ rootfstype=btrfs rw quiet splash"
Replace
YOUR_UUID_HEREwith the actual UUID you obtained in step 3.
The configuration you specify on this line should match the bootloader configuration from step 4 and ensures that whenever the kernel is updated, the correct boot parameters are automatically applied.
Verification and testing
After making these changes:
- Unmount the boot partition:
1
sudo umount /mnt Reboot your system and select the USB device from your BIOS/UEFI boot menu
- The system should now boot successfully and prompt for your encryption password
Troubleshooting
If the system doesn’t prompt for the encryption password:
- Verify the UUID in your configuration matches the output of
blkid - Ensure the
cryptdeviceparameter syntax is correct - Check that the necessary kernel modules for encryption are loaded
Conclusion
This was a minor stumbling block when setting up Omarchy for the first time; once I was able to fix the bootloader I was able to get up and running with Omarchy with no issues on my Framework 13 laptop.
Questions or comments? Sign in with GitHub to comment below!