This is a brief guide for those happy fixing their own bugs to help convert a Manjaro installation to EndeavourOS. It can be applied to switch to plain Arch too, if you ignore the EOS-specific parts.
Note that this should work fine if you have open-source drivers - if you have NVIDIA you may have to do some other work too.
It’s pretty straightforward if you’re comfortable using the CLI for package management. If you’re not, then you probably shouldn’t try this!
However - do keep in mind that this will not result in a “clean Arch install”, so if you have any weird issues then you’re on your own.
1. Make a backup!
Should be obvious?
2. Catch up with unstable
Make the upgrade gap smaller.
sudo pacman-mirrors -aB unstable
sudo pacman -Syyu
3. Replace mirrors
Pick up a set of Arch mirrors from https://www.archlinux.org/mirrorlist/ , e.g.:
/etc/pacman.d/mirrorlist :
## United Kingdom
Server = https://mirror.netweaver.uk/archlinux/$repo/os/$arch
## Netherlands
Server = https://mirror.mijn.host/archlinux/$repo/os/$arch
Then, add an EndeavourOS repo, e.g.:
/etc/pacman.d/endeavouros-mirrorlist :
## Germany
Server = https://mirror.alpix.eu/endeavouros/repo/$repo/$arch
4. Add EndeavourOS to pacman.conf
(below [multilib])
[endeavouros]
Include = /etc/pacman.d/endeavouros-mirrorlist
5. Import EndeavourOS key
sudo pacman-key --keyserver keyserver.ubuntu.com -r 003DB8B0CB23504F
sudo pacman-key --lsign 003DB8B0CB23504F
6. Remove Manjaro orchestration/customisation packages
sudo pacman -Rdd pacman-mirrors manjaro-release bashrc-manjaro
sudo pacman -Sy pacman pacman-contrib
Note that -Rdd
won’t check for dependencies so you will have to go back later and look over your packages. Yes, -Sy
is normally bad but we’ll fix that next.
7. Upgrade, install kernel, replace overlay packages
Check this list yourself to make sure you’re happy with it. You might want to tweak it:
sudo pacman -Syu linux linux-headers filesystem grub sudo systemd systemd-libs systemd-sysvcompat xorg-server xorg-server-common xorg-server-xwayland yay reflector-simple eos-rankmirrors
Watch out for changes resulting in a .pacsave
Resolve those now, e.g. move the files back into place.
8. Ensure GRUB menu built correctly
Check the output carefully. You might need to e.g.
sudo cp /etc/vconsole.conf.pacsave /etc/vconsole.conf
and re-run
sudo grub-mkconfig -o /boot/grub/grub.cfg
If you want, you could add a GRUB hook to /etc/pacman.d/hooks/grub.hook
:
[Trigger]
Type = File
Operation = Install
Operation = Remove
Target = usr/lib/modules/*/vmlinuz
Target = boot/vmlinuz*
[Action]
Description = Updating Grub-Bootmenu
When = PostTransaction
Exec = /usr/bin/grub-mkconfig -o /boot/grub/grub.cfg
which will do this automatically on kernel changes.
9. Reinstall GRUB
Replace Manjaro’s GRUB boot loader with the Arch boot loader
sudo grub-install /dev/$YOUR-BOOT-DISK
Obviously, check that destination device as you normally would.
10. Check for other Manjaro-specific packages and replace/remove
Check for non-repo packages:
pacman -Qm
Note: this will show AUR packages too!
Check for things like kernel variants. Some packages in Manjaro’s [community] will have AUR equivalents.
Remove and replace as you want, e.g.:
sudo pacman -Rdd $(pacman -Qsq manjaro-) $(pacman -Qsq mhwd)
This is important to check. Don’t just hit Enter.
11. Remove old kernel initramfs files
Removing the Manjaro kernels can leave behind their boot files.
Look under /boot
and remove any files generated by Manjaro’s kernel packages, then regenerate the GRUB config.
12. Check configuration files
For example:
- Merge pacnew using
pacdiff
- Remove
SyncFirst
line from/etc/pacman.conf
13. Set hostname
e.g.
sudo nano /etc/hostname
14. Set locale
e.g.
localectl set-locale en_GB.UTF-8
15. Check vconsole settings
/etc/vconsole.conf, e.g:
KEYMAP=uk
FONT=
FONT_MAP=
16. Update mirrors
reflector-simple
eos-rankmirrors
17. Re-check for updates. Ensure GRUB is correct.
sudo pacman -Syu
sudo grub-mkconfig -o /boot/grub/grub.cfg
18. Make the system identify itself as EndeavourOS (optional)
Check the below discussion for the rationale for this.
sudo pacman -S eos-hooks
19. Reboot
That should be all you need to do. Once booted, tidy the remaining Manjaro kernel and check again for orphans etc.
There may be some other smaller issues cause by lingering configuration differences. Also remember that these might not be common with EOS or Arch, so please don’t report them as bugs to Arch!
If you find any other weird issues, make sure you step through the Arch install guide and make sure all the basics are in place.
20. Final cleaning (optional)
You can use lostfiles
to locate files which don’t belong to a package. Some of these will be fine (e.g. caches) but you may find others which are no longer needed.
You might also find other non-essential packages to switch (e.g. replace steam-native
with steam-native-runtime
).