Enterprise Linux

 View Only

Installation of RHEL 9 with LVM

By Michal Wiktorek posted Tue September 10, 2024 01:42 PM

  

Introduction

One of the many advantages of IBM Power servers is the ability to run multiple operating systems simultaneously. The POWER architecture is mainly associated with AIX and IBM i systems, but Linux distributions also undoubtedly have their place and use here.
Of course, there can be debates about which is better - AIX or Linux. However, I believe the most important thing is to choose the system based on business requirements and needs, and in this case, one does not exclude the other on the same hardware platform.

An undeniable advantage of Linux distributions is the vast availability of software and repositories, so using the ppc64le architecture can be a sensible choice, for example, for databases popular on x86 servers. In contrast, with AIX, this might require compilation from source if the software provider has not ensured availability for different operating systems. One of the advantages of running Linux on the ppc64le architecture is the ability to leverage the performance of Power10 processors, with 8 threads per core (which is currently impossible for x86 servers), as well as benefits like PowerVM virtualization and, for instance, hardware component redundancy at the VIOS level, the use of NPIV, and so on.

In this article, I would like to describe something that I believe has not been sufficiently well documented and may cause some difficulties - the installation of RedHat Enterprise Linux with LVM.

In the following parts of this topic, I plan to describe the next steps after installation, such as installing Cloud-Init, configuration, and preparing an image for PowerVC so that the ready RHEL 9 image with LVM can be used for provisioning LPARs in a private cloud. The manual installation process is somewhat tedious, but it will only be required once if it is used to later create an image.

Ready qcow2 Image from Red Hat

For AIX, a convenient option is to use a Cloud-Ready image, which is a system image ready for use in a private cloud and already includes cloud-init.
Similarly, I thought that a good approach might be to download an equivalent image from RedHat's site.

I found a ready qcow2 image and performed a dd operation to the disk that I had already created and prepared for the image. I then prepared the image and an appropriate Compute Template in PowerVC and proceeded with a test deployment. It's important to note that the ready image does not allow password login, so you need to have SSH keys configured in PowerVC.

After deploying the LPAR with RHEL 9, the partition layout looks as follows:

# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        4.0M     0  4.0M   0% /dev
tmpfs           3.7G     0  3.7G   0% /dev/shm
tmpfs           1.5G   22M  1.5G   2% /run
/dev/sdb3        32G  2.1G   30G   7% /
/dev/sda2       536M  184M  353M  35% /boot
tmpfs           755M     0  755M   0% /run/user/0

Of course, there can be discussions about whether it makes sense to use LVM for system disks in cloud environments nowadays. Both the approach with standard partitions and LVM will certainly have their supporters and opponents.

Personally, I prefer the approach known from AIX systems, so I’m not a fan of classic partitions and prefer to take advantage of LVM. Of course, everyone is entitled to their opinion, but a system running on traditional partitions, which I consider a somewhat outdated invention, wasn’t satisfying for me. RedHat provides an Image Builder tool on their website for preparing custom images, but it only supports the x86_64 and aarch64 architectures. Unfortunately, ppc64le architecture is not available here.

Therefore, I decided that it would be simpler to install RHEL 9 and prepare my own image with LVM.

