Omarchy on Arch Linux: Dual Boot Setup with Windows 11
I was thinking of setting up an Ollama service on my desktop pc because I have a 4080 Super GPU that’s been sitting idle for ages (that machine’s been off for months) and I wanted to give omarchy a try, but still be able to jump into windows if I needed (I have software that only runs on windows, mostly guitar plugins)
Preparation for dual-boot. Shrinking my C: drive
This computer only has 1 drive, a 1tb M2 SSD. So I needed to make some space and then shrink the disc to have a few GB available for the linux partition.
I managed to free 600GB, but for some reason the disk utility only allowed me to shrink the disc by 2GB, and that wont cut it!
Troubleshooting the available space for shrinking
I did tried several things at once to figure out if any of those may do the trick: Disabled system protection, disabled hibernate, disabled virtual memory (paging file), and run a disk optimization task.
None of those steps did anything for me, maybe they gave me a few extra GB but still I was not able to get anything closer to the the 600GB that should be available.
I guess the problem was related with the fragmentation of the free space. So I downloaded “defraggler” a software that makes that operation easy as 2 clicks. I got anxius and stopped the fragmentation after 1% of progress lol, but that was already enough! I got 500GB+ available for shrinking.
Here are the steps in more detail of what I did
So I went ahead and prepared 250GB of free space for the arch linux partition.
Bootable arch image
I used Rufus to make a bootable usb with the Arch distro. I tried first with the new .iso of omarchy, but the configuration for the disk partition that I wanted to use was limited, I think it just tries with the default disk configuration from archinstall.
Downloaded both, rufus and the latest arch image from archlinux.org, made the usb bootable for GPT (UEFI), you can check if you need to use MBR or GPT from the diskutil itself by doing Right-click your Disk 0 (not the C: partition, but the disk itself) → Properties → Volumes tab.
Making the disk partitions, pre-installation of arch
I spent a lot of time experimenting with this step. So once you boot arch from the USB bootable drive, you can do some pre-installation in the terminal.
I tried formating the partitions beforehand, and encrypting the main partition with luksFormat, but archinstall actually expects the partion to be unmounded, unformated and uncripted for the manual partition option.
So what I did is
- Ran
lsblk
to check the name of my disk, nvme0n1 in my case, with 4 partitions nvme0n1p1, nvme0n1p2, nvme0n1p3 and nvme0n1p4 - Ran
cfdisk /dev/nvme0n1
- Selected the free space
- Created one partition with 1 GB of space in FAT32 format for the boot partition (im using a different one than the boot partition that windows uses to prevent windows from messing around with the boot loader)
- Created one more partition (nvme0n1p6) with all space left
Archinstall
Then in archinstall at Disk configuration I choose Manual Partition, and selected the nvme0n1p5
of 1gb to be the boot partition: mounted at /boot
, marked it to be formated, the filesystem was already ok in that one.
Then did the steps for the main partition nvme0n1p6
: mounted it at just /
, marked it to be formated, filesystem to ext4 (I forgot about Btrfs which is suggested by omarchy, you may want to use that filesystem instead!)
Then I selected the encryption to be luks for that partition. The encryption is suggested for omarchy, and also this is the step that requires the partition to not be mounted or pre-encrypted.
Fill the other config options, choose a bootloader (I choose grub), make sure to create a sudo user, choose pipewire for audio, at network config choose Copy ISO network config
and you are ready to go and proceed with the install.
When it finishes you may want to choose chroot into installation for post-installation configurations
. I did this to make sure that grub is properly installed because I read that it was the case a few months ago.
After-install config
Here you can already start installing packages and configuring your arch installation. I only wanted to install grub, I followed this video
sudo pacman -S grub efibootmgr dosfstools mtools
Then install grub with this command
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
Then generate the grub configuration file
grub-mkconfig -o /boot/grub/grub.cfg
After that just in case I installed packages for curl and git.
Adding windows boot loader into grub
After running shutdown now
and starting the system again, grub shows up but without windows just yet, just like in the video that I am following for grub, so it was expected and not a problem.
Select archlinux from grub
Once you are in, from the terminal find and edit the grub configuration file that is located at /etc/default/grub
Here I modified GRUB_TIMEOUT
to be 30 and then at the bottom of the file uncommented the line GRUB_DISABLE_OS_PROBER=false
Now with that change saved, recreating the grub configuration file will now pickup the windows bootloader.
Run sudo grub-mkconfig -o /boot/grub/grub.cfg
and now it should output that if found windows boot manager and it will add it to the boot menu entries.
Installing omarchy
Now you can just follow the omarchy installation with curl -fsSL https://omarchy.org/install | bash
In my case I had a few issues with nvidia drivers because I had installed the regular propietary drivers before this, while debugging the error and figuring out that this was the issue I cloned the omarchy repository and read the sh script that installs nvidia drivers.
Debugging the installation is pretty easy because its just shell scripts.
I uninstalled the conflicting package, and proceed with the one suggested in the omarchy script.
This time I just ran the install.sh script from the omarchy repository locally.
Success
And that’s it! rebooting now shows arch and windows in the grub bootloader, and omarchy is ready to go too.
I had to configure pipewire to prevent cracking sounds because the bitrate of my audio device (I have my speakers connected in my audio interface, a Focusrite scarlett solo), and had to fight a little bit with my bluetooth headphones too (tried this
yay -S pipewire wireplumber pipewire-pulse pipewire-alsa
and after a restart it worked)
It’s been fun and I like it as the environment for running and hosting some of my experiments, but my daily driver is still going to be my macbook. Linux is fun but most of the software that I use its been developed for MacOS first, and even if I make it work on linux/arch or try an alternative, is just not the same, and it adds in to the excuses that I have to procastinate, because sadly I enjoy figuring out and debugging stuff too much.
But hey, I will be often in this env too, and I am really glad that there are communities and projects like omarchy around that really cares about developer experience.