gregory-lee-bartholomew / fedora-on-zfs

A script for automating the installation of Fedora Linux on a ZFS filesystem
GNU General Public License v3.0
11 stars 0 forks source link

what's missing #1

Closed ssergey2018 closed 1 month ago

ssergey2018 commented 1 month ago

Good time!!! Can you describe the dependencies and minimum system requirements in more detail? Had to put a system with your script installed, took quite a while to figure out and install the necessary software. It would be better if the script includes a function to check if the necessary software is available and installed.

Also the installed system lacks some packages for building modules for new kernels. I had to install gcc make kernel-devel kernel-headers dkms zfs-dracut Some packages were installed, and many were not installed at all. Maybe I don't have enough experience to figure out dependencies and it was a bit complicated, but automating the process would have made it easier to install and use the system

gregory-lee-bartholomew commented 1 month ago

Hi @ssergey2018

Thanks for the feedback. Sure, I'll take a closer look at the dependencies and see if I can get the script to give better feedback when something is missing. I've developed and tested this script using the Fedora Workstation Live image which happens to have everything that is needed pre-installed. Do you have any notes about what you had to install to get the script to work?

Also the installed system lacks some packages for building modules for new kernels. I had to install gcc make kernel-devel kernel-headers dkms zfs-dracut

Hmm, I thought those packages should have been pulled in as part of the installation process. I'll look into it.

Thanks!

ssergey2018 commented 1 month ago

unfortunately the list of packages is not saved, but if you need it, I am ready to test the script in more detail and write the missing packages on an empty system.

Not all packages were installed during the installation process Module build failed on the installed system

I need time to retest on a virtual machine I'll post the results as soon as I get them.

gregory-lee-bartholomew commented 1 month ago

I'm happy to run some tests. What base system or Live image did you start with when you ran the script?

ssergey2018 commented 1 month ago

Fedora Server 39 was installed as an intermediate system from which the script was already run. minimal install If you want to run tests, that's fine with me. In this case there will be fewer misunderstandings and other overlaps

ssergey2018 commented 1 month ago

I put git edk2-ovmf qemu for the transit system.

gregory-lee-bartholomew commented 1 month ago

Thanks!

You could probably get away with installing git-core instead of git and qemu-system-x86-core instead of qemu to reduce the total number of packages you have to install. I've added a prereqs script to the test branch that can be run before the install script is run and it should detect what is needed and prompt the user to install it. I'll merge it into the main branch after I've done a little more testing.

Thanks again for the helpful feedback. 🙂

gregory-lee-bartholomew commented 1 month ago

Also the installed system lacks some packages for building modules for new kernels. I had to install gcc make kernel-devel kernel-headers dkms zfs-dracut

To test, I just did a minimal install (fedora-disk-minimal.ks). The packages you've listed all appear to be present on the installed system. Perhaps you had booted into or connected to the wrong system?

ssergey2018 commented 1 month ago

I have two dnf transactions. I'm at a loss as to what happened. The system could not have been mixed up (100%). It doesn't look like a script error, there is no reason to think so. From transaction 39 at least zfs-dracut was installed, it was after that initramfs started working. https://paste.centos.org/view/94f5aeaa https://paste.centos.org/view/f06b9644

How much RAM are you testing on and how long does it take you to install the system???? I installed the system on 8 GB RAM for about 2 hours.

gregory-lee-bartholomew commented 1 month ago

How much RAM are you testing on and how long does it take you to install the system???? I installed the system on 8 GB RAM for about 2 hours.

I've been testing it on a pretty unimpressive 8GB system with a 4 core Intel(R) Core(TM) i5-7500T CPU @ 2.70GHz. I haven't timed it, but I think the test installs take about 30 minutes. The reason the installs are so fast though is because I have a local mirror of the Fedora repos on my gigabit LAN. The packages download at about 10MB/s.

gregory-lee-bartholomew commented 1 month ago

I have two dnf transactions. I'm at a loss as to what happened.