As a reference point, I used the layout from the AIX 7.2 system (of course, not a 1-to-1 copy, as the goal isn't to turn Linux into AIX at all costs :)).

Name             Mount Pt               VFS   
/dev/hd4         /                      jfs2  
/dev/hd1         /home                  jfs2  
/dev/hd2         /usr                   jfs2  
/dev/hd9var      /var                   jfs2  
/dev/hd3         /tmp                   jfs2  
/dev/hd11admin   /admin                 jfs2  
/dev/hd10opt     /opt                   jfs2  
/dev/livedump    /var/adm/ras/livedump  jfs2  
/proc            /proc                  procfs

Installation from ISO image

It's important to note that the LPAR on which RHEL 9.3 will be installed must have a profile set in Power10 processor compatibility mode - if the compatibility mode is set to something like Power9, a kernel panic will occur.

The ISO image should be downloaded from the RedHat website, making sure to select the correct architecture, which is ppc64le, and the product name, "Red Hat Enterprise Linux for Power, little endian."
It’s worth knowing that Power servers, starting from the Power8 generation, support both Big Endian and Little Endian byte order, but new Linux distributions are typically released only in the Little Endian version.

After loading the installation image from the ISO (in this case, via a virtual optical device over vSCSI) and using the virtual terminal of the HMC console for the selected LPAR, you should see the GRUB screen:

                               GRUB version 2.06

 +----------------------------------------------------------------------------+
 |*Install Red Hat Enterprise Linux 9.3 (64-bit kernel)                       | 
 | Test this media & install Red Hat Enterprise Linux 9.3  (64-bit kernel)    |
 | Rescue a Red Hat Enterprise Linux system (64-bit kernel)                   |
 | Other options...                                                           |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            | 
 +----------------------------------------------------------------------------+

      Use the ^ and v keys to select which entry is highlighted.          
      Press enter to boot the selected OS, `e' to edit the commands       
      before booting or `c' for a command-line.                           


After confirming the installation option, a screen should appear allowing you to choose the installation mode. In this article, I assume the use of PowerVM virtualization, which means without a graphical card option.
Red Hat recommends installing RHEL 9 using a graphical environment, as the text mode is somewhat limited in comparison. I am not sure if it is possible to use VNC at this stage, but in any case, I was not able to do so.
The only installation option available to me was the text mode, which is option number 2.

Starting installer, one moment...
anaconda 34.25.3.8-1.el9 for Red Hat Enterprise Linux 9.3 started.
 * installation log files are stored in /tmp during the installation
 * shell is available on TTY2
 * when reporting a bug add logs from /tmp as separate text/plain attachments

X or window manager startup failed, falling back to text mode.
================================================================================
================================================================================
X was unable to start on your machine. Would you like to start VNC to connect to
this computer from another computer and perform a graphical installation or
continue with a text mode installation?

1) Start VNC
2) Use text mode

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: 





[anaconda]1:main* 2:shell  3:log  4:storage-log >Switch tab: Alt+Tab | Help: F1 

The Anaconda installer screen in text mode looks as shown below. In theory, it allows you to select the target mount points (option 5 - Installation Destination), but what surprised me greatly was the lack of LVM configuration options in the text mode.
The Anaconda installer in text mode only allows you to select already existing devices.

Warning: Processor has Simultaneous Multithreading (SMT) enabled

Simultaneous Multithreading (SMT) may improve performance for certain workloads,
but introduces several publicly disclosed security issues. You can disable SMT,
which may impact performance. Please read https://red.ht/rhel-smt to understand
potential risks and learn about ways to mitigate these risks.
================================================================================
================================================================================
Installation

1) [x] Language settings                 2) [x] Time settings
       (English (United States))                (America/New_York timezone)
3) [!] Installation source               4) [!] Software selection
       (Processing...)                          (Processing...)
5) [!] Installation Destination          6) [x] Kdump
       (Processing...)                          (Kdump is enabled)
7) [x] Network configuration             8) [!] Root password
       (Unknown)                                (Root account is disabled)
9) [!] User creation
       (No user will be created)

Please make a selection from the above ['b' to begin installation, 'q' to quit,
'r' to refresh]: 
[anaconda]1:main* 2:shell  3:log  4:storage-log >Switch tab: Alt+Tab | Help: F1 

If using the graphical mode is not possible and the text mode is this limited, how can you set up LVM?

