Tech: Setup of CLEO Linux Server

Lars Poulsen - 2026-08-03 [Tech]

This blog page contains technical information helpful for the next time we have to rebuild a Fedora Linux Workstation/Server system.

The System Hardware


- 1TB Sandisk SSD partitioned as follows
sda1 - /boot/efi - 500 MB EFI partition
sda2 - /boot - 2GB Boot partition: Holds the bootable kernels
sda3 - / (root) - 100GB root partition: Holds the system libraries, applications etc
sda4 - (/mnt/sda4) - 100GB spare partition: Typically holds an archived root partition
sda5 - (/mnt/sda5) - another 100GB spare partition
... TBD what to use

- 2TB Seagate Barracuda HDD holding VolGroup04 LVM volume group
LV: Home (/home) - 150GB
LV: Music (/music) - 150GB
LV: pictures (/pictures) - 800GB
LV: Pic-2000-2019 (/Pic-2000-2019 ... then symlinked as /pictures/20??) - 415GB
LV: PicImports (/pictures/Imports) - 123GB
LV: PicSmall (/pictures/small) - 200GB (Thumb, Medium, HEIC)
LV: SystemO2 - 25GB - another "spare root" fs

- 2TB Seagate Barracuda HDD holding VolGroup05 LVM volume group
LV: Bird_iMac_files - 1TB
LV: Sounds (/sounds) - 100GB
Video (/video) - 500GB
(around 400 GB free space)

System Software: Fedora Workstation - F44

Added Packages

In addition to adding these we must also

Major Feature Packages

Over time, a heavily used system gradually deviates from the basic default system build. So long as you can do "in-place" version upgrades, things are relatively simple. With a system that has all "user files" (/home, /pictures, /music, /video etc) separate from "system files" (/bin, /usr, /var, /lib etc), a major system rebuild should also be fairly simple: In practice, there are a number of issues that complicate things.

User and group IDs

Linux systems depend on major system software components running under separate user and group IDs, so that they are protected from each other. As you install software packages, the installation scripts will add these IDs to the system's user database if they do not already exist. The installation scripts will find an unused user number for the new ID. Over time, the user database (/etc/passwd, /etc/group etc) will grow somewhat big, and the items will be in a somewhat random order. (My current /etc/passwd and /etc/group are each about 75-100 lines.) Two systems may have the same entries, but each one has different values. When you load file systems carried over from a previous installation, it is necessary to ensure that the userIDs match up between the filesystems that are to be mounted together.

Firewall

Linux has several firewall systems, all derived from the "Berkeley Packet Filter". The problem is that firewalld comes installed by default, and is integrated with a number of systemd components that change things in the firewall in ways that may conflict with what was set up in /etc/sysconfig/iptables. So long as we are using iptables, we must therefore uninstall firewalld.

Samba

Email "Post Office"

The term "email post office" refers to the feature set that allow you to receive and keep email messages received for the wide world, and then make them avalable to desktop clients through the network (LAN or Internet).

Postfix (MTA, i.e. SMTP)

postfix is the part of the pst office that receives mail messages from the world, placing them in a well-defined "Inbox" location, where clients can pick them up. In years past, this function was universally done by a program called sendmail that was originally written around 1970. Over the years, it has slowly added new features and functions to accomodate the way the networking environments have changed, but keeping backwards compatibility. Eventually, this accumulated so much complexity that new programs were written to make it easier to set up services with the features used today. postfix is by far the most successful of these. One of the fundamental decisions in setting up a "post office" is where to place the incoming messages. Traditionally, incoming messages were put in /var/spool/mail/user, and that is still the default when installing a mail server. This is not the best place for several reasons: To make this work, postfix and dovecot must both be configured to agree on where this is located. On the postfix side, this configuration element is in /etc/postfix/main.cf
	mail_spool_directory = /home
	home_mailbox = Mail/Inbox

Dovecot (IMAP server)

dovecot is the server that allow the desktop PCs to connect to the post office to In the environments where I work, the desktop program used for these functions is Thunderbird, a free and open source program provided by the Mozilla Foundation (which also maintains and provides the Firefox web browser). The configuration file for dovecot is /etc/dovecot/dovecot.conf. It needs to contain these lines in order to work with the postfix setup described above:
	mail_home = /home/%{user}
	mail_driver = mbox
	mail_path = ~/Mail
	mail_inbox_path = ~/Mail/Inbox
(It caused me some grief when the names and syntax of these parameters recently changed.)

Photo Archive (/pictures)

The photo archive (/pictures) is a group of filesystems exported via SAMBA as well as through the web server. It is also one of the few good reasons to actually login to the GNOME desktop where I browse it with the DigiKam program. Support for it is discussed in a bit more detail here.
File Systems
While the photo archive looks to its users like one file system mounted at /pictures, is actually several, in order to limit the sizes of each one.
Web-scripts (.cgi)
To display a picture folder through the web browser, we have configured httpd.conf to display the local folder index by means of the file index.cgi if it exists. This is a hard link in each folder pointing to /pictures/bin/album.cgi. Since hard links only work within the local file system, folders in Pic-2000-2019 are linked to a copy of that file in /Pic-2000-2019/album.cgi.

That script requires a custom large icon for a folder (so that it matches the thumbnails for actual pictures in the same folder). In the past, we added that to the global set of icons for the webserver. We now keep it in /pictures/data/folder94.png

For the iCloud import to work, we also need to have

    sudo dnf install python3-pip
    sudo pip install icloudpd

Plex Media Server

https://linuxcapable.com/install-plex-media-server-on-fedora-linux/

Plex is a server program that allows music players and smart TVs to access media files on your Linux server workstation.

Other Things to Configure

Tricky Parts of System Installation

Initial System Installation

Partitioning

We really want to pre-build a system drive partitioned with a GPT partition table. If we just let the Anaconda installer "do what it wants", it will create a btrfs file system. I do not want this, for two reasons: To manipulate the partitions of a file system, these are the tools:

Do not allow "sleep", "suspend" or "hibernation"

Fedora/systemd/GNOME assumes that a workstation is an interactive system, and want to suspend the system if there is no keyboard activity. This cannot be allowed, if there needs to be remote access (over the network) to the system. To correct this problem solidly, apply these 3 fixes:
	[Sleep]
	AllowSuspend=no
	AllowSuspendThenHibernate=no
	AllowHibernation=no
	AllowHybridSleep=no
	
        sudo systemctl mask --now sleep.target suspend.target hibernate.target
		hybrid-sleep.target
	

Can the / and /boot partitions be in an LVM?

While this can be done, it is a lot of work to set up. initramfs must support LVM, both in the startup kernel and in GRUB2. This stanza of GRUB commands illustrates it:
set root=(hd0,gpt1) # /boot partition
insmod normal
normal
(then)
insmod lvm
linux /vmlinuz- root=dev/mapper/-root
initrd /initrd-.img
boot
Until I am familiar with how to get into grub, I'm not going to mess with this.

SELINUX

It is pretty hard to get SELINUX to run cleanly, and it gets in the way of a lot of things when yoour are configuring components. So I set it to "permissive" mode.
	sudo setenforce 0
That does it for now. But to have it survive a restart, ..
	sudo vim /etc/selinux/config
	(SELINUX=permissive)

More pages

These blog pages are found at http://www.beagle-ears.com/lars/pages/

(End of page)