From 8af389b989127aeca4245be7b85df023a9fdf2f9 Mon Sep 17 00:00:00 2001 From: Robert Bohne Date: Wed, 27 Dec 2023 20:39:50 +0100 Subject: [PATCH] Fix Issue #302 and update RHEL installation in general --- docs/hetzner.md | 18 ++++---- docs/hetzner_rhel9.md | 98 +++++++++++++++++++++---------------------- 2 files changed, 56 insertions(+), 60 deletions(-) diff --git a/docs/hetzner.md b/docs/hetzner.md index 7c276468..2457a56a 100644 --- a/docs/hetzner.md +++ b/docs/hetzner.md @@ -93,15 +93,15 @@ SWRAID 1 SWRAIDLEVEL 0 BOOTLOADER grub HOSTNAME my-cool-hostname -PART /boot ext3 512M -PART lvm vg0 all - -LV vg0 root / ext4 50G -LV vg0 swap swap swap 5G -LV vg0 tmp /tmp ext4 10G -LV vg0 home /home ext4 40G -LV vg0 var /var ext4 50G -LV vg0 libvirt /var/lib/libvirt/images xfs all +PART /boot ext4 1024M +PART lvm vg0 all + +LV vg0 root / xfs 50G +LV vg0 swap swap swap 5G +LV vg0 tmp /tmp xfs 10G +LV vg0 home /home xfs 40G +LV vg0 var /var xfs 50G +LV vg0 libvirt /var/lib/libvirt/images xfs all IMAGE /root/.oldroot/nfs/install/../images/CentOS-80-stream-amd64-base.tar.gz diff --git a/docs/hetzner_rhel9.md b/docs/hetzner_rhel9.md index bb0afcda..9929e2d9 100644 --- a/docs/hetzner_rhel9.md +++ b/docs/hetzner_rhel9.md @@ -31,7 +31,7 @@ Once installed and rebooted, login with previously given credentials and adjust ```shell # subscription-manager register --username $NAME # dnf install -y lvm2 mdadm tar bzip2 -# dnf upgrade +# dnf upgrade ``` #### Disable LVM system.devices @@ -69,7 +69,7 @@ Remove not required wireless firmware-drivers Unregister and remove cached files -```shell +```shell # subscription-manager unregister # subscription-manager clean # dnf clean all @@ -85,7 +85,7 @@ Finally, clean the history Create the image-archive, which can be uploaded to the rescue-shell ```shell -# tar cJvf /CentOS-91-el-x86_64-minimal.tar.xz --exclude=/dev --exclude=/proc --exclude=/sys --exclude=/CentOS-91-el-x86_64-minimal.tar.xz / +# tar cJvf /RHEL-91-el-amd64-minimal.tar.xz --exclude=/dev --exclude=/proc --exclude=/sys --exclude=/RHEL-91-el-amd64-minimal.tar.xz / ``` ## Install the image on your server @@ -95,16 +95,14 @@ Boot the Hetzner system into the Rescue Shell, create `config.txt` and upload th Based on the volume group name chosen during the image creation, one needs to adjust the `PART lvm vg0` in the `config.txt` file. Below is the example, based on the image created above. The name of the image should follow the used notation. Images beginning with `RHEL` won't work with `installimage`. ```txt -DRIVE1 /dev/sda -DRIVE2 /dev/sdb -DRIVE3 /dev/sdc -DRIVE4 /dev/sdd - -SWRAID 1 -SWRAIDLEVEL 0 -BOOTLOADER grub -HOSTNAME lab.froemer.net -PART /boot ext4 1024M +DRIVE1 /dev/nvme0n1 +DRIVE2 /dev/nvme1n1 + +SWRAID 1 +SWRAIDLEVEL 0 +BOOTLOADER grub +HOSTNAME my-cool-hostname +PART /boot ext4 1024M PART lvm vg0 500G LV vg0 root / xfs 40G @@ -114,9 +112,7 @@ LV vg0 tmp /tmp xfs 5G LV vg0 var /var xfs 10G LV vg0 libvirt /var/lib/libvirt/images xfs all -LV vg1 storage /data xfs all - -IMAGE /root/CentOS-91-el-x86_64-minimal.tar.xz +IMAGE /root/RHEL-91-el-amd64-minimal.tar.xz ``` To install the image, run the `installimage` command. @@ -134,45 +130,45 @@ The output should look like the following: Your server will be installed now, this will take some minutes You can abort at any time with CTRL+C ... - : Reading configuration done - : Loading image file variables done - : Loading centos specific functions done - 1/17 : Deleting partitions done - 2/17 : Test partition size done - 3/17 : Creating partitions and /etc/fstab done - 4/17 : Creating software RAID level 0 done - 5/17 : Creating LVM volumes done + : Reading configuration done + : Loading image file variables done + : Loading centos specific functions done + 1/17 : Deleting partitions done + 2/17 : Test partition size done + 3/17 : Creating partitions and /etc/fstab done + 4/17 : Creating software RAID level 0 done + 5/17 : Creating LVM volumes done 6/17 : Formatting partitions - : formatting /dev/md/0 with ext4 done - : formatting /dev/vg0/root with xfs done - : formatting /dev/vg0/swap with swap done - : formatting /dev/vg0/home with xfs done - : formatting /dev/vg0/tmp with xfs done - : formatting /dev/vg0/var with xfs done - : formatting /dev/vg0/libvirt with xfs done - : formatting /dev/vg1/storage with xfs done - 7/17 : Mounting partitions done - 8/17 : Sync time via ntp done - : Importing public key for image validation done - 9/17 : Validating image before starting extraction warn + : formatting /dev/md/0 with ext4 done + : formatting /dev/vg0/root with xfs done + : formatting /dev/vg0/swap with swap done + : formatting /dev/vg0/home with xfs done + : formatting /dev/vg0/tmp with xfs done + : formatting /dev/vg0/var with xfs done + : formatting /dev/vg0/libvirt with xfs done + : formatting /dev/vg1/storage with xfs done + 7/17 : Mounting partitions done + 8/17 : Sync time via ntp done + : Importing public key for image validation done + 9/17 : Validating image before starting extraction warn : No detached signature file found! - 10/17 : Extracting image (local) done - 11/17 : Setting up network config done + 10/17 : Extracting image (local) done + 11/17 : Setting up network config done 12/17 : Executing additional commands - : Setting hostname done - : Generating new SSH keys done - : Generating mdadm config done - : Generating ramdisk done - : Generating ntp config done - 13/17 : Setting up miscellaneous files done + : Setting hostname done + : Generating new SSH keys done + : Generating mdadm config done + : Generating ramdisk done + : Generating ntp config done + 13/17 : Setting up miscellaneous files done 14/17 : Configuring authentication - : Fetching SSH keys done - : Disabling root password done - : Disabling SSH root login with password done - : Copying SSH keys done - 15/17 : Installing bootloader grub done - 16/17 : Running some centos specific functions done - 17/17 : Clearing log files done + : Fetching SSH keys done + : Disabling root password done + : Disabling SSH root login with password done + : Copying SSH keys done + 15/17 : Installing bootloader grub done + 16/17 : Running some centos specific functions done + 17/17 : Clearing log files done INSTALLATION COMPLETE You can now reboot and log in to your new system with the