DEV Community

loading...
Cover image for Turn your Manjaro into Arch

Turn your Manjaro into Arch

kabirnayeem99 profile image Naimul Kabir ・4 min read

Manjaro To Arch Conversation

Manjaro is one of the most popular Linux distro, no confusion here. Its easy installation process, supportive hardware with easy Arching makes it so much popular. Manjaro is the best choice for those beginners who wants to use Arch in any way. But there's some annoyance about Manjaro too. Manjaro is not as bleeding edge as Arch - holds back the update for some time, often breaks by switching DE, and a little bit bloated. So, users may later want to switch over to arch, but still fears the hassle of Arch Installation Process. This is a guide for those who want to install arch with less hassle or wants to switch over to Arch from Manjaro.

Step 1: Changing the Pacman Configuration

Pacman, using libalpm, will attempt to read pacman.conf each time it is invoked. This configuration file is divided into sections or repositories. Each section defines a package repository that Pacman can use when searching for packages in - sync mode. The exception to this is the options section, which defines global options.
First, create a backup of your pacman.conf file by
sudo cp /etc/pacman.conf /etc/pacman.conf.bak
and then change your /etc/pacman.conf as below.

#
# /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
# 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
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    = Never
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

Enter fullscreen mode Exit fullscreen mode

Step 2: Change Your Mirrors

Go to the Pacman Mirrorlist Generator, select your country and hit the Generate button. And then paste generated lines in your /etc/pacman.d/mirrolist file. It will look like this-

# Arch Linux repository mirror list
# Generated on 2019–11–26
# Please use 'pacman-mirrors -id' To reset custom mirrorlist
# Please use 'pacman-mirrors -c all' To reset custom mirrorlist
# To remove custom config run 'pacman-mirrors -c all'
# Bangladesh
Server = http://mirror.xeonbd.com/archlinux/$repo/os/$arch
# India
Server = http://mirror.cse.iitk.ac.in/archlinux/$repo/os/$arch
Server = https://ind.mirror.pkgbuild.com/$repo/os/$arch
Enter fullscreen mode Exit fullscreen mode

Step 3: Change Manjaro Related ETC files

Etc usually contains the configuration files for all the programs that run on your Linux/Unix system.

a) Remove Manjaro Release file

sudo cp /etc/manjaro-release /etc/manjaro-release.bak
And then Uninstall Manjaro Release file by
sudo pacman -Rns manjaro-release

b) Backing Up pacman-mirrors.conf

sudo mv /etc/pacman-mirrors.conf /etc/pacman-mirrors.conf.bak

c) Change os-release file

The os-release file contains the necessary information for operating system identification. It is set by the operating system vendor. Change /etc/os-release file like below:

NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="20;2;20;222;202"
HOME_URL="https://www.archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO=archlinux
Enter fullscreen mode Exit fullscreen mode

d) Change the issue file

The file /etc/issue is a text file which contains a message or system identification to be printed before the login prompt. Change the /etc/issue file like below:

Arch Linux \r (\l)
Enter fullscreen mode Exit fullscreen mode

e ) Change lsb-release file

Change /etc/lsb-release file like below

LSB_VERSION=1.4
DISTRIB_ID=Arch
DISTRIB_RELEASE=rolling
DISTRIB_DESCRIPTION="Arch Linux"
Enter fullscreen mode Exit fullscreen mode

Step 4: Do an update

Do an update by running sudo pacman -Syyu and if it asks to replace any packages do so. and install some packages like pacman, systemd, your DE again by running sudo pacman -S <package name>.

Step 5: Install and Uninstall Some Packages

Install kernel and other necessary packages by running
sudo pacman -Scc && sudo pacman -S linux-lts linux-lts-headers acpi_call-dkms tlp pacman-mirrors grub
Uninstall all the packages related to Manjaro, such as Manjaro alsa and others. And reinstall some of the removed dependency, like installing pulseaudio and alsa-lib again.

Step 6: Bug fixing

Run sudo tlp usb to stop mouse freezing.
Open /etc/default/grub file and change the GRUB_DISTRIBUTION to "Arch" and update-grub by running
sudo grub-mkconfig -o /boot/grub/grub.cfg
Restart your computer and you will find that your computer is running Arch now. Let people know that you are now a ARCH USER.
If you face any problems, please let me know.

Discussion (2)

pic
Editor guide
Collapse
awesomehaircut profile image
Zucy

Hello, I'm just now finishing converting manjaro to llinux.

Just a headsup for anyone trying this in the future: it's a little outdated. There's a few details missing here and there. Nothing that stops you.

This is a great starting point but there's a few spots you'll run into problems. Do not blindly follow this tutorial. If you can't install Arch because the documentation is too difficult to read and understand, converting to Arch will not go much better.

You need to know how to install Arch from scratch and you need to know how to configure it if you want to use it. Because if you don't you will have a very hard time.

Again, this is a great starting point and I'm very thankful the authored published it :)

Collapse
kabirnayeem99 profile image
Naimul Kabir Author

Thanks a lot for your appreciation. And as I didn't update this for one year, whomever wants do this, they should first consider what this man has said.