Announcement

Collapse
No announcement yet.

Kubuntu 20.04 on top of ZFS

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Kubuntu 20.04 on top of ZFS

    Being bored, I decided to see how the Kubuntu 20.04 Plasma desktop runs on top of ZFS.

    Unfortunately, the Kubuntu 20.04 installer does not offer ZFS as a root filesystem.

    So, I decided to re-install virt-manager and install Ubuntu 20.04 as a VM using ZFS as the rfs and then issue
    sudo apt install kubuntu-desktop
    to install KDE and its standard applications. Then I'm going to uninstall KMail, KPIM and baloo.

    Then start playing around.

    EDIT:
    Thanks to Terence for the following link:
    https://openzfs.github.io/openzfs-do...0on%20ZFS.html
    Caveat from the article:
    If you want a single-disk, unencrypted, desktop install, use the installer. It is far easier and faster than doing everything by hand.
    Last edited by GreyGeek; Nov 28, 2020, 12:47 PM. Reason: Add new link and caveat
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    #2
    Dang, GG, I need to get up to Lincoln one of these days. You know how to have a good time!

    Please Read Me

    Comment


      #3
      I guess that's an advantage to being retired - I have to wait for Saturday for such pursuits!

      Please Read Me

      Comment


        #4
        Originally posted by oshunluvr View Post
        I guess that's an advantage to being retired - I have to wait for Saturday for such pursuits!
        Been there, done that. Also LOTS of 3AM stuff as well.

        Originally posted by oshunluvr View Post
        Dang, GG, I need to get up to Lincoln one of these days. You know how to have a good time!
        I've got a steak dinner invitation outstanding for several years. When you drop by we'll hit the Texas Roadhouse!
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #5
          Well, that was easy.
          Had to clear a few roadblocks first.
          I last used Virt-Manager about six month ago, or longer, to try out Deepin, Ubuntudee, and a couple other distros. Then I purged it. Or so I thought. When I attempted to reinstall virt-manager again it failed with "lvm2 error"s.

          I purged lvm2, but still no joy. Doing a "locate lvm" I discovered several disabled and masked services in /etc/systemd's subdirectories. Being masked they were links to /dev/null, so I deleted them. The install of virt-manager completed without any errors indicated. I then created a 50Gb virtHD and installed Ubuntu 20.04 using the zfs option. The install appeared to go well but I noticed that my wireless connection was not connected. Virt-Manager couldn't see it. It saw only my eth0 socket, but that had no cable plugged in. It turned out that the installation of virt-manager failed to create a VirBr0 bridge. That wasn't a problem with 18.04 but apparently it is a problem in K20.04. I plugged in a cat6 cable from my wifi router, which was picked up immediately and then proceeded. I also was given an opportunity to use my Nvidia GT650M card and selected it, but during the boot up it failed, so I had to revert to a virtual Intel driver.

          The first thing I did after I got Ubuntu 20.04 installed was an apt update and full-upgrade. I had read that zsys, Ubuntu's version of Snapper, creates snapshots before apt is run. When I opened a terminal and did "zfs list -t snapshots" what I got was a couple dozen snapshots with cryptic names. I purged zsys because I want to do the snapshots manually, and when I want to do them.
          Click image for larger version

Name:	autozsys_snapshots_1_hour.jpg
Views:	1
Size:	94.1 KB
ID:	644844
          Notice the cryptic names. Obviously, no one can relate any particular snapshot to a particular file of set of files. The system does that for you. When you take a snapshot it makes an entry in grub which links all those files that compose your snapshot. In Ubuntu's version of zfs you cannot overwrite a running system with a snapshot. You have to take it off line first. That's why, to revert to a snapshot you must reboot and call up the grub menu, from which you can select the snapshot you want to use. How do you delete a snapshot and its associated snapshot files? I haven't learned that yet. I haven't learned how you select the collection of snapshots that allow you to rollback to a given point. Lots to learn.

          I then did a "zfs list" to see the file structure.

          Click image for larger version

Name:	ubuntu_and_plasma.jpg
Views:	1
Size:	78.3 KB
ID:	644845
          Viewing that pic you now know everything I know about Ubuntu's zfs file structure.

          I then tried to install the full featured kubuntu-desktop but it failed. So I tried to install the plasma-desktop. It succeeded. But I still couldn't find a way to switch from gdm3 to sddm. I then retried installing kubuntu-desktop and 743 applications later it finished successfully. During its install it asked me which display manager I wanted to use. That's where I selected sddm.

          Then I rebooted. In all its radiant glory, here is the KDE Plasma desktop running on top of zfs.

          Click image for larger version

Name:	Plasma_on_zfs_Ubuntu.jpg
Views:	1
Size:	81.8 KB
ID:	644846

          Now, I'm too old to be smart enough to do this off the top of my empty head. I did some research on the web and found this description of the process: https://www.how2shout.com/how-to/how...ntu-20-04.html

          How's it working? I gave it 50GB., 8GB of RAM and 4 cores. It's a tad slow to boot, a minute instead of 30 seconds, but once the Plasma desktop is up and running everything appears to be as quick as my main system.


          I am going to continue to play with ZFS on this VM until I get bored again. I'm not delusional. Regardless of how much playing I do with it my lack of memory means that next week it will be all new to me again. In fact, were it not for my BTRFS cheat sheet glued to the wall next to my chair I wouldn't even be able to use it. In fact, I could not remember "sddm" so I had to look it up so I wouldn't use the wrong pseudonym for this post. And, I am not going to go through the procedure that link shows for removing KDE from Ubuntu. I'll simply restore from my BTRFS backup snapshot I made before I started this exploration.

          I can make a cheat sheet for ZFS and put it on my wall as well.

          Burt Nijhof made the following comment on a video by Joe Collins about his first attempt to use Ubuntu ZFS:
          Ubuntu add-on zsys has some serious design problems:

          1. Zsys has its own administration of the snapshots and if you use the standard zfs commands for snapshots, the zsys administration will not be updated and you will have two inconsistent snapshot administrations one inside zfs and one in zsys..

          2. It seems to be intended for inexperienced users, but if you just use it, your ~2GB bpool datapool will be full after 30-50 OS updates and the system will halt. You can't detect it as inexperienced user, because bpool seems to be hidden by default in the official release. You will have to delete snapshots using a relative complex zsysctl command. If you use Google to find the zfs snapshot command, you will find the orginal zfs commands and you will create unintentionally the above inconsistencies of point 1.

          3. The names of the snapshot do not give any idea about the which updates are part of the snapshot, so after 10 or so you're completely lost, unless you keep an own administration on e.g. paper about kernel- and app releases being part of each snapshot.

          4. If you create a new user, the dataset USERDATA will not be updated. For the new user no dataset will be created but only a folder. That will create strange effects, especially if using that new user for e.g. system updates (snapshots inconsistencies). That new user will be excluded from own snapshot rollback. On rollback of the original user the second user will also be rolled back together with the first user. In short: Ubuntu is a great distro and zfs is a great file system, but zsys is a poorly designed and incomplete Ubuntu add-on. As a consequence I have deleted zsys and zsysctl and rely on the standard zfs commands. I'm a fanatic Ubuntu user since 2008 and zfs user since 2018, but this Ubuntu zsys add-on to zfs is a real disappointment.
          His comment is the primary reason why I purged zsys.

          https://www.youtube.com/watch?v=l-iu-cutkyQ

          EDIT:
          I knew I'd forget something. When I plug a cat6 cable into my eth0 port I get a good connection, but it screws up my wifi connection and my browser can't find web pages any more.
          Only a reboot restores it. A logout and log back in will not. I haven't experimented with the 9 systemd services related to networking and modem management. It's just quicker to reboot after I shut down virt-manager.
          Last edited by GreyGeek; Jul 22, 2020, 05:31 PM.
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #6
            I decided that if I had to reboot every time I ran the Ubuntu 20.04 ZFS VM I might as well put it on a USB stick and run it from there.
            So, I purged virt-manager and all its dependencies.
            I noticed that Ubuntudde 20.04 had gone gold so I burned it onto a USB stick and then attempted to install it on another 128GB USB stick. Unfortunately that distro does not have a ZFS root install option in the installer.

            It looks like I'll be running Ubuntu 20.04 from a 128GB USB stick in order to continue my ZFS playing.
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              At least you made a good choice on the desktop background image. I use that one also.
              Kubuntu 24.11 64bit under Kernel 6.12.3, Hp Pavilion, 6MB ram. Stay away from all things Google...

              Comment


                #8
                It looks like I won't be installing Ubuntu 20.04 on a 128GB stick (not a LiveUSB but a real installed system).

                I booted my 64GB LiveUSB of Ubuntu 20.04, which became sdd.
                Then I plugged in my 128GB stick, which became sde.

                On the LiveUSB I ran the installer and filled in the timezone and name, and then the experimental ZFS install option. When it came to the drive to use I selected sde and clicked continue. The installer immediately ran up to about 35% complete creating the EXT4 partition (out of 5). Then it didn't move for an hour. The installer said it could take a long time, but an hour seemed too long. I clicked the details button and was presented with a load of errors. User is 999, bus errors, connection errors ... too many to repeat here. And, for good measure, the installer hung and refused to be closed. I had to run the system monitor and look for the installer to get its PID and then use the kill command in a terminal. The mouse never left the "busy" wheel until I logged out and logged back in.

                So, I went DDG'ing for answers and found this website:
                https://www.fosslinux.com/10212/how-...lash-drive.htm

                The only thing it did differently was to use the "Clear" option on the gparted "format" menu, but I followed the steps faithfully anyway. However, after doing that, the installation results were the same. Failure.

                After killing Ubiquity the second time I remembered that zsys creates automatic snapshots when apt is used, so I used it to installl htop and then used the file manager to explore the grub directory. In it I found a shell script with 1,108 lines that had a giant case statement that tried one of three methods to collect the myriad of snapshots that are created by a single snapshot command execution

                Zsys tags all of its snapshots with "autozsys_" and all of the files and folders of a particular snapshot with a alphanumeric suffix.
                Code:
                $ zsysctl show --full
                […]
                  - Name:               rpool/ROOT/ubuntu_e2wti1@[COLOR=#ff0000]autozsys[/COLOR]_[COLOR=#00ff00]k8uf7o[/COLOR]
                    Created on:         2020-05-05 08:35:43
                    Last Booted Kernel: vmlinuz-5.4.0-28-generic
                    System Datasets:
                     - bpool/BOOT/ubuntu_e2wti1@autozsys_k8uf7o
                     - rpool/ROOT/ubuntu_e2wti1@autozsys_k8uf7o
                     - rpool/ROOT/ubuntu_e2wti1/srv@autozsys_k8uf7o
                     - rpool/ROOT/ubuntu_e2wti1/usr@autozsys_k8uf7o
                     - rpool/ROOT/ubuntu_e2wti1/var@autozsys_k8uf7o
                In the above snippet every folder or file that is in either rpool or bpool that is part of the snapshot will have as its identifier "k8uf7o", with "autozsys_" identifying it as an automatic zsys snapshot. I can see why Burt Nijhof posted the comment about zsys. IF I were ever to install and run Ubuntu (or Kubuntu) using ZFS as the root filesystem the first thing I'd do is purge zsys and then use the standard ZFS snapshot commands.

                After I explored the grub subdirectory I logged out and then back in so that the mouse pointer would stop spinning. It did stop spinning but when I returned to the grub subdirectory that "10_ubuntu_zfs" script was gone.

                With BTRFS I can "mv /mnt/@ /mnt/@old" and "mv /mnt/@home /mnt/@homeold", followed by "btrfs su snapshot /mnt/snapshots/@yyyymmdd /mnt/@" (without the '-r' switch, and doing the same for /mnt/@home) and reboot from the terminal very quickly, thus reverting back to @yyyymmdd and @homeyyyymmdd within a minute.

                Thus ends my second foray into Ubuntu ZFS. IMHO, BTRFS is MUCH easier to learn and use, especially when making snapshots and rolling back to one of them. If one wants to extend the subvolumes beyond @ and @home one can create their own, such as /path/@data, mount it to /home/user/data using fstab, and then use it as the location for all their "data", or whatever. Then they can snapshot and rollback that independently of @ or @home.

                Did I mention how simple, easy to use and reliable BTRFS is?
                Last edited by GreyGeek; Jul 23, 2020, 12:35 PM.
                "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                – John F. Kennedy, February 26, 1962.

                Comment


                  #9
                  Thanks for spending the time on testing ZFS. It sounds like it needs some work done on "usability" for the potential end user (like me). I'll wait...
                  Kubuntu 24.11 64bit under Kernel 6.12.3, Hp Pavilion, 6MB ram. Stay away from all things Google...

                  Comment


                    #10
                    Originally posted by TWPonKubuntu View Post
                    Thanks for spending the time on testing ZFS. It sounds like it needs some work done on "usability" for the potential end user (like me). I'll wait...
                    I have no plans on moving off of Kubuntu but I'm keeping an eye on Ubuntu's ZFS to see if and when it becomes a viable alternative to BTRFS for personal use.

                    Having such a large script in the /boot/grub directory is a red flag to me. "Needs lots of work" is the feeling I got while experimenting with it, although admittedly I am a complete noob on ZFS. The first time I tried BTRFS on K16.04 I was up to speed in much less time than I've already used playing with ZFS. Installing kubuntu-desktop on an Ubuntu VM gave me a perfect "KDE on ZFS" system, if only my VM installation hadn't torpedoed my networking. And, when I installed the 743 files of the kubuntu-desktop I'd wager that zsys had a field day creating snapshots of all those packages. I suspect that it may have eaten most of the 40GB virtHD space available. Also, I realized that after purging zsys I didn't know how to identify and/or delete existing zfs snapshots. I've been thinking of installing VirtualBox to see if it can run U20.04 without torpedoing my network.
                    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                    – John F. Kennedy, February 26, 1962.

                    Comment


                      #11
                      Originally posted by GreyGeek View Post
                      I've got a steak dinner invitation outstanding for several years. When you drop by we'll hit the Texas Roadhouse!
                      Sounds awesome! I haven't been in your neck of the woods for quite awhile. I'm gonna be ready for that steak when I get there!

                      Please Read Me

                      Comment


                        #12
                        I don't like losing so I gave virt-manager another go and I am now making this post from my U20.04 VM. I've run several tests of ZFS and captured data relating to it and how it creates entries in the grub.cfg menu.

                        My first snapshot after logging in for the first time:

                        sudo zfs list -t snapshot
                        Code:
                        NAME                                          USED  AVAIL     REFER  MOUNTPOINT
                        rpool/USERDATA/jerry_r7h6kl@autozsys_n6xia1   208K      -     1.68M  -
                        sudo cat /boot/grub/gfxblacklist.txt

                        Code:
                        # [B]GRUB gfxpayload blacklist[/B].  The format is a sequence of lines of the
                        # following form, using lower-case hexadecimal for all ID components:
                        #
                        #   vVENDORdDEVICEsvSUBVENDORsdSUBDEVICEbcBASECLASSscSUBCLASS
                        #
                        # Blacklist lines are regex-matched (currently using Lua's string.find with
                        # the line surrounded by ^ and $) against a corresponding PCI ID string.  In
                        # practice this means that you can replace any part of the ID string with .*
                        # to match anything.
                        #
                        # There is no need to customise this file locally.  If you need to disable
                        # gfxpayload=keep on your system, just add this line (uncommented) to
                        # /etc/default/grub:
                        #
                        #   GRUB_GFXPAYLOAD_LINUX=text
                        
                        v15add0710.*
                        v15add0405.*
                        v80eedbeef.*
                        v1002d6738.*
                        Doing my first update & upgrade:

                        Code:
                        [B]sudo apt update[/B]
                        Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease
                        Get:2 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [111 kB]              
                        Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [107 kB]               
                        Get:4 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease [98.3 kB]           
                        Hit:5 http://archive.ubuntu.com/ubuntu focal-proposed InRelease                         
                        Fetched 317 kB in 1s (257 kB/s)                          
                        Reading package lists... Done
                        Building dependency tree       
                        Reading state information... Done
                        8 packages can be upgraded. Run 'apt list --upgradable' to see them.
                        
                        [B]sudo apt full-upgrade[/B]
                        Reading package lists... Done
                        Building dependency tree       
                        Reading state information... Done
                        Calculating upgrade... Done
                        The following packages will be upgraded:
                          libpam-modules libpam-modules-bin libpam-runtime libpam0g libvncclient1
                          python-apt-common python3-apt python3-pil
                        8 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                        Need to get 171 kB/979 kB of archives.
                        After this operation, 1,024 B of additional disk space will be used.
                        Do you want to continue? [Y/n] 
                        Get:1 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 python-apt-common all 2.0.0ubuntu0.20.04.1 [17.4 kB]
                        Get:2 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 python3-apt amd64 2.0.0ubuntu0.20.04.1 [154 kB]
                        Fetched 171 kB in 1s (263 kB/s)      
                        Requesting to save current system state
                        [B]Successfully saved as "autozsys_[COLOR=#ff0000]xw170v[/COLOR]"[/B]
                        Preconfiguring packages ...
                        .....
                        Setting up python3-apt (2.0.0ubuntu0.20.04.1) ...
                        Processing triggers for man-db (2.9.1-1) ...
                        Processing triggers for libc-bin (2.31-0ubuntu9) ...
                        [B]ZSys is adding automatic system snapshot to GRUB menu[/B]
                        jerry@jerryZFS:~$

                        Installing synaptic:
                        Code:
                        [B]sudo apt install synaptic[/B]
                        Reading package lists... Done
                        Building dependency tree       
                        Reading state information... Done
                        The following additional packages will be installed:
                          libept1.6.0 libxapian30
                        Suggested packages:
                          xapian-tools dwww menu deborphan apt-xapian-index tasksel
                        The following NEW packages will be installed:
                          libept1.6.0 libxapian30 synaptic
                        0 upgraded, 3 newly installed, 0 to remove and 6 not upgraded.
                        Need to get 1,362 kB of archives.
                        After this operation, 6,346 kB of additional disk space will be used.
                        Do you want to continue? [Y/n] 
                        Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libept1.6.0 amd64 1.1+nmu3ubuntu3 [79.6 kB]
                        Get:2 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libxapian30 amd64 1.4.14-2 [661 kB]
                        Get:3 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 synaptic amd64 0.84.6ubuntu5 [622 kB]
                        Fetched 1,362 kB in 0s (3,310 kB/s)
                        Requesting to save current system state
                        [B]Successfully saved as "autozsys_[COLOR=#ff0000]hkcg8x[/COLOR]"[/B]
                        Selecting previously unselected package libept1.6.0:amd64.
                        (Reading database ... 143733 files and directories currently installed.)
                        Preparing to unpack .../libept1.6.0_1.1+nmu3ubuntu3_amd64.deb ...
                        Unpacking libept1.6.0:amd64 (1.1+nmu3ubuntu3) ...
                        Selecting previously unselected package libxapian30:amd64.
                        Preparing to unpack .../libxapian30_1.4.14-2_amd64.deb ...
                        Unpacking libxapian30:amd64 (1.4.14-2) ...
                        Selecting previously unselected package synaptic.
                        Preparing to unpack .../synaptic_0.84.6ubuntu5_amd64.deb ...
                        Unpacking synaptic (0.84.6ubuntu5) ...
                        Setting up libxapian30:amd64 (1.4.14-2) ...
                        Setting up libept1.6.0:amd64 (1.1+nmu3ubuntu3) ...
                        Setting up synaptic (0.84.6ubuntu5) ...
                        Processing triggers for mime-support (3.64ubuntu1) ...
                        Processing triggers for hicolor-icon-theme (0.17-2) ...
                        Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
                        Processing triggers for libc-bin (2.31-0ubuntu9) ...
                        Processing triggers for man-db (2.9.1-1) ...
                        Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
                        [B]ZSys is adding automatic system snapshot to GRUB menu[/B]
                        jerry@jerryZFS:~$

                        sudo zfs list -t snapshot
                        Code:
                        NAME                                                               USED  AVAIL     REFER  MOUNTPOINT
                        bpool/BOOT/ubuntu_cfgs2t@autozsys_[COLOR=#ff0000][B]hkcg8x [/B][/COLOR]                            0B      -     90.2M  -
                        bpool/BOOT/ubuntu_cfgs2t@autozsys_[B][COLOR=#ff0000]xw170v[/COLOR][/B]                             0B      -     90.2M  -
                        rpool/ROOT/ubuntu_cfgs2t@autozsys_hkcg8x                          58.4M      -     2.35G  -
                        rpool/ROOT/ubuntu_cfgs2t@autozsys_xw170v                          25.1M      -     2.35G  -
                        rpool/ROOT/ubuntu_cfgs2t/srv@autozsys_hkcg8x                         0B      -       96K  -
                        rpool/ROOT/ubuntu_cfgs2t/srv@autozsys_xw170v                         0B      -       96K  -
                        rpool/ROOT/ubuntu_cfgs2t/usr@autozsys_hkcg8x                         0B      -       96K  -
                        rpool/ROOT/ubuntu_cfgs2t/usr@autozsys_xw170v                         0B      -       96K  -
                        rpool/ROOT/ubuntu_cfgs2t/usr/local@autozsys_hkcg8x                   0B      -      128K  -
                        rpool/ROOT/ubuntu_cfgs2t/usr/local@autozsys_xw170v                   0B      -      128K  -
                        rpool/ROOT/ubuntu_cfgs2t/var@autozsys_hkcg8x                         0B      -       96K  -
                        rpool/ROOT/ubuntu_cfgs2t/var@autozsys_xw170v                         0B      -       96K  -
                        rpool/ROOT/ubuntu_cfgs2t/var/games@autozsys_hkcg8x                   0B      -       96K  -
                        rpool/ROOT/ubuntu_cfgs2t/var/games@autozsys_xw170v                   0B      -       96K  -
                        rpool/ROOT/ubuntu_cfgs2t/var/lib@autozsys_hkcg8x                  23.3M      -      475M  -
                        rpool/ROOT/ubuntu_cfgs2t/var/lib@autozsys_xw170v                   164K      -      475M  -
                        rpool/ROOT/ubuntu_cfgs2t/var/lib/AccountsService@autozsys_hkcg8x     0B      -      104K  -
                        rpool/ROOT/ubuntu_cfgs2t/var/lib/AccountsService@autozsys_xw170v     0B      -      104K  -
                        rpool/ROOT/ubuntu_cfgs2t/var/lib/NetworkManager@autozsys_hkcg8x     88K      -      132K  -
                        rpool/ROOT/ubuntu_cfgs2t/var/lib/NetworkManager@autozsys_xw170v     88K      -      132K  -
                        rpool/ROOT/ubuntu_cfgs2t/var/lib/apt@autozsys_hkcg8x              6.70M      -     73.0M  -
                        rpool/ROOT/ubuntu_cfgs2t/var/lib/apt@autozsys_xw170v               100K      -     67.1M  -
                        rpool/ROOT/ubuntu_cfgs2t/var/lib/dpkg@autozsys_hkcg8x             1.64M      -     31.2M  -
                        rpool/ROOT/ubuntu_cfgs2t/var/lib/dpkg@autozsys_xw170v             1.48M      -     31.2M  -
                        rpool/ROOT/ubuntu_cfgs2t/var/log@autozsys_hkcg8x                  1.21M      -     2.03M  -
                        rpool/ROOT/ubuntu_cfgs2t/var/log@autozsys_xw170v                  1.20M      -     2.09M  -
                        rpool/ROOT/ubuntu_cfgs2t/var/mail@autozsys_hkcg8x                    0B      -       96K  -
                        rpool/ROOT/ubuntu_cfgs2t/var/mail@autozsys_xw170v                    0B      -       96K  -
                        rpool/ROOT/ubuntu_cfgs2t/var/snap@autozsys_hkcg8x                    0B      -      120K  -
                        rpool/ROOT/ubuntu_cfgs2t/var/snap@autozsys_xw170v                    0B      -      120K  -
                        rpool/ROOT/ubuntu_cfgs2t/var/spool@autozsys_hkcg8x                   0B      -      112K  -
                        rpool/ROOT/ubuntu_cfgs2t/var/spool@autozsys_xw170v                   0B      -      112K  -
                        rpool/ROOT/ubuntu_cfgs2t/var/www@autozsys_hkcg8x                     0B      -       96K  -
                        rpool/ROOT/ubuntu_cfgs2t/var/www@autozsys_xw170v                     0B      -       96K  -
                        rpool/USERDATA/jerry_r7h6kl@[B]autozsys_[COLOR=#ff0000]n6xia1[/COLOR][/B][COLOR=#ff0000] [/COLOR]                       208K      -     1.68M  -
                        rpool/USERDATA/jerry_r7h6kl@autozsys_hkcg8x                        184K      -     1.72M  -
                        rpool/USERDATA/jerry_r7h6kl@autozsys_xw170v                        620K      -     1.80M  -
                        rpool/USERDATA/root_r7h6kl@autozsys_hkcg8x                           0B      -      112K  -
                        rpool/USERDATA/root_r7h6kl@autozsys_xw170v                           0B      -      112K  -

                        /boot/grub/grub.cfg now contains the following script:
                        Code:
                        #
                        # DO NOT EDIT THIS FILE
                        #
                        # It is automatically generated by grub-mkconfig using templates
                        # from /etc/grub.d and settings from /etc/default/grub
                        #
                        
                        ### BEGIN /etc/grub.d/00_header ###
                        if [ -s $prefix/grubenv ]; then
                          set have_grubenv=true
                          load_env
                        fi
                        if [ "${initrdfail}" = 2 ]; then
                           set initrdfail=
                        elif [ "${initrdfail}" = 1 ]; then
                           set next_entry="${prev_entry}"
                           set prev_entry=
                           save_env prev_entry
                           if [ "${next_entry}" ]; then
                              set initrdfail=2
                           fi
                        fi
                        if [ "${next_entry}" ] ; then
                           set default="${next_entry}"
                           set next_entry=
                           save_env next_entry
                           set boot_once=true
                        else
                           set default="0"
                        fi
                        
                        if [ x"${feature_menuentry_id}" = xy ]; then
                          menuentry_id_option="--id"
                        else
                          menuentry_id_option=""
                        fi
                        
                        export menuentry_id_option
                        
                        if [ "${prev_saved_entry}" ]; then
                          set saved_entry="${prev_saved_entry}"
                          save_env saved_entry
                          set prev_saved_entry=
                          save_env prev_saved_entry
                          set boot_once=true
                        fi
                        
                        function savedefault {
                          if [ -z "${boot_once}" ]; then
                            saved_entry="${chosen}"
                            save_env saved_entry
                          fi
                        }
                        function initrdfail {
                            if [ -n "${have_grubenv}" ]; then if [ -n "${partuuid}" ]; then
                              if [ -z "${initrdfail}" ]; then
                                set initrdfail=1
                                if [ -n "${boot_once}" ]; then
                                  set prev_entry="${default}"
                                  save_env prev_entry
                                fi
                              fi
                              save_env initrdfail
                            fi; fi
                        }
                        function recordfail {
                          set recordfail=1
                          if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
                        }
                        function load_video {
                          if [ x$feature_all_video_module = xy ]; then
                            insmod all_video
                          else
                            insmod efi_gop
                            insmod efi_uga
                            insmod ieee1275_fb
                            insmod vbe
                            insmod vga
                            insmod video_bochs
                            insmod video_cirrus
                          fi
                        }
                        
                        if [ x$feature_default_font_path = xy ] ; then
                           font=unicode
                        else
                        insmod part_msdos
                        insmod fat
                        if [ x$feature_platform_search_hint = xy ]; then
                          search --no-floppy --fs-uuid --set=root  CE53-4F67
                        else
                          search --no-floppy --fs-uuid --set=root CE53-4F67
                        fi
                            font="/grub/unicode.pf2"
                        fi
                        
                        if loadfont $font ; then
                          set gfxmode=auto
                          load_video
                          insmod gfxterm
                          set locale_dir=$prefix/locale
                          set lang=en_US
                          insmod gettext
                        fi
                        terminal_output gfxterm
                        if [ "${recordfail}" = 1 ] ; then
                          set timeout=30
                        else
                          if [ x$feature_timeout_style = xy ] ; then
                            set timeout_style=hidden
                            set timeout=0
                          # Fallback hidden-timeout code in case the timeout_style feature is
                          # unavailable.
                          elif sleep --interruptible 0 ; then
                            set timeout=0
                          fi
                        fi
                        ### END /etc/grub.d/00_header ###
                        
                        ### BEGIN /etc/grub.d/05_debian_theme ###
                        set menu_color_normal=white/black
                        set menu_color_highlight=black/light-gray
                        ### END /etc/grub.d/05_debian_theme ###
                        
                        ### BEGIN /etc/grub.d/10_linux ###
                        ### END /etc/grub.d/10_linux ###
                        
                        ### BEGIN /etc/grub.d/10_linux_zfs ###
                        [B]function gfxmode[/B] {
                            set gfxpayload="${1}"
                            if [ "${1}" = "keep" ]; then
                                set vt_handoff=vt.handoff=1
                            else
                                set vt_handoff=
                            fi
                        }
                        if [ "${recordfail}" != 1 ]; then
                          if [ -e ${prefix}/gfxblacklist.txt ]; then
                            if hwmatch ${prefix}/gfxblacklist.txt 3; then
                              if [ ${match} = 0 ]; then
                                set linux_gfx_mode=keep
                              else
                                set linux_gfx_mode=text
                              fi
                            else
                              set linux_gfx_mode=text
                            fi
                          else
                            set linux_gfx_mode=keep
                          fi
                        else
                          set linux_gfx_mode=text
                        fi
                        export linux_gfx_mode
                        function zsyshistorymenu {
                            # $1: root dataset (eg rpool/ROOT/ubuntu_2zhm07@[COLOR=#000000][B]autozsys_[/B][/COLOR][COLOR=#ff0000][B]k56fr6[/B][/COLOR])
                            # $2: boot device id (eg 411f29ce1557bfed)
                            # $3: initrd (eg /BOOT/ubuntu_2zhm07@autozsys_k56fr6/initrd.img-5.4.0-21-generic)
                            # $4: kernel (eg /BOOT/ubuntu_2zhm07@autozsys_k56fr6/vmlinuz-5.4.0-21-generic)
                            # $5: kernel_version (eg 5.4.0-21-generic)
                        
                            set root_dataset="${1}"
                            set boot_device="${2}"
                            set initrd="${3}"
                            set kernel="${4}"
                            set kversion="${5}"
                        
                            menuentry 'Revert system only' --class ubuntu --class gnu-linux --class gnu --class os ${menuentry_id_option} 'gnulinux-${root_dataset}-${kversion}' {
                                recordfail
                                load_video
                                gfxmode ${linux_gfx_mode}
                                insmod gzio
                                if [ "${grub_platform}" = xen ]; then insmod xzio; insmod lzopio; fi
                                if [ ${boot_device} = /dev/vda6 ]; then
                                    insmod part_msdos
                                    insmod zfs
                                    if [ x$feature_platform_search_hint = xy ]; then
                                      search --no-floppy --fs-uuid --set=root  818315f17ad8499c
                                    else
                                      search --no-floppy --fs-uuid --set=root 818315f17ad8499c
                                    fi
                                fi
                                linux    ${kernel} root=ZFS=${root_dataset} ro  quiet splash ${vt_handoff} 
                                initrd    ${initrd}
                            }
                            menuentry 'Revert system and user data' --class ubuntu --class gnu-linux --class gnu --class os ${menuentry_id_option} 'gnulinux-${root_dataset}-${kversion}' {
                                recordfail
                                load_video
                                gfxmode ${linux_gfx_mode}
                                insmod gzio
                                if [ "${grub_platform}" = xen ]; then insmod xzio; insmod lzopio; fi
                                if [ ${boot_device} = /dev/vda6 ]; then
                                    insmod part_msdos
                                    insmod zfs
                                    if [ x$feature_platform_search_hint = xy ]; then
                                      search --no-floppy --fs-uuid --set=root  818315f17ad8499c
                                    else
                                      search --no-floppy --fs-uuid --set=root 818315f17ad8499c
                                    fi
                                fi
                                linux    ${kernel} root=ZFS=${root_dataset} ro  quiet splash ${vt_handoff} zsys-revert=userdata
                                initrd    ${initrd}
                            }
                            menuentry 'Revert system only (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os ${menuentry_id_option} 'gnulinux-${root_dataset}-${kversion}' {
                                recordfail
                                load_video
                                insmod gzio
                                if [ "${grub_platform}" = xen ]; then insmod xzio; insmod lzopio; fi
                                if [ ${boot_device} = /dev/vda6 ]; then
                                    insmod part_msdos
                                    insmod zfs
                                    if [ x$feature_platform_search_hint = xy ]; then
                                      search --no-floppy --fs-uuid --set=root  818315f17ad8499c
                                    else
                                      search --no-floppy --fs-uuid --set=root 818315f17ad8499c
                                    fi
                                fi
                                echo Loading Linux ${kversion} ...
                                linux    ${kernel} root=ZFS=${root_dataset} ro recovery nomodeset  
                                echo 'Loading initial ramdisk ...'
                                initrd    ${initrd}
                            }
                            menuentry 'Revert system and user data (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os ${menuentry_id_option} 'gnulinux-${root_dataset}-${kversion}' {
                                recordfail
                                load_video
                                insmod gzio
                                if [ "${grub_platform}" = xen ]; then insmod xzio; insmod lzopio; fi
                                if [ ${boot_device} = /dev/vda6 ]; then
                                    insmod part_msdos
                                    insmod zfs
                                    if [ x$feature_platform_search_hint = xy ]; then
                                      search --no-floppy --fs-uuid --set=root  818315f17ad8499c
                                    else
                                      search --no-floppy --fs-uuid --set=root 818315f17ad8499c
                                    fi
                                fi
                                echo Loading Linux ${kversion} ...
                                linux    ${kernel} root=ZFS=${root_dataset} ro recovery nomodeset  zsys-revert=userdata
                                echo 'Loading initial ramdisk ...'
                                initrd    ${initrd}
                            }
                        }
                        
                        menuentry 'Ubuntu 20.04.1 LTS' --class ubuntu --class gnu-linux --class gnu --class os ${menuentry_id_option} 'gnulinux-rpool/ROOT/ubuntu_cfgs2t-5.4.0-42-generic' {
                            recordfail
                            load_video
                            gfxmode ${linux_gfx_mode}
                            insmod gzio
                            if [ "${grub_platform}" = xen ]; then insmod xzio; insmod lzopio; fi
                            insmod part_msdos
                            insmod zfs
                            if [ x$feature_platform_search_hint = xy ]; then
                              search --no-floppy --fs-uuid --set=root  818315f17ad8499c
                            else
                              search --no-floppy --fs-uuid --set=root 818315f17ad8499c
                            fi
                            linux    /BOOT/ubuntu_cfgs2t@/vmlinuz-5.4.0-42-generic root=ZFS=rpool/ROOT/ubuntu_cfgs2t ro  quiet splash ${vt_handoff} 
                            initrd    /BOOT/ubuntu_cfgs2t@/initrd.img-5.4.0-42-generic
                        }
                        submenu 'Advanced options for Ubuntu 20.04.1 LTS' ${menuentry_id_option} 'gnulinux-advanced-rpool/ROOT/ubuntu_cfgs2t' {
                            menuentry '* Ubuntu 20.04.1 LTS, with Linux 5.4.0-42-generic' --class ubuntu --class gnu-linux --class gnu --class os ${menuentry_id_option} 'gnulinux-rpool/ROOT/ubuntu_cfgs2t-5.4.0-42-generic' {
                                recordfail
                                load_video
                                gfxmode ${linux_gfx_mode}
                                insmod gzio
                                if [ "${grub_platform}" = xen ]; then insmod xzio; insmod lzopio; fi
                                insmod part_msdos
                                insmod zfs
                                if [ x$feature_platform_search_hint = xy ]; then
                                  search --no-floppy --fs-uuid --set=root  818315f17ad8499c
                                else
                                  search --no-floppy --fs-uuid --set=root 818315f17ad8499c
                                fi
                                echo Loading Linux 5.4.0-42-generic ...
                                linux    /BOOT/ubuntu_cfgs2t@/vmlinuz-5.4.0-42-generic root=ZFS=rpool/ROOT/ubuntu_cfgs2t ro  quiet splash ${vt_handoff} 
                                echo 'Loading initial ramdisk ...'
                                initrd    /BOOT/ubuntu_cfgs2t@/initrd.img-5.4.0-42-generic
                            }
                            menuentry '* Ubuntu 20.04.1 LTS, with Linux 5.4.0-42-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os ${menuentry_id_option} 'gnulinux-rpool/ROOT/ubuntu_cfgs2t-5.4.0-42-generic' {
                                recordfail
                                load_video
                                insmod gzio
                                if [ "${grub_platform}" = xen ]; then insmod xzio; insmod lzopio; fi
                                insmod part_msdos
                                insmod zfs
                                if [ x$feature_platform_search_hint = xy ]; then
                                  search --no-floppy --fs-uuid --set=root  818315f17ad8499c
                                else
                                  search --no-floppy --fs-uuid --set=root 818315f17ad8499c
                                fi
                                echo Loading Linux 5.4.0-42-generic ...
                                linux    /BOOT/ubuntu_cfgs2t@/vmlinuz-5.4.0-42-generic root=ZFS=rpool/ROOT/ubuntu_cfgs2t ro recovery nomodeset  
                                echo 'Loading initial ramdisk ...'
                                initrd    /BOOT/ubuntu_cfgs2t@/initrd.img-5.4.0-42-generic
                            }
                        }
                        submenu 'History for Ubuntu 20.04.1 LTS' ${menuentry_id_option} 'gnulinux-history-rpool/ROOT/ubuntu_cfgs2t' {
                            submenu 'Revert to 07/23/2020 @ 18:23' ${menuentry_id_option} 'gnulinux-history-rpool/ROOT/ubuntu_cfgs2t@[B]autozsys_[COLOR=#ff0000]xw170v[/COLOR][/B]' {
                                zsyshistorymenu "rpool/ROOT/ubuntu_cfgs2t@autozsys_[COLOR=#ff0000]xw170v[/COLOR]" "/dev/vda6" "/BOOT/ubuntu_cfgs2t@autozsys_[COLOR=#ff0000]xw170v[/COLOR]/initrd.img-5.4.0-42-generic" "/BOOT/ubuntu_cfgs2t@autozsys_[COLOR=#ff0000]xw170v[/COLOR]/vmlinuz-5.4.0-42-generic" "5.4.0-42-generic"
                            }
                            submenu 'Revert to 07/23/2020 @ 18:15' ${menuentry_id_option} 'gnulinux-history-rpool/ROOT/ubuntu_cfgs2t@[B]autozsys_[COLOR=#ff0000]hkcg8x[/COLOR][/B]' {
                                zsyshistorymenu "rpool/ROOT/ubuntu_cfgs2t@autozsys_[COLOR=#ff0000]hkcg8x[/COLOR]" "/dev/vda6" "/BOOT/ubuntu_cfgs2t@autozsys_[COLOR=#ff0000]hkcg8x[/COLOR]/initrd.img-5.4.0-42-generic" "/BOOT/ubuntu_cfgs2t@autozsys_[COLOR=#ff0000]hkcg8x[/COLOR]/vmlinuz-5.4.0-42-generic" "5.4.0-42-generic"
                            }
                        }
                        ### END /etc/grub.d/10_linux_zfs ###
                        
                        ### BEGIN /etc/grub.d/20_linux_xen ###
                        
                        ### END /etc/grub.d/20_linux_xen ###
                        
                        ### BEGIN /etc/grub.d/20_memtest86+ ###
                        menuentry 'Memory test (memtest86+)' {
                            insmod part_msdos
                            insmod zfs
                            if [ x$feature_platform_search_hint = xy ]; then
                              search --no-floppy --fs-uuid --set=root  818315f17ad8499c
                            else
                              search --no-floppy --fs-uuid --set=root 818315f17ad8499c
                            fi
                            knetbsd    /BOOT/ubuntu_cfgs2t@/memtest86+.elf
                        }
                        menuentry 'Memory test (memtest86+, serial console 115200)' {
                            insmod part_msdos
                            insmod zfs
                            if [ x$feature_platform_search_hint = xy ]; then
                              search --no-floppy --fs-uuid --set=root  818315f17ad8499c
                            else
                              search --no-floppy --fs-uuid --set=root 818315f17ad8499c
                            fi
                            linux16    /BOOT/ubuntu_cfgs2t@/memtest86+.bin console=ttyS0,115200n8
                        }
                        ### END /etc/grub.d/20_memtest86+ ###
                        
                        ### BEGIN /etc/grub.d/30_os-prober ###
                        ### END /etc/grub.d/30_os-prober ###
                        
                        ### BEGIN /etc/grub.d/30_uefi-firmware ###
                        ### END /etc/grub.d/30_uefi-firmware ###
                        
                        ### BEGIN /etc/grub.d/40_custom ###
                        # This file provides an easy way to add custom menu entries.  Simply type the
                        # menu entries you want to add after this comment.  Be careful not to change
                        # the 'exec tail' line above.
                        ### END /etc/grub.d/40_custom ###
                        
                        ### BEGIN /etc/grub.d/41_custom ###
                        if [ -f  ${config_directory}/custom.cfg ]; then
                          source ${config_directory}/custom.cfg
                        elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
                          source $prefix/custom.cfg;
                        fi
                        ### END /etc/grub.d/41_custom ###
                        Last edited by GreyGeek; Jul 23, 2020, 09:36 PM.
                        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                        – John F. Kennedy, February 26, 1962.

                        Comment


                          #13
                          Oshunluver, you'll LOVE this aspect of Ubuntu's version of ZFS
                          :
                          https://didrocks.fr/2020/06/11/zfs-f...tition-layout/
                          GRUB is the bootloader global to your machine: it means that you can have multiple OS installed in parallel, ruled by the same and unique GRUB instance. Thus, GRUB should be installed on a fixed partition: There is no need to version its content (save its state), boot from an older GRUB menu or flip-flap between multiple, parallel GRUB instances installed on your system in case of multiple machines.
                          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                          – John F. Kennedy, February 26, 1962.

                          Comment


                            #14
                            Zsys is Canonical's equivalent to SUSE"s Snapper. I have spent the evening focusing on zsys (zsysd) and zsysctl, trying to learn how to mix my manually made snapshots with those made by zsys.

                            I found this article on GitHub and it shows that zsys is still hot out of the oven, one might say even half-baked. People are having lots of trouble due to filling up the 2GB bpool with too many snapshots and syslogs with too many error postings. They are also losing terebytes of data when, during boot, their datasets are misinterpreted as unauthorized snapshots and deleted. IOW, snapshots manually made by the user or admin are not being picked up well by zsys. First introduced in 19.10, zsys is still in such a state of flux that people installing Ubuntu to take advantage of ZFS may be well advised to remove it and zsysctl, or at least disable and mask them. That's what I'm going to do.

                            I'm going to continue playing around with ZFS on my virtual Ubuntu, but without the "benefits" of zsys. I'm sticking to pure ZFS commands. Perhaps Canonical would be well advised to make the installation of zsys and option on the installer so that people don't get splashed with automatic snapshots out of the gate.
                            Last edited by GreyGeek; Jul 24, 2020, 10:51 AM.
                            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                            – John F. Kennedy, February 26, 1962.

                            Comment


                              #15
                              Thanks again, Jerry, for the analysis of ZFS. I'll wait until it has more time under the polishing wheel.
                              Kubuntu 24.11 64bit under Kernel 6.12.3, Hp Pavilion, 6MB ram. Stay away from all things Google...

                              Comment

                              Working...
                              X