From ee795e8ba642a2df2f06843b47645f88085bb51f Mon Sep 17 00:00:00 2001
From: Peter Boy <pb@resdigita.de>
Date: May 18 2021 07:33:43 +0000
Subject: Added draft SBC installation, fixed some bugs


---

diff --git a/docs/modules/ROOT/assets/images/serverinstall-raspi-020.png b/docs/modules/ROOT/assets/images/serverinstall-raspi-020.png
new file mode 100644
index 0000000..fc0e23e
Binary files /dev/null and b/docs/modules/ROOT/assets/images/serverinstall-raspi-020.png differ
diff --git a/docs/modules/ROOT/assets/images/serverinstall-raspi-030.png b/docs/modules/ROOT/assets/images/serverinstall-raspi-030.png
new file mode 100644
index 0000000..9f2013a
Binary files /dev/null and b/docs/modules/ROOT/assets/images/serverinstall-raspi-030.png differ
diff --git a/docs/modules/ROOT/pages/server-installation-sbc.adoc b/docs/modules/ROOT/pages/server-installation-sbc.adoc
index 983aa05..aa5f0da 100644
--- a/docs/modules/ROOT/pages/server-installation-sbc.adoc
+++ b/docs/modules/ROOT/pages/server-installation-sbc.adoc
@@ -1,36 +1,192 @@
-= Fedora Server on Single Boad Computers - Raspberry Pi & Co.
+= Fedora Server on Single Board Computers - Raspberry Pi & Co.
 Peter Boy; Jan Kuparinen
 :page-authors: {author}, {author_2}
 
 [NOTE]
 ====
-Collection of ideas. __**– Outline proposal –**__ Please comment on server mailing list!
+__**– Work in Progress –**__ Please comment on server mailing list!
 ==== 
 [sidebar]
 ****
-Author: N.N | Creation Date: N/A | Last update: N/A | Related Fedora Version(s): 34
+Author: Peter Boy (pboy) | Creation Date: N/A | Last update: N/A | Related Fedora Version(s): 34
 ****
 
-== How it works
+Fedora Server is also available for Single Board Computers (SBC) like the legendary Raspberry Pi. That device started some years ago primarily as an experimentation and education tool. Fedora Server on such a DIY device?
 
-* No installation procedure as described in the generic installation guide
-* A pre-installed server disk image is transferred to the SBC boot device, typically an SD or an eMMC card. 
-* The process is easy. During the transfer, the image is adapted to the specific hardware and an initial user-specific configuration is injected.
+The technology evolved over the years into an affordable but sufficiently powerful tool for many task of everyday life. It ignited a new business field for many hardware producers, all of which, while keeping the basic concept, take the Raspberry Pi as a reference to surpass. This resulted in a rich variety of variants that is difficult to keep track of. They follow the same basic principle, but _differ in many, sometimes significant details_ regarding software support, installation and maintenance. 
+
+While the installation procedure is completely different, in the end Fedora Server works exactly as otherwise familiar. 
 
 [WARNING]
 ====
-When choosing a model, look for the availability of open source drivers 
+When choosing a device for Fedora Server, check carefully if it is actually supported. Some of the newer models claim to support Linux as operating system. In fact, to even boot, they require proprietary, closed software that Fedora cannot and will not distribute. They only run with a special Linux version customized by the manufacturer. Take everything with a grain of salt. Unlike the x86 universe, don't expect everything to work just as smoothly in ARM rsp. aarch64. It is best to ask in advance on the arm mailing list.
 ====
 
 == Why using Single Board Computer Server?
 