You can see in transaction 4 that the script at least attempted to install zfs-dracut (the install -q -y ... lines are from the script).

    10 | install duf                                                       | 2024-08-05 16:54 | Install        |    1
     9 | -y --disablerepo=zfs* --exclude=kernel* --exclude=audit update    | 2024-08-05 16:43 | I, U           |  468 EE
     8 | group install -q -y --repo=fedora Sway Window Manager             | 2024-08-05 16:25 | Install        |  229 EE
     7 | install -q -y --repo=fedora efibootmgr selinux-policy-devel rsync | 2024-08-05 16:23 | Install        |   14
     6 | install -q -y plymouth-theme-script                               | 2024-08-05 16:11 | I, U           |   12 EE
     5 | install -q -y --repo=fedora systemd-boot-unsigned                 | 2024-08-05 16:11 | Install        |    1  <
     4 | install -q -y --repo=fedora --repo=zfs kernel-devel zfs zfs-dracu | 2024-08-05 16:06 | Install        |  299 >E
     3 | install -q -y /var/tmp/zfs-release-2-5.fc39.noarch.rpm            | 2024-08-05 16:04 | Install        |    1  <
     2 | -y remove dracut-config-generic                                   | 2024-08-05 16:02 | Removed        |    1 ><
     1 |                                                                   | 2024-08-05 15:59 | Install        |  491 >E

The difference in our install times can be seen in the first 9 transactions. Yours shows about 45 minutes (15:59 to 16:43). Mine shows about 15 minutes for roughly the same set of transactions (19:34 to 19:50).

# dnf history
ID     | Command line                                                       | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------------------------------------------------
    13 | --exclude=kernel* --disablerepo=zfs* update                        | 2024-09-05 14:01 | I, U           |    7   
    12 | install firefox                                                    | 2024-09-04 20:00 | Install        |   89 EE
    11 | --exclude=kernel* --disablerepo=zfs* update                        | 2024-09-04 19:59 | Upgrade        |    4 EE
    10 | -q -y install rpmconf                                              | 2024-09-04 19:54 | Install        |    3   
     9 | -y --disablerepo=zfs* --exclude=kernel* --exclude=audit --exclude=a| 2024-09-04 19:50 | I, U           |  350 EE
     8 | group install -q -y --repo=fedora Sway Window Manager              | 2024-09-04 19:47 | Install        |  230 EE
     7 | install -q -y --repo=fedora efibootmgr selinux-policy-devel rsync  | 2024-09-04 19:45 | Install        |   14 EE
     6 | install -q -y --repo=fedora plymouth-theme-script                  | 2024-09-04 19:42 | Install        |    8 EE
     5 | install -q -y --repo=fedora systemd-boot-unsigned                  | 2024-09-04 19:42 | Install        |    1   
     4 | install -q -y --repo=fedora --repo=zfs kernel-devel zfs zfs-dracut | 2024-09-04 19:39 | Install        |  296 EE
     3 | install -q -y /var/tmp/zfs-release-2-5.fc40.noarch.rpm             | 2024-09-04 19:38 | Install        |    1  <
     2 | -y remove dracut-config-generic                                    | 2024-09-04 19:38 | Removed        |    1 ><
     1 |                                                                    | 2024-09-04 19:34 | Install        |  498 >E
ssergey2018 commented 1 month ago

1) I have about the same configuration on my test bench except for cpu CPU: 6-core AMD Ryzen 5 3600 4 cores are available in the virtual machine

2) There was an attempt to install zfs-dracut from a script, but then how to explain the 39 transaction after which the zfs-dracut package was installed out of the many that were requested I don't understand anything that is happening

3) about the installation time. Indeed, the installation time differs many times, if you forget to enable buffering on the virtual controller, the difference will be even greater Nested virtualization is evil

4) If I have time, I'll try running the script again. Maybe some things will become clearer, or maybe something else unpleasant will come up.

gregory-lee-bartholomew commented 1 month ago

It looks like transaction 39 installed zfs-dracut version 2.2.5. Transaction 4 appears to have installed zfs-dracut version 2.2.4. The problem might be due to picking up some bad/outdated mirrors.

I think I see a problem with my script in the logs you've posted.

   6 Error! Could not locate dkms.conf file.
   7 File: /var/lib/dkms/zfs/2.2.4/source/dkms.conf does not exist.
   8 Running post installation script: /var/tmp/rpm-tmp.Wy2fd2. Parameters: 1
   9 Adding zfs dkms modules version 2.2.4 to dkms.
  10 Error! DKMS tree already contains: zfs-2.2.4
  11 You cannot add the same module/version combo more than once.
  12 Installing zfs dkms modules version 2.2.4 for the current kernel.

