Convert Arch or Arch base to Manjaro
Why would you convert an Arch installation to Manjaro
Your best venue - and the recommended one - is
- Get Manjaro on a stick or DIY
- Backup your home folder
- Make a list of installed packages (Arch Wiki)
comm -23 <(pacman -Qeq | sort) <(pacman -Qgq base base-devel | sort) > your-package-list.txt
- Edit the list of packages, verifying they exist in Manjaro and eliminate any potential trouble.
- Install Manjaro replacing your current system
- Install your list of packages using pacman
sudo pacman -Syu - < your-package-list.txt
THIS IS WORK IN PROGRESS - PROCEED AT OWN RISK
Every system is different, you may gooboo or succeed. They are at best advisories to what is different in Manjaro vs. Arch an how to replace these packages.
There is absolutely no guarantee you will succeed and below steps do not intend to promise you will.
One potential point of disaster is your graphics. On Manjaro drivers are released on a per-kernel-base - so you may need to change to free drivers before attempting any migration.
Test it - preferably on bare-metal (a virtual machine will do for some) - but do not attempt in a production environment unless you are ready to crash and burn.
Before doing anything
Make sure to do a full update of your current system.
sudo pacman -Syu
Mirrorlist
Backup your /etc/pacman.d/mirrorlist. Pick an up-to-date mirror from unstable branch at repo.manjaro.org and edit your mirrorlist. Remove all mirrors and add the chosen mirror e.g.
https://manjaro.moson.eu/unstable/$repo/$arch
Pacman-mirrors
create a file - /etc/pacman-mirrors.conf
/etc/pacman-mirrors.conf
##
## /etc/pacman-mirrors.conf
##
## Branch Pacman should use (stable, testing, unstable)
Branch = unstable
## Generation method
## 1) rank - rank mirrors depending on their access time
## 2) random - randomly generate the output mirrorlist
# Method = rank
## Filename to use when ranking mirrors
## The file must be present in core repo
# TestFile = core.db.tar.gz
## Define protocols and priority
## separated by comma 'https,http' or 'http,https'
## ATM available protocols are: http, https, ftp
## Not specifying a protocol will ban the protocol from being used
## If a mirror has more than one protocol defined only the first is written to the mirrorlist
## Empty means all in reversed alphabetic order
# Protocols =
## When set to False - all certificates are accepted.
## Use only if you fully trust all ssl-enabled mirrors.
# SSLVerify = True
Pacman
backup your /etc/pacman.conf and edit to match manjaro's pacman.conf
/etc/pacman.conf
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
#GPGDir = /etc/pacman.d/gnupg/
#HookDir = /etc/pacman.d/hooks/
HoldPkg = pacman glibc manjaro-system
# If upgrades are available for these packages they will be asked for first
SyncFirst = manjaro-system archlinux-keyring manjaro-keyring
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta = 0.7
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options
#UseSyslog
ILoveCandy
Color
#TotalDownload
# We cannot check disk space from within a chroot environment
CheckSpace
#VerbosePkgLists
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required
# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Manjaro Linux
# packagers with `pacman-key --populate archlinux manjaro`.
#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
# - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.
[core]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
[extra]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
[community]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.
[multilib]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs
Grub
Manjaro grub is different from upstream as it is modified to allow for silent boot.
Backup your default grub config and replace with Manjaro grub cfg. You may need to add a resume argument if you are using hibernate but for simplicity leave it out until you are up and running.
/etc/default/grub
GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=menu
GRUB_DISTRIBUTOR='Manjaro'
GRUB_CMDLINE_LINUX_DEFAULT="quiet udev.log_priority=3 audit=0"
GRUB_CMDLINE_LINUX=""
# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT=true
# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y
# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console
# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command 'videoinfo'
GRUB_GFXMODE=auto
# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
# modes only. Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"
# Uncomment one of them for the gfx desired, a image background or a gfxtheme
GRUB_BACKGROUND="/usr/share/grub/background.png"
#GRUB_THEME="/boot/grub/themes/openbox/theme.txt"
# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"
Migrating
Clear pacman cache
As @dglt has pointed it is wise to clean your pacman cache.
sudo paccache -ruk0
sudo rm -f /var/cache/pacman/pkg/*
Keyrings from Manjaro repo
You need to start with some Manjaro specific
sudo pacman -Syy archlinux-keyring manjaro-keyring --overwrite '*'
Then some vitals
If that goes well you need to install Manjaro's version of pacman
sudo pacman -S pacman pacman-mirrors mhwd manjaro-settings-manager --overwrite '*'
Kernel
If succeeding here you continue with Manjaro grub and kernel
sudo pacman -S linux53 --overwrite '*'
Initramfs
Just to be on the safe run
sudo mkinitcpio -P
Grub
Install Manjaro grub
sudo pacman -S grub --overwrite '*'
Install efi stub
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Manjaro
Generate grub config
sudo grub-mkconfig -o /boot/grub/grub.cfg
If you are still in luck - reboot and hope for the best.
Do a full system update
If you are able to boot - fantastic - do a full system update
sudo pacman -Syu --overwrite '*'
Result
If you reached this point - you are now running Manjaro on unstable branch which is the closest Manjaro gets to pure Arch.
If you want to move to testing or even stable you can do so by changing branch in pacman-mirrors.conf
sudo pacman-mirrors -aS {stable|testing|unstable}
After any change to your mirror list be sure to update your package databases
sudo pacman -Syyu
After a move from unstable to e.g. testing you may have messages from pacman stating you have packages on your system which is newer than the repo.
These messages can be ignored and will disappear in time when packages is snapped to your newly selected branch.
It is possible - but not recommended unless specific instructed in an announcement - to downgrade using the -uu argument to pacman's upgrade command.
sudo pacman -Syyuu