Grub Installation


In this article, on computers with Pardus operating system installed with btrfs file system grub How to install the bootloader will be explained. To the Pardus btrfs installation article mentioned as the 1st part of the article here you can reach. In addition, an example of using timeshift in btrfs system will be given.


Grand Unified Bootloader (Great Unified Bootloader) or GNU GRUB (briefly GRUB), which is used to load operating systems at computer startup. free It is a boot software. GNU Billis part of. GRUBAllows the operating system to load and boot. On computers with more than one operating system installed (for example, Windows and Pardus etc.) brings a menu to the screen at computer startup, allowing the user to switch between these operating systems.

Pardus operating system is a system developed on Debian stable base and comes with ext4 file system in standard installation. Actually by Pardus developers Pardus Startup Repair named grub A great application has been made that brings together many useful features such as setup, chroot. But for now there is no btrfs system support. We wish this support to come as soon as possible, thank you to the developers. We wish you continued success and success in your work.

Installation Steps

Let's log in to the live desktop with Pardus Employee. Then let's open the terminal and continue with the following codes.

sudo su - apt update apt install btrfs-progs os-prober

In order to be able to operate on the boot partition and the disk partition on which the system is installed, let's create a subdirectory under a suitable mount point and mount the @ partition, which is the root directory of the btrfs system, to this subdirectory with the following commands.

mkdir /mnt/pardus mount -t btrfs -o subvol=@ /dev/vda3 /mnt/pardus


In the system, our disk is listed as vda. It may be listed as sda or nvme0n1 for you. Edit the command accordingly.

Now let's mount the efi partition and edit the necessary codes for chroot migration. Let's log into the btrfs system with chroot and check the efi partition.

mount /dev/vda1 /mnt/pardus/boot/efi modprobe efivarfs for i in dev dev/pts sys proc run; do mount --bind /$i /mnt/pardus/$i; done chroot /mnt/pardus/ mount -t efivarfs efivarfs /sys/firmware/efi/efivars efibootmgr -v

Now it's time to edit the fstab file.


fstab is a system file commonly found in the /etc directory on Unix and Unix-like computer systems. On Linux, it is part of the util-linux package. The fstab file typically lists all available partitions and other file system types and data sources that do not need to be disk-based, and shows how to initialize or integrate them into the larger file system structure. The fstab file is read by the mount command, which happens automatically at boot time to determine the overall file system structure.

nano / etc / fstab

/ etc / fstab

Example of fstab organized by btrfs system

# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # systemd generates mount units based on this file, see systemd.mount(5). # Please run 'systemctl daemon-reload' after making changes here. # # # / was on /dev/sda2 during installation UUID=2ed97873-259d-4973-8b70-0601cf6693f1 / btrfs noatime,space_cache,compress=zstd,ssd,discard=async,subvol=@ 0 0 UUID=2ed97873-259d-4973- 8b70-0601cf6693f1 /home btrfs noatime,space_cache,compress=zstd,ssd,discard=async,subvol=@home 0 0 # /boot/efi was on /dev/sda1 during installation UUID=4EC5-446B /boot/efi vfat umask =0077 0 1


At this stage, it is very important that you correct your partition uuids in the relevant lines. Otherwise you'll be stuck with black screens.


We can learn the partition uuid both with the Disks (gnome-disks) application and from the command line. As in the example picture.

After finishing necessary editing in fstab file Ctrl+X keyboard key combination E Press the button to save the file and exit.

Now if you are asking grub install and then grub We write the update commands.

grub-install /dev/vda update-grub

Grub Now that the installation process is complete, let's separate the sections we connected. First, let's exit the chroot, respectively, unmount the efi and other system partitions.

exit umount /mnt/pardus/boot/efi for i in run proc sys dev/pts dev; do umount -lf /mnt/pardus/$i; done umount /mnt/pardus exit

You can now reboot the system. Pardus splash screen will welcome you.

Usage with Btrfs Timeshift

You have logged in as a user and you will now start using the system. But I'll remind you for a minute why we went to all this trouble to set up a btrfs system :)

Let's open the terminal and start writing the codes right away.


It doesn't come with both btrfs-progs and timeshift installed. First of all, we will install these packages.

sudo apt update sudo apt install btrfs-progs timeshift

Now let's list the partitions, followed by the btrfs subpartitions, and take a look at the situation.

lsblk sudo btrfs subvolume list .

Let's run the Timeshift application either from the Applications menu or from the command line. When the application is run for the first time, the Setup Wizard welcomes and guides us. BTRFS detected the system and automatically made the selection accordingly.


With the setup wizard, you can specify the location where backups will be made, the backup plan, and whether user directories should be included in the backup.


The create button can now get your system food and this process will be completed in a very short time depending on the hardware speed.

Now let's take a look at the timeshift backups in the terminal with the btrfs subpartitions again.

sudo btrfs subvolume list . sudo timeshift --list

Let's also update the system and then apply a pre-update scenario. Before the update, a backup was created with timeshift.


It is seen that some package updates, including the kernel update, are coming to the system.


We did the update process, restarted the computer, when we checked, it seems that the updates including the new kernel were applied.


A backup of the updated system was created.


Then back to the pre-update backup.


After rebooting, when checking for updates, it was seen that the update packages were listed again. At the same time, it created another backup with the possibility of undoing the timeshifted operation. Best of all, all these processes were completed in seconds :)

Hope it will be useful, see you in other articles...