-* Affordable price / performance ratio for many typical tasks in the SOHO sector
-* Examples of use: Family email server, e-book library for family and friends. This does not need a full-blown NAS
-* Low power consumption, environmentally friendly
+Certainly, most prominent and well-known features are favorable price, low power consumption, and small footprint. 
+
+But it's not just pure affordability in several respects. The devices now offer a performance that is suitable for many typical tasks in the Soho area. Examples include mail, web, file servers, e-book or document library, media servers and more. And not only in the domestic sector, but also for smaller office environments. They can thus replace the popular NAS devices while offering significantly more performance and greater adaptability and flexibility - lower cost more as a side effect.
+
+However, those properties also open up additional opportunities. 
+
+Fedora Server works identically on the architectures at the application level. Standard software such as Postgresql database server or file server are available. Other software such as Java or Python applications run on both architectures. This opens up the possibility of building up redundancy with little effort. In the event of a malfunction of the (main) server, there is no threat of a complete shutdown, but operation with restrictions is possible. 
+
+Critical services such as monitor software can be offloaded to a dedicated device and immunized against server-level failures.
+
+A closer look opens up a multitude of possibilities.
+
+== How it works
+[source,txt]
+====
+Outline:
+
+* No installation procedure as described in the generic installation guide
+* A pre-installed server disk image is transferred to the SBC boot device, typically an SD or an eMMC card. 
+* The process is easy. During the transfer, the image is adapted to the specific hardware and an initial user-specific configuration is injected.
+====
+
+
+== Installing Fedora Server Edition on Raspberry Pi
+
+=== Prerequisites
+
+Of course, you need a Raspberry Pi, either model 3 or 4. And intended as a server it has to be connected to your network. For the first boot, a monitor and keyboard are required as well to perform an initial bare minimum configuration. Afterwards you will perform everything using either ssh or more confortably using Cockpit which is preinstalled and activated by default. 
+
+Additionally you need a Micro SD card to hold the operating system. Unless you intend to operate a database or e.g. a music library, a capacity of 32 gb should be fine and affordable nowadays. Avoid anything smaller than 16 gb.
+
+And your desktop must be able to write to a SD card, either by a dedicated slot or an USB adapter.
+
+=== Preparations
+
+1. Set the download directory as default, fetch a Fedora Server Raspberry Pi system disk raw image, here F34, and check the integrity of the download.
++
+[source,bash]
+----
+[…]# cd ~/Downloads
+
+[…]# wget http://download.fedoraproject.org/pub/fedora/linux/releases/34/Server/aarch64/images/Fedora-Server-34-1.2.aarch64.raw.xz  -O Fedora-Server-34-1.2.aarch64.raw.xz 
+
+[…]# wget https://getfedora.org/static/checksums/34/images/Fedora-Server-34-1.2-aarch64-CHECKSUM   -O Fedora-Server-34-1.2-aarch64-CHECKSUM 
+
+[…]# sha256sum -c *-CHECKSUM  
+----
++
+On a Mac (Catalina) use shasum5.28 instead. 
+
+
+2. Connect youd Micro SD card to your desktop. Identify the device name and unmout the device. 
++
+On a Fedora workstation you may use:
++
+[source,bash]
+----
+[…]# lsblk
+NAME              MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
+sda                 8:0    0 596,2G  0 disk 
+├─sda1              8:1    0   600M  0 part /boot/efi
+├─sda2              8:2    0     1G  0 part /boot
+├─sda3              8:3    0    30G  0 part 
+│ └─sysvg-root    253:0    0    15G  0 lvm  /
+└─sda4              8:4    0 564,6G  0 part 
+  ├─usrvg-var_log 253:1    0     5G  0 lvm  /var/log
+  └─usrvg-libvirt 253:2    0   200G  0 lvm  /var/lib/libvirt
+mmcblk0           179:0    0  29,5G  0 disk 
+└─mmcblk0p1       179:1    0  29,5G  0 part 
+zram0             252:0    0   7,5G  0 disk [SWAP]
+
+[…]# umount /path/to/mountpoint/above
+----
++
+On a Mac open a terminal und issue:
++
+[source,bash]
+----
+[…]# diskutil list 
+/dev/disk0 (internal, physical):
+   #:                       TYPE NAME                    SIZE       IDENTIFIER
+   0:      GUID_partition_scheme                        *251.0 GB   disk0
+...
+...
+/dev/disk2 (internal, physical):
+   #:                       TYPE NAME                    SIZE       IDENTIFIER
+   0:     FDisk_partition_scheme                        *31.9 GB    disk2
+...
+...
+
+[…]# sudo  diskutil unmountDisk  /dev/disk2
+----
+
+3. Transfer the raw disk image to the micro SD card
++
+[source,bash]
+----
+[…]# xzcat Fedora-Server-34-1.2.aarch64.raw.xz | dd of=/dev/diskXXX bs=4M status=progress
+----
++
+Alternatively, use a program like Balena Etcher. In this case, too, make sure that the SD card is not mounted. Otherwise, flashing the card will fail.
+
+After the transfer is complete, unmount the SD card again if it was automatically re-mounted, and disconnect it.
+
+
+=== Basic Installation
+
+Directly at a terminal of the Raspberry Pi we will make only the minimal, absolutely necessary configuration. This is the setting of a root password and the determination of the IP address. Everything else is done comfortably on our desktop. 
+
+1. Make sure that the Raspberry Pi is disconnected from power. 
+2. Connect monitor, keyboard and network cable, insert the micro SD card.
+3. Connect Raspberry Pi to power and wait. After some time you will be greeted by a very plain configuration screen.
+4. The only strictly necessary action is to configure root password. Type "4" and enter a suitable password. If you are on a non-US keyboard you should restrict yourself to traditional ASCII and avoid special characters for now. Otherwise, you might later not be able to enter the root password correctly, because a different keyboard mapping applies. In the next stage, with correct mapping, you can set up the password as complex as you like.
+5. Tap "c" to continue and finalize the configuration. After some waiting, the Fedora Server login prompt appears.
+6. Above the user input, a line with the (temporary) name of the computer and an IP address is displayed. The name is normally "fedora" and the IP address depends on the network. Note both carefully.
+7. You can now disconnect monitor and keyboard. The next steps all happen on the desktop.
+
+=== Final Configuration
+
+1. On your desktop open a Browser and enter name and port __http://fedora:9090__. Sometimes the internal DNS already work. If not, use the IP address you wrote down, e.g. something like __http://192.168.158.116:9090__. After accepting a warning message due to a missing certificate, voilà, the Cockpit administration interface of the Raspberry Pi appears.
++
+image::serverinstall-raspi-020.png[Cockpit Login Screen]
+
+2. Login with your root account to continue configuration
++
+image::serverinstall-raspi-030.png[Cockpit Overview Screen]
+
+3. First *adjust hostname*
++
+Click onto "set hostname" and enter a short name (display name) and a fqdn name. 
+
+4. *Adjust time and time zone* if necessary. Click on system time and select the time zone. Automatic time synchronization should already be enabled. 
++
+If a local time server is available in your network, it can be entered here. Many routers offer such a function and relieve the infrastructure.
+
+5. To be able to access as root via ssh, you have to *install your public ssh key* for root.
++
+Select "accounts" in the left navigation column and choose the root account. At the bottom select "Add Key".  Copy&paste your public key into the input field. 
++
+If you chose a simple password during the basic installation, you should replace it with a more complex one at this occasion.
+
+6. If you are non-US you may want to **set your language**. In any case, you should choose the **keyboard layout** correctly. Otherwiese, in case of an emergency you may have to use a directly attached monitor and keyboard again, you need a correct mapping to act efficiently.
++
+Select "Terminal" in the left navigation menu. You get a terminal access to your device, already logged in as root.
++
+  a. List available languages by "__localectl list-locales__". Find your locale in the list and note the token, e.g. de_DE.UTF-8. Set the language with "__localeectl  set-locale LANG=TOKEN__", e.g. "__localeectl  set-locale LANG=de_DE.UTF-8__".
++
+  b. List available keyboard mappings by "__localectl list-keymaps__". Find your keymap in the list and note the token, e.g. de-nodeadkeys. Set the keymap with "__localectl  set-keymap MAP_TOKEN__", e.g. "__localectl  set-keymap de-nodeadkeys__".
++
+  c. Finally check by "__localeectl__"
+  
+7. Most likely, the packages of the distributed file image are not up to date.  In the menu bar on the left, you will probably see an exclamation mark next to "**Software Updates**".  Select this menu item. A search for updates starts and after some time a list of updates appears. Select "Install all updates" and sit back. It will take a while. 
++
+If the cockpit packages are also updated, the connection is interrupted. You must then reconnect. 
++
+With everything done reboot the system. In the overview screen select either reboot or shutdown in the upper right corner. You can now use a shutdown to disconnect keyboard and monitor, if desired. You may also put the device in a different, final place. Start the device afterwards.
+
+8. When the device is up again it is time to **test the installation**. 
+  a. If your DHCP is correctly configured, you should be able to *find your device by name* now. Close your browser window and start again. Write the device name and port number in the address field, e.g. http://raspi3.exemple.com:9090 and Cockpit should come up again (after the usual warning about an insecure connection).
+  b. You should be able to log in via **ssh as root and your key**. Try _ssh -i .ssh/MYKEY raspi3.example.com_ and after answering a question to accept the fingerprint you should gain access.
+
+== Organization of the storage area
+
+The Fedora SBC disk image provides a hard disk size of about 5 gb. This way the distributed image file in raw format does not get too big. As part of the installation process it must get adapted to the local hardware.
 
-== Step by step instruction
 
-* Download image file
-* Install installation software
-* Transfer file system
-* ...
\ No newline at end of file
diff --git a/docs/modules/ROOT/pages/server-troubleshooting.adoc b/docs/modules/ROOT/pages/server-troubleshooting.adoc
index af40804..2029f09 100644
--- a/docs/modules/ROOT/pages/server-troubleshooting.adoc
+++ b/docs/modules/ROOT/pages/server-troubleshooting.adoc
@@ -21,7 +21,7 @@ Some examples from the latest discussions
 +
 Specifically: don’t deactivate but resolve issues 
 
-### Some generic information
+## Some generic information
 
 
 If you found a bug, report it!
diff --git a/docs/modules/ROOT/pages/sysadmin-cockpit.adoc b/docs/modules/ROOT/pages/sysadmin-cockpit.adoc
index 0a7559d..22ac9ce 100644
--- a/docs/modules/ROOT/pages/sysadmin-cockpit.adoc
+++ b/docs/modules/ROOT/pages/sysadmin-cockpit.adoc
@@ -4,11 +4,35 @@ Peter Boy; Jan Kuparinen
 
 [NOTE]
 ====
-**Work in progress**! Please comment on server mailing list
+Collection of ideas. __** – Outline proposal –**__  Please comment on server mailing list
 ==== 
 [sidebar]
 ****
-Author: Peter Boy (pboy) | Creation Date: 2021-03-10 | Last update: 2021-03-26 | Related Fedora Version(s): 33,34
+Author: N.N) | Creation Date: N/A | Last update: N/A | Related Fedora Version(s): 33,34
 ****
 
-*comming soon*
\ No newline at end of file
+Preface / Why Cockoit
+(see: Fedora Magazine: https://fedoramagazine.org/managing-software-and-services-with-cockpit )
+
+
+Allgemeines Management
+    • Übericht über Auslastung
+    • Restart System
+    • Benutzer verwaltung
+    • (Web) Terminal zugang
+    • Durchsicht Log Files
+    • Managing Updates 
+    
+Network Management
+
+    • Disabling/Enabling interfaces
+    • Basic IP configuration (IP, subnet mask, gateway, DNS and such)
+    • Firewall changes (adding ports/services)
+    • Advanced configuration (VLAN creation for use in between VMs that require interconnectivity only between Vms)
+    • What about VPN?
+    • What about Firewall Management? 
+
+Management Storage
+    • Anlegen von Log. Volumes (entsprechend dem Storage Konzep9 
+    
+    
\ No newline at end of file
diff --git a/docs/modules/ROOT/pages/sysadmin-postinstall.adoc b/docs/modules/ROOT/pages/sysadmin-postinstall.adoc
index 945da3e..d7ede83 100644
--- a/docs/modules/ROOT/pages/sysadmin-postinstall.adoc
+++ b/docs/modules/ROOT/pages/sysadmin-postinstall.adoc
@@ -77,7 +77,7 @@ a. On your local workstation test key file based access:
 +
 adjust file, file type, and domain name as appropriate.
 
-a. To simplify access create a configuration file on your desktop and define a short name for the connection:
+b. To simplify access create a configuration file on your desktop and define a short name for the connection:
 +
 [source,]
 ----
@@ -98,7 +98,7 @@ Host myhost
 +
 again, replace names accordingly.
 
-a. Check if everything works:
+c. Check if everything works:
 +
 [source,]
 ----
@@ -291,7 +291,7 @@ a. Installation of the software and the required Postfix
 ----
 […]# dnf install fail2ban postfix
 ----
-a. Create and fill configuration file
+b. Create and fill configuration file
 +
 [source,]
 ----
@@ -310,14 +310,14 @@ backend = auto
 [sshd]
 enabled = true
 ----
-a. Activate software
+c. Activate software
 +
 [source,]
 ----
 […]# systemctl  enable  postfix  --now  
 […]# systemctl  enable  fail2ban  --now
 ----
-a. Control in the log
+d. Control in the log
 +
 [source,]
 ----