During the installation, it is possible to switch to a shell session, but NOTE: The text installer runs on a tmux session (https://github.com/tmux/tmux/wiki), so to switch to the shell session, you need to use the keyboard shortcut CTRL + B and then press 2 (as indicated on the bottom bar of the screen).
It’s important to note that there may be an issue with handling this keyboard shortcut, depending on the webbrowser (if using the GUI version of the virtual terminal) or the terminal connected via SSH to the HMC console.
If the keyboard shortcut doesn’t work, try connecting using a different SSH client or web browser when using the GUI console.

Partitioning

3 partitions are needed:

  • PPC PReP Boot - a partition intended for the YABOOT boot loader. It should be between 4 and 8 MB
  • Boot partition (/boot)
  • A partition for the Physical Volume (PV) of LVM

The most flexible solution would be to use a Physical Volume directly on the available disk, without using partitions. Unfortunately, for the operating system disk space, this is not supported by Red Hat.

Red Hat’s knowledge base mentions that both /boot and /boot/efi must be on a local partition, without LVM: https://access.redhat.com/solutions/2022923

In the shell session, to create a PV (Physical Volume), you first need to identify the disk device name. In my case, I’m using a device mapper with multipathing support, so the device is /dev/mapper/mpatha, which consists of sda and sdb. You can view disk devices using commands like lsblk or multipath -ll if you are using multipath support.

[anaconda root@localhost ~]# lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
loop0         7:0    0 753.9M  1 loop  
loop1         7:1    0     3G  1 loop  
├─live-rw   253:1    0     3G  0 dm    /
└─live-base 253:2    0     3G  1 dm    
loop2         7:2    0    32G  0 loop  
└─live-rw   253:1    0     3G  0 dm    /
sda           8:0    0    32G  0 disk  
└─mpatha    253:0    0    32G  0 mpath 
sdb           8:16   0    32G  0 disk  
└─mpatha    253:0    0    32G  0 mpath 
sr0          11:0    1   7.9G  0 rom   /run/install/sources/mount-0000-cdrom
                                       /run/install/repo
zram0       252:0    0   7.8G  0 disk  [SWAP]

# multipath -ll
mpatha (XXXXXXXXXXXXXX00000000000XXX) dm-0 AIX,VDASD
size=32G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
  |- 0:0:1:0 sdb 8:16 active ready running
  `- 1:0:2:0 sda 8:0  active ready running

fdisk tool

In my opinion, creating partitions with fdisk is not the most intuitive task, so I’ve tried to describe it as clearly as possible.

Using the fdisk tool, we select the device that will serve as the system disk:

[anaconda root@localhost ~]# fdisk /dev/mapper/mpatha

Welcome to fdisk (util-linux 2.37.4).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.


Command (m for help): 

We create the first partition with a size of 4 MB by entering the following commands:

  • "n" (new partition)
  • "p" (primary partition)
  • 1 (partition number)
  • For the first sector, simply press enter to confirm the default value
  • For the last sector, specify the size by entering +4MB

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-67108863, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-67108863, default 67108863): 
 +4M

Created a new partition 1 of type 'Linux' and of size 4 MiB.

Command (m for help): 

By default, a Linux-type partition is created. We need to change it to "PPC PReP Boot", so we change its type by entering "t" (type) and the code 41, which corresponds to "41 PPC PReP Boot".

Command (m for help): t
Selected partition 1
Hex code or alias (type L to list all): 41
Changed type of partition 'Linux' to 'PPC PReP Boot'.

Command (m for help): 

The list of all codes can be displayed by entering "l"

Command (m for help): l

00 Empty            24 NEC DOS          81 Minix / old Lin  bf Solaris        
01 FAT12            27 Hidden NTFS Win  82 Linux swap / So  c1 DRDOS/sec (FAT-
02 XENIX root       39 Plan 9           83 Linux            c4 DRDOS/sec (FAT-
03 XENIX usr        3c PartitionMagic   84 OS/2 hidden or   c6 DRDOS/sec (FAT-
04 FAT16 <32M       40 Venix 80286      85 Linux extended   c7 Syrinx         
05 Extended         41 PPC PReP Boot    86 NTFS volume set  da Non-FS data    
06 FAT16            42 SFS              87 NTFS volume set  db CP/M / CTOS / .
07 HPFS/NTFS/exFAT  4d QNX4.x           88 Linux plaintext  de Dell Utility   
08 AIX              4e QNX4.x 2nd part  8e Linux LVM        df BootIt         
09 AIX bootable     4f QNX4.x 3rd part  93 Amoeba           e1 DOS access     
0a OS/2 Boot Manag  50 OnTrack DM       94 Amoeba BBT       e3 DOS R/O        
0b W95 FAT32        51 OnTrack DM6 Aux  9f BSD/OS           e4 SpeedStor      
0c W95 FAT32 (LBA)  52 CP/M             a0 IBM Thinkpad hi  ea Linux extended 
0e W95 FAT16 (LBA)  53 OnTrack DM6 Aux  a5 FreeBSD          eb BeOS fs        
0f W95 Ext'd (LBA)  54 OnTrackDM6       a6 OpenBSD          ee GPT            
10 OPUS             55 EZ-Drive         a7 NeXTSTEP         ef EFI (FAT-12/16/
11 Hidden FAT12     56 Golden Bow       a8 Darwin UFS       f0 Linux/PA-RISC b
12 Compaq diagnost  5c Priam Edisk      a9 NetBSD           f1 SpeedStor      
14 Hidden FAT16 <3  61 SpeedStor        ab Darwin boot      f4 SpeedStor      
16 Hidden FAT16     63 GNU HURD or Sys  af HFS / HFS+       f2 DOS secondary  
17 Hidden HPFS/NTF  64 Novell Netware   b7 BSDI fs          fb VMware VMFS    
18 AST SmartSleep   65 Novell Netware   b8 BSDI swap        fc VMware VMKCORE 
1b Hidden W95 FAT3  70 DiskSecure Mult  bb Boot Wizard hid  fd Linux raid auto
1c Hidden W95 FAT3  75 PC/IX            bc Acronis FAT32 L  fe LANstep        
1e Hidden W95 FAT1  80 Old Minix        be Solaris boot     ff BBT            

The next partition we need is the Boot partition. According to RedHat documentation, for RHEL 9, the /boot size should be at least 1 GB.
(https://access.redhat.com/documentation/gu-in/red_hat_enterprise_linux/9/html/performing_a_standard_rhel_9_installation/partitioning-reference_installing-rhel)

We create the second partition with a size of 1 GB by entering the following commands:

  • "n" (new partition)
  • "p" (primary partition)
  • 2 (partition number)
  • For the first sector, press enter to confirm the default value
  • For the last sector, specify the size by entering +1GB

Command (m for help): n
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (10240-67108863, default 10240): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (10240-67108863, default 67108863): 
  +1G

Created a new partition 2 of type 'Linux' and of size 1 GiB.

The partition type may be set to Linux by default, and this type can be left as is.

The last partition we want to create is the partition designated for LVM:
We create the third partition using the remaining available space by entering the following commands:

  • "n" (new partition)
  • "p" (primary partition)
  • 3 (partition number)
  • For the first sector, press enter to confirm the default value
  • For the last sector, press enter to confirm the default value, which should point to the last sector.

Command (m for help): n
Partition type
   p   primary (2 primary, 0 extended, 2 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (3,4, default 3): 3
First sector (2107392-67108863, default 2107392): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2107392-67108863, default 67108863): 


Created a new partition 3 of type 'Linux' and of size 31 GiB.

Command (m for help): 

The type of the third partition should be changed to "Linux LVM" by entering the code "8e".

Command (m for help): t
Partition number (1-3, default 3): 3
Hex code or alias (type L to list all): 8e

Changed type of partition 'Linux' to 'Linux LVM'.

Command (m for help): 

Finally, the partition table needs to be saved by entering "w" and "q" to exit. You can list the created partitions by using "p".

Command (m for help): w
The partition table has been altered.

The kernel still uses the old partitions. The new table will be used at the next reboot. 

Syncing disks.

Command (m for help): p

Disk /dev/mapper/mpatha: 32 GiB, 34359738368 bytes, 67108864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x14fc63d2

Device              Boot   Start      End  Sectors Size Id Type
/dev/mapper/mpatha1         2048    10239     8192   4M 41 PPC PReP Boot
/dev/mapper/mpatha2        10240  2107391  2097152   1G 83 Linux
/dev/mapper/mpatha3      2107392 67108863 65001472  31G 8e Linux LVM

Command (m for help): q

Now when the partitions are created, it’s time to move on to LVM and create a PV (Physical Volume).

We use the standard pvcreate command and specify the device referring to the third partition of the disk device as a parameter.

[anaconda root@localhost ~]# pvcreate /dev/mapper/mpatha3 
  Physical volume "/dev/mapper/mpatha3" successfully created.
  Creating devices file /etc/lvm/devices/system.devices
[anaconda root@localhost ~]# 

Next, we create a VG (Volume Group) named rootvg (I borrowed the name from AIX ;)).

[anaconda root@localhost ~]# vgcreate rootvg /dev/mapper/mpatha3 
  Volume group "rootvg" successfully created

Now it's time for LV (Logical Volumes). There is, of course, flexibility in setting up the layout, but as an example, I proposed a sample configuration. Mount points and the number of volumes are individual choices.
Logical volumes in LVM can be expanded, so it's better to initially create them at a good enough size and then extend them as needed later. (It’s also worth remembering that the XFS filesystem in RHEL cannot be reduced, unlike JFS2 in AIX.)

LV		 |	Mountpoint | Size   |
-----------------------|---------
lv_root  |	/		   | 1 GB   |
lv_usr	 |	/usr	   | 4 GB   |
lv_home  |	/home	   | 512 MB |
lv_opt   |	/opt	   | 512 MB |
lv_var   |	/var       | 3 GB   |
lv_tmp   |	/tmp       | 512 MB |
lv_swap  |	SWAP	   | 16 GB  |
---------------------------------

Sample commands for creating LVs may look like this:

# lvcreate -n lv_root -L 1G rootvg
# lvcreate -n lv_usr  -L 4G rootvg
# lvcreate -n lv_home -L 512M rootvg
# lvcreate -n lv_opt  -L 512M rootvg
# lvcreate -n lv_var  -L 3G rootvg
# lvcreate -n lv_tmp  -L 512M rootvg
# lvcreate -n lv_swap -L 16G rootvg

[anaconda root@localhost ~]# lvcreate -n lv_root -L 1G rootvg
  Logical volume "lv_root" created.
[anaconda root@localhost ~]# lvcreate -n lv_usr  -L 2G rootvg
  Logical volume "lv_usr" created.
[anaconda root@localhost ~]# lvcreate -n lv_home -L 512M rootvg
  Logical volume "lv_home" created.
[anaconda root@localhost ~]# lvcreate -n lv_opt  -L 512M rootvg
  Logical volume "lv_opt" created.
[anaconda root@localhost ~]# lvcreate -n lv_var  -L 3G rootvg
  Logical volume "lv_var" created.
[anaconda root@localhost ~]# lvcreate -n lv_tmp  -L 512M rootvg
  Logical volume "lv_tmp" created.
[anaconda root@localhost ~]# lvcreate -n lv_swap -L 16G rootvg
  Logical volume "lv_swap" created.

The created logical volumes can be listed with the commands lvs , lvscan or lvdisplay

[anaconda root@localhost ~]# lvs
  LV      VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lv_home rootvg -wi-a----- 512.00m                                                    
  lv_opt  rootvg -wi-a----- 512.00m                                                    
  lv_root rootvg -wi-a-----   1.00g                                                    
  lv_swap rootvg -wi-a-----   16.00g                                                    
  lv_tmp  rootvg -wi-a----- 512.00m                                                    
  lv_usr  rootvg -wi-a-----   2.00g                                                    
  lv_var  rootvg -wi-a-----   3.00g                                                    

After creating all LVs, we can reboot the system and enter SMS mode again to reload the system installation. Returning to the Anaconda installer screen and scanning the disks might not give the same assurance as a restart and rediscovery of all devices.

Once the installer restarts in text mode, select option 5) Installation Destination, then type "c" and press Enter.

Probing storage...
================================================================================
================================================================================
Installation Destination

1) [x] VDASD: 32 GiB (mpatha), XXXXXXXXXXXXX00000000000XXXX

1 disk selected; 32 GiB capacity; 1008 KiB free

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: c
[anaconda]1:main* 2:shell  3:log  4:storage-log >Switch tab: Alt+Tab | Help: F1 

Change the default selection to "Manually assign mount points" by pressing 4 and confirming, then proceed (press "c" and Enter).

================================================================================
================================================================================
Partitioning Options

1) [ ] Replace Existing Linux system(s)
2) [x] Use All Space
3) [ ] Use Free Space
4) [ ] Manually assign mount points

Installation requires partitioning of your hard drive. Select what space to use
for the install target or manually assign mount points.

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: 
[anaconda]1:main* 2:shell  3:log  4:storage-log >Switch tab: Alt+Tab | Help: F1 

The next screen should look like the one shown below. All previously created LVs with their sizes should be visible.

================================================================================
================================================================================
Assign mount points

1) /dev/mapper/rootvg-lv_home (512       6) /dev/mapper/rootvg-lv_usr (4 GiB)
   MiB)
2) /dev/mapper/rootvg-lv_opt (512 MiB)   7) /dev/mapper/rootvg-lv_var (3 GiB)
3) /dev/mapper/rootvg-lv_root (1024      8) /dev/mapper/mpatha1 (4 MiB)
   MiB)                                      prepboot
4) /dev/mapper/rootvg-lv_swap (16 GiB)    9) /dev/mapper/mpatha2 (1024 MiB)
5) /dev/mapper/rootvg-lv_tmp (512 MiB)

Choose device from above to assign mount point and set format.
Formats marked with * are new formats meaning ALL DATA on the original format
WILL BE LOST!

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh, 's' to rescan devices]: 
[anaconda]1:main* 2:shell  3:log  4:storage-log >Switch tab: Alt+Tab | Help: F1

For each entry, select the appropriate mount point and formatting.
For example, select the entry for lv_home by pressing 1.

================================================================================
================================================================================
Configure device: /dev/mapper/rootvg-lv_home

1) Mount point
   none
2) Format
   none
3) [ ] Reformat

Choose from above to assign mount point and/or set format.

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: 
[anaconda]1:main* 2:shell  3:log  4:storage-log >Switch tab: Alt+Tab | Help: F1

First, enter 2 to set the format to XFS (the default and recommended in newer versions of RHEL), and then press 1 to set the correct mount point. Entering option 1 without first selecting the format will not work, so pay attention to the order.

================================================================================
================================================================================
Configure device: /dev/mapper/rootvg-lv_home

1) Mount point
   /home
2) Format
   xfs
3) [x] Reformat

Choose from above to assign mount point and/or set format.

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: 
[anaconda]1:main* 2:shell  3:log  4:storage-log >Switch tab: Alt+Tab | Help: F1

We set all volumes similarly. The exception here is the prepboot and swap partitions, for which we do not specify a mount point, only the appropriate format (prepboot and swap, respectively).

================================================================================
================================================================================
Configure device: /dev/mapper/mpatha1

1) Mount point
   PPC PReP Boot
2) Format
   prepboot
3) [ ] Reformat

Choose from above to assign mount point and/or set format.

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: 
[anaconda]1:main* 2:shell  3:log  4:storage-log >Switch tab: Alt+Tab | Help: F1

After setting all the entries, the screen should look similar to the one shown below:

================================================================================
================================================================================
Assign mount points

1) /dev/mapper/rootvg-lv_home (512       6) /dev/mapper/rootvg-lv_usr (2 GiB)
   MiB)                                      xfs*, /usr
    xfs*, /home
2) /dev/mapper/rootvg-lv_opt (512 MiB)   7) /dev/mapper/rootvg-lv_var (3 GiB)
                                             xfs*, /var
    xfs*, /opt
3) /dev/mapper/rootvg-lv_root (1024      8) /dev/mapper/mpatha1 (4 MiB)
   MiB)                                      prepboot
    xfs*, /
4) /dev/mapper/rootvg-lv_swap (2 GiB)    9) /dev/mapper/mpatha2 (1024 MiB)
    swap*                                    xfs*, /boot
5) /dev/mapper/rootvg-lv_tmp (512 MiB)
   
    xfs*, /tmp

Choose device from above to assign mount point and set format.
Formats marked with * are new formats meaning ALL DATA on the original format
WILL BE LOST!

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh, 's' to rescan devices]: 
[anaconda]1:main* 2:shell  3:log  4:storage-log >Switch tab: Alt+Tab | Help: F1 

After selecting "c", we return to the main screen of the Anaconda installer.

The remaining options can be left according to individual needs. They can also be configured after the system installation, but I think it's worth at least setting the following:

  • Change "Software selection" from the default "Server with GUI" to something more suitable for a server, such as Minimal Install, since we most likely won't be using the graphical environment.

    ================================================================================
    ================================================================================
    Software selection
    
    Base environment
    
    1) [ ] Server with GUI                  4) [ ] Workstation
    2) [ ] Server                           5) [ ] Custom Operating System
    3) [x] Minimal Install
    
    Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
    refresh]: 
    [anaconda]1:main* 2:shell  3:log  4:storage-log >Switch tab: Alt+Tab | Help: F1
  • Set the password for the root account/create a user account
  • Set the time zone
  • Set the hostname and network

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: c
================================================================================
================================================================================
Installation

1) [x] Language settings                 2) [x] Time settings
       (English (United States))                (America/New_York timezone)
3) [x] Installation source               4) [x] Software selection
       (Local media)                            (Minimal Install)
5) [x] Installation Destination          6) [x] Kdump
       (Custom partitioning selected)           (Kdump is enabled)
7) [x] Network configuration             8) [x] Root password
       (Unknown)                                (Root password is set)
9) [x] User creation
       (Administrator user will be
       created)

Please make a selection from the above ['b' to begin installation, 'q' to quit,
'r' to refresh]: 
[anaconda]1:main* 2:shell  3:log  4:storage-log >Switch tab: Alt+Tab | Help: F1

To start the installation, type "b" and press Enter.

================================================================================
================================================================================
Progress

.
Setting up the installation environment
Configuring storage
Creating xfs on /dev/mapper/mpatha2
Creating xfs on /dev/mapper/rootvg-lv_var
Creating xfs on /dev/mapper/rootvg-lv_usr
Creating xfs on /dev/mapper/rootvg-lv_tmp
Creating swap on /dev/mapper/rootvg-lv_swap
Creating xfs on /dev/mapper/rootvg-lv_root
Creating xfs on /dev/mapper/rootvg-lv_opt
Creating xfs on /dev/mapper/rootvg-lv_home
...
Running pre-installation scripts
.
Running pre-installation tasks
....
Installing.
Starting package installation process
Downloading packages
Preparing transaction from installation source

[anaconda]1:main* 2:shell  3:log  4:storage-log >Switch tab: Alt+Tab | Help: F1 

After the installation is complete, confirm with enter and wait for the system to restart

Installation complete. Press ENTER to quit:

Once logged into the system, we should see a volume layout somewhat familiar to AIX administrators. 

# df -h
Filesystem                  Size  Used Avail Use% Mounted on
devtmpfs                    4.0M     0  4.0M   0% /dev
tmpfs                       3.7G     0  3.7G   0% /dev/shm
tmpfs                       1.5G   14M  1.5G   1% /run
/dev/mapper/rootvg-lv_root  960M   62M  899M   7% /
/dev/mapper/rootvg-lv_usr   2.0G  1.1G  874M  56% /usr
/dev/mapper/rootvg-lv_var   3.0G  147M  2.8G   5% /var
/dev/mapper/rootvg-lv_home  448M   29M  420M   7% /home
/dev/mapper/rootvg-lv_opt   448M   29M  420M   7% /opt
/dev/mapper/rootvg-lv_tmp   448M   30M  419M   7% /tmp
/dev/mapper/mpatha2         960M  282M  679M  30% /boot
tmpfs                       755M     0  755M   0% /run/user/0

Summary

Manual installation of RHEL 9 without a graphical environment is not particularly convenient, but it’s worth doing at least once to be able to prepare a system image tailored to our individual needs later on.
In the next part, I will describe the steps related to preparing an image for PowerVC, such as setting up repositories, installing Cloud-Init, and configuration that allows efficient and universal deployment of new LPARs with the RHEL system.

Like anyone, I make mistakes - if you find any errors in the text or disagree with me on any point, feel free to reach out on LinkedIn :)

0 comments
43 views

Permalink