0

I am installing RHEL using a KS file. The installation stalls because of the Installation destination not being properly set, the message I'm getting is the following:

You have not defined a root partition (/), which is required for installation of Red Hat Enterprise Linux to continue.

You have not created a bootable partition

Here an image of the issue :

enter image description here

I cannot see where the problem is in my KS file

Here is the initial part of the kickstart ( I omitted the rest of the code )

rootpw --iscrypted xxxxxxxxx
timezone Americas/New_York
install
skipx
text
# url --url https://myurl.not.user.commented.out
auth --enableshadow --passalgo=sha512
reboot
ignoredisk --only-use=sda
lang en_US.UTF-8
#langsupport --default=en_US.UTF-8 en_US.UTF-8
keyboard us

# Network information
network  --bootproto=static --hostname=SRV-01.xxxxxx.com --device=eno3 --onboot=on --ipv6=auto --ip=192.xxx.xxx.xx --netmask=255.255.255.0 --gateway=192.xxx.xxx.xx --vlanid=411  --nameserver=xxx.xxx.xxx.xxx --nameserver=xxx.xxx.xxx.xxx --ipv6=auto --activate

firewall --disabled
selinux --disabled
%pre
  #!/bin/bash

  # Enable all executed commands to be printed to the terminal
  set -x
  # Disk configuration section
  ignoredisk --only-use=sda
  # zerombr
  # bootloader --location=mbr --append="biosdevname=0"
  clearpart --initlabel --all --drives=sda
  part /boot --fstype xfs --size=1024 --ondisk=sda --asprimary
  
  part pv.1 --size=1000 --grow --ondisk=sda --asprimary
  volgroup vgroot pv.1
  
  logvol /     --fstype xfs --name=lvroot --vgname=vgroot --size=4096
  logvol /usr  --fstype xfs --name=lvusr  --vgname=vgroot --size=4096
  logvol /tmp  --fstype xfs --name=lvtmp  --vgname=vgroot --size=10240
  logvol /var  --fstype xfs --name=lvvar  --vgname=vgroot --size=7168
  logvol /apps --fstype xfs --name=lvapps --vgname=vgroot --size=5632
  logvol /var/crash --fstype xfs --name=lvcrash --vgname=vgroot --size=12288
  logvol swap  --fstype swap --name=lvswap --vgname=vgroot --size=2048
  logvol /home --fstype xfs --name=lvhome --vgname=vgroot --size=512
  
  logvol /apps/tools      --fstype xfs --name=lvITT --vgname=vgroot --size=22528
  logvol /usr/local       --fstype xfs --name=lvlocal --vgname=vgroot --size=256
%end

Danilo

2 Answers 2

1

You're declaring your partition layout inside a %pre block. The %pre block is executed as a script prior to reading the kickstart file, but is not included as part of the kickstart file at read time. In addition, the block inside the %pre and %end is not a script, so it will not execute properly.

I believe what you want to do is to simply remove the %pre, #!/bin/bash, set -x, and %end lines. I strongly recommend you uncomment the zerombr and bootloader lines as well; the former ensures that the MBR of the disk is zeroed out prior to creating the new layout, the latter ensures the bootloader is installed in the MBR.

1
  • Thank you very very much @john ! Commented Nov 11, 2021 at 14:46
0

Information about Kickstart sections:

A.3.1. %pre script

The %pre scripts are run on the system immediately after the Kickstart file has been loaded, but before it is completely parsed and installation begins.  ...

The %pre script can be used for activation and configuration of networking and storage devices.  ...

     ︙

You can access the network in the %pre section.  However, the name service has not been configured at this point, so only IP addresses work, not URLs.

     ︙

A.3.2. %pre-install script

The commands in the pre-install script are run after the following tasks are complete:

  • System is partitioned
  • Filesystems are created and mounted under /mnt/sysroot
  • Network has been configured according to any boot options and kickstart commands

     ︙

The %pre-install scripts can be used to modify the installation, and to add users and groups with guaranteed IDs before package installation.


        ︙

A.3.3. %post script

The %post script is a post-installation script that is run after the installation is complete, but before the system is rebooted for the first time.  You can use this section to run tasks such as system subscription.

You have the option of adding commands to run on the system once the installation is complete, but before the system is rebooted for the first time.  ...

     ︙

Because post-install script runs in a chroot environment, most systemctl commands will refuse to perform any action.

Source: Performing an advanced RHEL 8 installation,  Appendix A.  Kickstart script file format reference.

1
  • (1) Please use code formatting only for code (including commands, scripts, file names, etc.), not for natural-language text.  (2) If you copy something that somebody else wrote, please identify the source.  (3) Please don’t just dump information without actually presenting an answer to the question. Commented Jul 16, 2022 at 19:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .