Skip to content

Instantly share code, notes, and snippets.

@boseji
Last active October 14, 2023 01:06
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save boseji/d14a0b874036cb5b0a0e0ddfd9ceabff to your computer and use it in GitHub Desktop.
Save boseji/d14a0b874036cb5b0a0e0ddfd9ceabff to your computer and use it in GitHub Desktop.
Manjaro Linux : Tips and Tricks (ARCH Linux under the hood)

Manjaro Linux : Tips and Tricks

We have been using Manjaro linux for past year and have been happy with its perfomance. Though we don't use te AUR (Arch User Repository, since many are not supported into Manjaro.

The best part is even with bad / dumb users like myself, IT-DOES-NOT-BREAK. So, we very much recommend Manjaro.

It seriously worked much better than Ubuntu. We might not be able to have all the boat load of software & support like Debian, but we are happy.

Enough talk lets get some Juice !

Secure HTTPS Repository Updates

We know the importance to updates and we also know how important is to take it from correct sources. So after multiple tries we have made a small command. This to get all your Manjaro update repositories correct. And, more importantly Secure Repositories Configured.

sudo pacman-mirrors --api --protocols https --set-branch stable --fasttrack 5

Remove the Cyclic Dependency Problem

Some time you might have seen a warning Warning: Detected cyclic dependency in packages... Here is a command to refresh things and remove that warning:

sudo pacman -Syyu

In case you still face the problem Then run the Secure Repository Update command, then run the above one.

Clean Package Cache

Often there are various connectivity issues during updates. These cause errors in package download. This leads to problems in package installation. Due to integrity issues the packages are not useful. One needs to clean the cache of packages in such event.

pacman stores packages in /var/cache/pacman/pkg/ directory. As many users know its very bad to touch the var directory. Its kind of core in linux.

Here are the commands to clean up all packages except latest versions :

$ sudo paccache -r

Better would be to clean up all the packages :

$ sudo pacman -Scc

Note: This is a dangerous nuke command. It would delete all packages. Be careful while using this !!

Simpler command to do a basic clean-up like remove all uninstalled packages:

$ sudo pacman -Sc

Security Audit Package for Arch Linux

The CVE or Threat levels of packages installed in the system is import to know.

https://github.com/ilpianista/arch-audit

Does this for us.

Install arch-audit :

$ sudo pacman -S arch-audit

To look at vulnerability in the packages use command:

$ arch-audit
Package bzip2 is affected by CVE-2016-3189. Medium risk!
Package curl is affected by CVE-2016-9594, CVE-2016-9586. Update to 7.52.1-1!
Package gst-plugins-bad is affected by CVE-2016-9447, CVE-2016-9446, CVE-2016-9445. High risk!
Package jasper is affected by CVE-2016-8886. Medium risk!
Package libimobiledevice is affected by CVE-2016-5104. Low risk!
Package libtiff is affected by CVE-2015-7554. Critical risk!
Package libusbmuxd is affected by CVE-2016-5104. Low risk!
Package openjpeg2 is affected by CVE-2016-9118, CVE-2016-9117, CVE-2016-9116, CVE-2016-9115, CVE-2016-9114, CVE-2016-9113. High risk!
Package openssl is affected by CVE-2016-7055. Low risk!

In order to find the next upgradable version - use command:

$ arch-audit --upgradable --quiet
curl>=7.52.1-1

Installing Google Chrome

The Reference has been taken from :

https://linuxconfig.org/how-to-install-google-chrome-on-manjaro-18-linux

cd /tmp # Get to the temporary directory for downloading the Package
git clone --recursive https://aur.archlinux.org/google-chrome.git
cd google-chrome/
makepkg -s
# Now it would Start the Download of the Pckage
cp *.xz ~/Downloads/ # Copy the Package to your Desired location

Next right-click on the respective xz file and click on 'Open with Software Installer'. It would begin installation like a Normal package.

Next in a Terminal give the command:

google-chrome-stable

You can mark this as favorite to get a Icon in the Start bar or It would automatically get attached in the Application Menue. So eitherways, your chrome install is done.

Note: For SRWare IRON users

There is no effect on the SRWare Iron's operation. Google Chrome would make a Spearate folder for its configuraiton pieces.

Note: Where to Uninstall Chrome if needed

Open Package Manager -> Click on Installed -> Click on Foreign

Fix UEFI Bootloader Grub in Windows / Manjaro Multiboot

Its more than one instance I found that the Windows nearly killed itself and took down manjaro with it.

Typical of MS (who knows) - but manjaro is Hard to Crash.

Its very much alive only the UEFI boot got corrupted.

Let's work getting Manjaro back online.

Prepare a bootiable UEFI USB-drive for Manjaro

The easy way to do this under windows:

  1. Download Manjaro ISO
    I generally go for the gnome version. You can choose your own.

  2. Download the Rufus tool. Typically v3.5 and above should do the Job.

  3. Use the Rufus tool to create a Manjaro USB

    a. Here you would be asked for Formatting - Use FAT32 without modifying the Cluster size

    b. Make sure to select the GPT Partition Table Option for UEFI to work well

    c. More Details: https://wiki.manjaro.org/index.php?title=UEFI_-_Install_Guide

Fix the Grub Bootloader by Reinstall

Boot into Manjaro USB-Drive Using the Boot Selection by pressing either F8 Key or F12 key on the Key board. For most cases F12 key works.

Next in Open the Terminal window:

  1. List Partitions lsblk -f command.
    This would show all the partitions in the current disk. Genarally it would /dev/sda... where the '...' becomes sda1, sda2 and so on.

  2. Mount the Manjaro Partition Typically this would be the one marked with ext4 type.
    sudo mount /dev/sda8
    Choose the sda.. based on your installation.

  3. Mount the UEFI Partition Typically this would be vfat marked partition. In most cases it should be /dev/sda2. Give the command:
    sudo mount /dev/sda2 /mnt/boot/efi
    Note the /mnt/boot/efi since we are mounting inside our mount point.

  4. Next Go into chroot of the mounted filesystem:
    sudo manjaro-chroot /mnt
    You would end up into a strange sh5.2# like prompt. Not to worry here its your good old trusty Manjaro installation in PC/Laptop HDD.

  5. Give the command to install Manjaro:

    sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
    
  6. Next Give the Command to Update Grub:

    sudo update-grub
    
  7. More insight at
    https://forum.manjaro.org/t/solved-how-to-properly-restore-grub-with-efi-boot/75906/10
    https://wiki.manjaro.org/index.php/Restore_the_GRUB_Bootloader

If you are still facing any problem then try to chage the BIOS UEFI Boot Order

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment