From 0f17c8122da71df74d3dd3d99487d9a06f3ed5d7 Mon Sep 17 00:00:00 2001 From: Peter Boy Date: Jun 06 2021 09:54:45 +0000 Subject: Included first results of review by swefredde --- diff --git a/docs/modules/ROOT/pages/server-installation-sbc.adoc b/docs/modules/ROOT/pages/server-installation-sbc.adoc index 61f43eb..6cdf509 100644 --- a/docs/modules/ROOT/pages/server-installation-sbc.adoc +++ b/docs/modules/ROOT/pages/server-installation-sbc.adoc @@ -183,14 +183,15 @@ Directly at a terminal of the SBC we will make only the minimal, absolutely nece 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. +4. If you have a DHCP server on your LAN 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. Ich you don't have a DHCP server on your LAN type "3" and fill in your hostname and your network details. +6. Tap "c" to continue and finalize the configuration. After some waiting, the Fedora Server login prompt appears. + [IMPORTANT] ==== Always complete this step and close with 'c'. Otherwise this installation routine can on reboot again and again conflict with the subsequent configuration. ==== -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. +6. Above the user input, a line with the (temporary) name of the computer and an IP address is displayed. The name is "fedora" by default 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 @@ -236,6 +237,8 @@ With everything done reboot the system. In the overview screen select either reb 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. + +9. Finally, depending on the use case, you may need to ensure you can always track which person was logged in and when. Use Cockpits account management feature to comfortably create additional users and grant them administrativ permissions ("sudo"). You might want to lock the root account completely (postpone this until storage area configuration is completed). == Configuration of the storage area @@ -249,13 +252,15 @@ This is the simplest solution and the only sensible one for disks of up to 16gb. + This is the most flexible solution and preserves all options for the system administrator depending on the actual progression of usage. It is especially recommended for disks of 64gb and more, but should also be considered with a size of 32 gb. +3. You may reinforce the rationale of separating system and user data even further and create a separate partition and volume group for user data. This seems a bit far-fetched for a (small) SBC, but is nevertheless worth considering if a very large volume and correspondingly a large amount of data are present (a rule of thumb: larger 500 GB). + === Enlarge partition and volume group to fill the disk space -Alternate 1. and 2. as above start with the same administrative tasks. +Any of the alternatives as above start with the same administrative tasks. 1. Login via ssh or switch to terminal in Cockpit (logged in as root) 2. Use lsblk to determine the device name of your disk storage, most likely mmcblk1 -3. Invoke cfdisk with hat device name: +3. Invoke cfdisk with that device name: + [source,bash] ---- @@ -265,7 +270,14 @@ Alternate 1. and 2. as above start with the same administrative tasks. + image::serverinstall-sbc-090.png[Partition resize] -5. The suggested size fills the complete disk. Confirm with . Select "Write", confirm resizing and quit the program. +5. The suggested size fills the complete disk. ++ +In case of *alternative 1 or 2* confirm with . ++ +In case of *alternative 3* select a size for system VG, as a rule of thumb at least 10GB, max. 30 GB. ++ +Select "Write", confirm resizing and quit the program. + 6. Resize the volume group + [source,bash] @@ -274,7 +286,7 @@ image::serverinstall-sbc-090.png[Partition resize] Physical volume "/dev/mmcblk1p3" changed 1 physical volume(s) resized or updated / 0 physical volume(s) not resized ---- -7. Select "Storage" in Cockpit and inspect the Volume Group _fedora_fedora_ in the upper right corner. The displayed size now shows an amount that indicates a complete fill of the entire disc. +7. Select "Storage" in Cockpit and inspect the Volume Group _fedora_fedora_ in the upper right corner. The displayed size now shows an amount that indicates a complete fill of the entire disc rsp. as configured. 8. A click onto the fedora_fedora volume group brings up the logical volume view. In the "Logical volumes" list expand the root LV (/dev/fedora_fedora/root). + image::serverinstall-sbc-100.png[Volume resize] @@ -282,6 +294,8 @@ image::serverinstall-sbc-100.png[Volume resize] For *alternative 1.* select "Grow" and expand the volume to fill the complete available space. + For *alternative 2.* select "Grow" and expand the volume to sensible size. 10gb would be good to start with. ++ +For *alternative 3.* select "Grow" and expand the volume to a size that still leaves room for the unanticipated. An initial size for root between 8 and 12 GB would be good to start with. 9. Go back to the terminal. + @@ -292,6 +306,10 @@ For *alternative 2.* select "Grow" and expand the volume to sensible size. 10gb + Confirm that the size of the root file system is now of the specified value. +10. In case of alternative 3 use Cockpits storage to create an additional partition and volume group. + +Later, when you install applications and services you will use Cockpit storage to create logiocal volumes and mount them at the appropriate location. As an example you may create a logical volume "__postgresdata__", create an XFS filesystem and mount it at _/var/lib/pgsql_ before actually installing postgresql. + After all the major modifications to the file system, it is now advisable to reboot before any further work is done. == Troubleshooting == diff --git a/docs/modules/ROOT/pages/virtualization-install.adoc b/docs/modules/ROOT/pages/virtualization-install.adoc index d41149e..df9513f 100644 --- a/docs/modules/ROOT/pages/virtualization-install.adoc +++ b/docs/modules/ROOT/pages/virtualization-install.adoc @@ -17,9 +17,9 @@ Qemu-kvm in combination with Libvirt management toolkit is the standard virtuali QEMU / KVM require hardware virtualization support. The first thing to do is to make sure that it is available. [source,bash] ---- -[…]# grep --color vmx /proc/cpuinfo +[…]# egrep --color 'vmx|svm' /proc/cpuinfo ---- -The output spans multiple lines. Several times 'vmx' must be highlighted in red. If not, you should first check in the BIOS whether virtualization is disabled. +The command will return one line per cpu core if virtualization is enabled. If not, you should first check in the BIOS whether virtualization is disabled. Libvirt stores its data including the image files of the virtual hard disk(s) for the guest systems in /var/lib/libvirt. If you adhere to the default partitioning concept, the libvirt application data is stored in its own logical volume that you have to create in advance. You need to specify the size of the storage area, a unique name, and the accommodating VG (fedora_fedora in case of default partitioning). In the new logical volume, create an xfs file system and mount at /var/lib/libvirt.