It doesn't seem to be a fatal issue on any of the systems I've installed. But I'll look into why that dkms.conf file was missing. I think I know what needs to be fixed. Thanks for bringing this to my attention.

gregory-lee-bartholomew commented 1 month ago

The missing dkms.conf error has been corrected.

  26 Running post installation script: /var/tmp/rpm-tmp.5Js3Bl. Parameters: 1
  27 Adding zfs dkms modules version 2.2.6 to dkms.
  28 Creating symlink /var/lib/dkms/zfs/2.2.6/source -> /usr/src/zfs-2.2.6
  29 Installing zfs dkms modules version 2.2.6 for the current kernel.
  1. If I have time, I'll try running the script again. ...

Since zfs 2.2.6 is now out (https://github.com/openzfs/zfs/releases/tag/zfs-2.2.6), you should be able to install Fedora Linux 40 directly rather than installing 39 and then upgrading. If you do decide to try it again, I would recommend running the following command to force the script to install Fedora Linux 40. (The install script defaults to installing the N-1 release of Fedora Linux out of an abundance of caution.)

# ./install 40 fedora-disk-minimal.ks /dev/sdX /dev/sdY

Let me know how it goes. Thanks.

ssergey2018 commented 1 month ago

1) Thanks for the reminder about installing the current release. I had the assumption that the release was updated Yes, indeed I was installing release 39 first and then upgrading to release 40. It was for the sake of testing the script in different modes. As you can see this approach revealed some bugs 2) This is not the first time I tried to put the system on ZFS. At first I tried to install in manual mode, but it is not convenient. And I noticed such a peculiarity, at the moment of release, within a month, it is impossible to update correctly, zfs repositories do not have time to prepare corrected versions for the new release of the system. This is the reason why I used to install the previous system first, and then update later

I'll let you know as soon as I have new test results

gregory-lee-bartholomew commented 1 month ago

Thanks for testing.

By the way, if you know that a specific mirror in your area is better/faster than whatever dnf might autodetect, you might try setting the FREP variable in config/evariables.conf to point to the better mirror.

ssergey2018 commented 1 month ago

I did another test. Installed the latest release by script with the latest changes and this is what I found out: 1) Installation took 47 minutes 2) Some bugs we didn't discuss stopped appearing 3) After installing the system I decided to take the script's suggestion and upgrade the system. Here's what came up

Running scriptlet: sssd-common-2.9.5-1.fc40.x86_64                    544/544
error: libselinux: type 0: Regex version mismatch, expected: 10.42 2022-12-11 actual: 10.44 2024-06-07
error: libselinux: type 0: Regex version mismatch, expected: 10.42 2022-12-11 actual: 10.44 2024-06-07
error: libselinux: type 0: Regex version mismatch, expected: 10.42 2022-12-11 actual: 10.44 2024-06-07
Running in chroot, ignoring command 'set-property'

  Running scriptlet: firewalld-2.1.3-1.fc40.noarch                      544/544
  Running scriptlet: libgcc-14.0.1-0.15.fc40.x86_64                     544/544
Running in chroot, ignoring command 'daemon-reload'

Running in chroot, ignoring command 'list-units'

Running in chroot, ignoring command 'reload-or-restart'

Running in chroot, ignoring command 'list-units'

Running in chroot, ignoring command 'daemon-reload'
Running in chroot, ignoring command 'reload-or-restart'

Running in chroot, ignoring command 'list-units'

Running in chroot, ignoring request.

Upgraded:
  NetworkManager-1:1.46.2-1.fc40.x86_64

It's probably nothing fatal

gregory-lee-bartholomew commented 1 month ago

It's probably nothing fatal

I've seen those "Regex version mismatch" errors as well. I found the following comment about them in Red Hat's bugzilla.

Excerpted from bugzilla.redhat.com -- BZ#2252538 -- Comment 8:

libselinux: type 0: Regex version mismatch, expected: 10.40 2022-04-14 actual: 10.42 2022-12-11

The reported errors are harmless and are expected when updates include pcre and libselinux. There should not be any action needed.

So other than your installations taking a bit longer than they should, it sounds like everything is working correctly.

Thanks for all your help. If I knew how, I'd add you as a contributor to this project at this point! 🙂 Your contributions will no doubt make the process easier for others in the future.


What's Missing report closed by commit d3cb482