This blog page contains technical information helpful for the next time we have to rebuild a Fedora Linux Workstation/Server system.
| 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 |
| 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 |
| LV: Bird_iMac_files - 1TB |
| LV: Sounds (/sounds) - 100GB |
| Video (/video) - 500GB |
| (around 400 GB free space) |
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 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:
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:
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
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.
In practice, there are a number of issues that complicate things.
- EFI - 100MB-500MB FAT32 partition to be mounted on /boot/efi
- Boot - 1GB-2GB ext4 partition to be mounted as /boot
- / (root) - 30GB-100GB ext4 partition to become the system "root" file system
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.
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).
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.
- /pictures/bin - collection of scripts used for managing
the archive and for browsing it through the webserver.
- /pictures/data - metadata related to the archive
- /pictures/StockPhotos - pictures not taken by me that
are useful for my blog pages etc.
- Thumb - Thumbnails (less than 200x200 pixels) of files
in the main archive; used to accellerate loading of web
instantiations of folders in the archive.
- Medium - lightweigh versions of JPG files in the archive.
For use in blog pages or in browsing, these are good enough for
most on-screen use, but much faster to load. Less than 800 px on
the longest side.
- HEIC - for files imported from iPhones/iCloud, the
original Apple format version of the image.
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.
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.
To manipulate the partitions of a file system, these are the tools:
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
set root=(hd0,gpt1) # /boot partition insmod normal normal (then) insmod lvm linux /vmlinuz-Until I am familiar with how to get into grub, I'm not going to mess with this.root=dev/mapper/ -root initrd /initrd- .img boot
sudo setenforce 0That does it for now. But to have it survive a restart, ..
sudo vim /etc/selinux/config (SELINUX=permissive)
When doing this, you can either mount each of the secondary file systems on a a directory at the nominally correct place in the tree, or you can mount each file system at a mount point in the root directory and put a symbolic link to it where it fits in the logical file tree.
I have done both, but if you mess up and put in the symbolic link and then try to mount the file system on top of it, you get an unstable situation, where the boot-time mount -a fails in a bad point, where you need to boot from a USB to get in and correct it.
And because the Pic-2000-2019 actually needs 20 separate links to work, it is simplest to mount each of them on a mount point in the root directory.
And note that on mount commands and in /etc/fstab the hyphens in Pic-2000-2019 must be doubled.
These blog pages are found at http://www.beagle-ears.com/lars/pages/
(End of page)