'Rocky Setup Guide (Desktop + Cockpit + ZFS)

Hey Homelabsers,

Here is the guide for Rocky Setup.

# Rocky Linux Setup Guide: Desktop + Cockpit + ZFS

Requirements:

- Fresh Rocky Linux 8 or 9 installation

- User must have root privileges

- Internet connection

Step 1: Prepare the Scripts

Save the following two scripts to your Rocky system:

1. install-desktop-environment.sh

Save the full contents of the desktop install script into this file.

2. ZFS-setup.sh

Save the full contents of the ZFS install script into this file.

Tip: Use nano or vim to create the files, or transfer them via scp from another system.

Step 2: Make the Scripts Executable

Run the following in a terminal:

chmod +x install-desktop-environment.sh ZFS-setup.sh

Step 3: Run the Desktop and Cockpit Setup

Run:

sudo ./install-desktop-environment.sh

What it does:

- Detects and verifies the OS

- Installs XFCE desktop environment

- Configures SELinux to permissive

- Installs and configures Cockpit with useful modules

- Adds 45Drives repo

- Enables firewall rules for Cockpit

- Backs up any existing 45Drives repo configs

- Finishes by prompting for a reboot

After execution:

- Your system will reboot

- A graphical desktop (XFCE) will be available

- Cockpit is available at: https://:9090

Step 4: Install ZFS and Cockpit-ZFS

After rebooting, run:

sudo ./ZFS-setup.sh

What it does:

- Installs ZFS using the appropriate repo

- Loads ZFS kernel modules

- Sets SELinux to permissive

- Reinstalls 45Drives repo if needed

- Installs cockpit-zfs

- Ensures cockpit.socket is active

- Prompts for another reboot

Final Result:

- XFCE desktop is running

- Cockpit is accessible at https://:9090

- ZFS and cockpit-zfs are installed and ready to use

- SELinux is set to permissive

- ZFS modules are loaded and enabled at boot

Optional (Post-Setup):

- Consider re-enabling SELinux and testing ZFS

- Create and import ZFS pools via Cockpit or CLI

- Update firewall rules or install additional Cockpit modules

Let me know if this needs further details.

1 Like

Perhaps a dumb question since I have a custom build, but where are the two scripts;
install-desktop-environment.sh
ZFS-setup.sh
?

2 Likes

Hey @DigitalGarden,

I have requested for scripts, and i will post them here as soon as they are available to me.

Hi all,

here are the link to those scripts:

https://scripts.45drives.com/installation_scripts/rocky8-setup-part1-install-desktop-environment.sh
http://scripts.45drives.com/installation_scripts/rocky8-setup-part2-ZFS-setup.sh

There are two:

  • rocky8-setup-part1-install-desktop-environment.sh
  • rocky8-setup-part2-ZFS-setup.sh

Running Part1 will install a desktop environment, Cockpit, our 45Drives Repos and most of our modules.
After it runs the server needs to reboot (just have to press any key) and then after it boots, running Part 2 will install ZFS and the ZFS module.

We are currently working on Rocky 9 scripts, and as soon as they are available i will add them here.

2 Likes

Have 45Drives boffins considered putting the setup in an Ansible Playbook? You would need to add ansible to the load. And write the playbook. The advantage is that you have an executable description of the machine inventory and configuration making replication and user reinstallation easy.

Somebody got impatient during an update and interrupted replacement of the bootstrap. Doh. I hate it when that happens.

I have the USB Rocky 8 nub set aside for such misfortunes. Once Rocky 8 server + GUI was up,
I just muddled through this drill by hand using the Knowledge Base articles and some help from Deep Seek.

Some of the stuff I ran into:

  1. I used Rocky8 as was concerned 45Drives hardware stuff had not been compiled against Rocky9
  2. I added Houston UI per the knowledge base
  3. I added 45Drives repos
  4. I added 45Drives Cockpit modules
  5. Confirmed avahi and nsswitch were installed, opened 5353
  6. Set hostname in Cockpit Overview
  7. Installed ZFS per the KB found it did a bit more.
  8. Imported my ZFS Pool
  9. Setup ZFS mount at boot per Deep Seek charms
  10. Added Portainer-CE per portainer.io instructions
  11. Added Task Scheduler
  12. Set up Rsync --one-file-system of / to ZFS pool dataset
  13. Set up replication of / pool to TrueNAS local backup server
  14. Setup Rsync of Roon Server / and Music disk to ZFS pool datasets
  15. Added Channels-DVR to record off-the-air TV
1 Like