• [deleted]

If you had nothing planned for next week here is something to do for you.
These last days I worked on Dracut, ZFS and ZFSBootmenu for Obarun. I got something functional, however everything here it's only for testing purpose within a virtualbox virtual machine and should not be used in a production environment. There is a bit of a hack so that ZFSBootmenu can work properly with Arch Linux kernel. The problem comes from the fact that pacman is unable to manage kernel versioning. For those who are interested to build from scratch a similar environment, just ask and in my spare time I would explain how to do it.

For now, I'm going to explain how to set up the VirtualBox environment and briefly introduce the use of ZFS and ZFSBootmenu. However, note that I'm also learning ZFS and ZFSBootmenu so don't ask too much :) I already have a lot to learn about ZFS.

For information, the virtual drive (vdi) file contains KDE/Plasma graphical environment, it's up to you to install another one, but you have to know that the maximum size of the virtual drive is 20GB.

Ok, so let's start.

Virtualbox

1) Create a virtualbox virtual machine as usually.
2) Open virtualbox Settings > System and check the line Enable EFI (special OSes only)
3) Download Obarun-Plasma-Dracut-ZFS-ZFSBootMenu.tar.xz and Obarun-Plasma-Dracut-ZFS-ZFSBootMenu.tar.xz.SHA512
4) Verify the file integrity and extract the file archive.

The archive contains:
Obarun-Plasma-Dracut-ZFS-ZFSBootMenu.vdi virtual drive file,
Obarun-Plasma-Dracut-ZFS-ZFSBootMenu.vdi.sig signature file,
Obarun-Plasma-Dracut-ZFS-ZFSBootMenu.vdi.SHA512 checksum file.

5) Verify the file integrity and the signature.
6) Start the machine

Refind

1) You should see the Refind bootloader menu.

Obarun-ZFSBootmenu-01.png

2) Press F2 to get the menu as in the screenshot below and select Boot to menu.

Obarun-ZFSBootmenu-02.png

3) Press [ENTER] to get the ZFSBootmenu as in the screenshot below.
4) As you can see, obarun/ROOT/master is selected and our default boot, so press [ENTER] to boot. Login with the password for oblive.

Obarun-ZFSBootmenu-03.png

5) Start Konsole and execute zfs list as in the screenshot below.

Obarun-ZFSBootmenu-04.png

Obarun on ZFS :D

Now, let's take a snapshot to show you how ZFSBootmenu works.

6) Take a snapshot with the command line sudo zfs snapshot obarun/ROOT/master@ 2020-03-01 as in the screenshot below.

Obarun-ZFSBootmenu-05.png

7) Execute zfs list -t snapshot to see the list of our snapshot, as in the screenshot below.

Obarun-ZFSBootmenu-06.png

8) Reboot

ZFSBootmenu

1) From the Refind boot manager, press F2 to get the menu as in the screenshot below and select Boot to menu.

Obarun-ZFSBootmenu-02.png

3) Press [ENTER] to get the ZFSBootmenu as in the screenshot below.

Obarun-ZFSBootmenu-03.png

2) Now press [ALT+S] to see our snapshots as in the screenshot below

Obarun-ZFSBootmenu-07.png

3) Press [ENTER] to create a clone of this snapshot. You should see a new entry as in the screenshot below.
Select obarun/ROOT/master_2020-03-01_000 and press [ALT+D].
This is very important because it's going to set the bootfs value as we will see later.

Obarun-ZFSBootmenu-08.png

As you can see on the top of the screen obarun/ROOT/master_2020-03-01_000 now appears as our default boot.

Obarun-ZFSBootmenu-09.png

4) Press [ENTER} to boot on obarun/ROOT/master_2020-03-01_000

5) Login, open konsole and execute zfs list as in screenshot below.

Obarun-ZFSBootmenu-10.png

6) We can check the value of our bootfs with the command zpool get bootfs obarun as in the screenshot below.

Obarun-ZFSBootmenu-11.png

We can see that bootfs has the value of our clone.

Enjoy the power of ZFS and ZFSBootmenu. :)

Powered by Obarun