Install METIS the chroot way

METIS Linux is so much minimal that you can even install it using the standard chroot method, similar to distributions such as Arch / Artix. I personally use this method because it allows you to customize your overall installation process, choose a different kernel and stuffs like that.

It is not recommended for individuals who are new to Linux to install METIS Linux using the chroot method. Instead, they are advised to utilize the user-friendly Calamares installer.

In this guide i'll be installing METIS on UEFI system, the process goes the same to BIOS

Assuming you are aleady booted into metislinux ISO and the internet is working fine.

Open terminal with (super + enter) and follow along the below guide.

Initializing the disk

Once you booted into the iso, do lsblk and see on which disk to install metislinux on. I'll be installing on my nvme0n1 drive.

$ lsblk
sda       8:0     0    931.5G  0                                # Hard drive 
sdb       8:16    1    29.3G   0                                # pendrive of metislinux
nvme0n1   259:0   0    119.2G  0 disk                           # installation drive

Creating partitions

  • Use fdisk to create two partition out of the disk, and format the boot partition with mkfs.vfat -F32 and another with mkfs.ext4
  • Now, mount the root partition to /mnt.
  • Create a boot directory inside /mnt (You can also use /boot/efi).
  • Mount the boot partition to /mnt/boot. (if you have made a /boot/efi directory mount it there but it doesn't really matter).

Chroot initial

Install base system

Now, it's time to install the base packages from the repo. run

$ basestrap /mnt base base-devel runit elogind-runit linux-hardened intel-ucode linux-hardened-headers neovim linux-firmware metis-fonts nerd-fonts-jetbrains-mono eww-x11 xclip tmux paru xorg-xinit metis-dwm zathura zathura-pdf-poppler git fzf doas zsh xwallpaper python3 python-pip python-pywal fontconfig xorg-mkfontscale zsh-autosuggestions zsh-syntax-highlighting  zsh-completions xdg-utils xdg-user-dirs zoxide
libnotify grub mpv ffmpeg pipewire pipewire-pulse wireplumber rustup metis-grub-theme neworkmanager networkmanager-runit efibootmgr

Chroot initial

Note, I've installed the very basic packages , you can even filter out on this and choose which to install !!

Generate fstab

Now, it's time to generate fstab of our system.

$ fstabgen -U /mnt /mnt/etc/fstab 

Chroot initial

If you want to create a swap partition, then run

$ dd if=/dev/zero of=/swapfile bs=1G count=2 status=progress

It will create a swapfile of 2GIB, you can adjust by increasing // decreasing the bs,count value. After creating the swapfile, we need to add into our fstab file so that every time we boot into our system, it automatically detects the partition to mount. to do so, just exit out the shell and run

$ fastabgen -U /mnt /mnt/etc/fstab && metis-chroot /mnt

Chroot into the system

Now, chroot into the new system

$ metis-chroot /mnt /bin/bash # this will open a bash(chroot) instance of newly installed system. you can switch to another shell also.

Setup time zone

Now, symlink your localtime and hardwareclock as follows

Chroot initial

$ ln -sf /usr/share/zoneinfo/Asia/kathmandu/  /etc/localtime

here, writer is my machine name and Asia/kathmandu is my localtime.

Install bootloader

After doing this, we can install the grub bootloader as below.

Chroot initial

Adding users

After installing grub, we can add a normal user and give a password to it . to add a normal user run

$ useradd -mG wheel,video,audio,power,dbus,storage <username> #the groups listed here are most necessary ones

now, run

$ passwd root 
$ passwd <normal_user>

to set password of users and now we can give sudo privilege to wheel group users by running the following and uncommenting the line %wheel ALL=(ALL) ALL

$ EDITOR=nvim visudo  

and Now, we can simply reboot the system by unmounting the drives as follows. If everything went well, you'll see a grub menu to select metislinux to boot.

$ exit 
$ umount -Rl /mnt

Setting up services

Runit system is a lil' bit different than other, it uses symlinking feature to enable services in the system. after exiting out of the system, go and login into your newly installed system. if it was an another init system, we could be just enabling the services right after the base install but in runit, we actually symlink the services from /etc/runit/sv/<service_name> to /run/runit/service/<service_name>, eg NetworkManager

To enable NetworkManager we can do the following

$ sudo ln -s /etc/runit/service/NetworkManager /run/runit/service/NetworkManager

It goes similar to any other services

Read more