Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
1 answers
2121 views
How to set the interface name in `kickstart.cfg` file?
How to set the interface name in `kickstart.cfg` file? We know if we install CentOS system in a Server, there maybe `eth0`, `ens0`, `ensxxx`, `eno1` and so on. I have questions, 1. Why does it generate different interface names? why not all `eth0`? 2. Is it possible to configure the interface name i...
How to set the interface name in kickstart.cfg file? We know if we install CentOS system in a Server, there maybe eth0, ens0, ensxxx, eno1 and so on. I have questions, 1. Why does it generate different interface names? why not all eth0? 2. Is it possible to configure the interface name in the kickstart.cfg?
244boy (685 rep)
Sep 24, 2019, 02:54 PM • Last activity: Jul 12, 2025, 01:01 PM
1 votes
2 answers
3946 views
How is the size of an LVM volume calculated?
Today I'm configuring kickstart, and when I tried to set the LVM sizes, Anacond protests that there is no free space to create LVM with VG size. Well I could figure out that --grow option can continue the installation w/out prompt to solve this problem, but I need to know how I can calculate the cor...
Today I'm configuring kickstart, and when I tried to set the LVM sizes, Anacond protests that there is no free space to create LVM with VG size. Well I could figure out that --grow option can continue the installation w/out prompt to solve this problem, but I need to know how I can calculate the correct VG size to group my LVMs? I just could see something related in AIX system but I thing that is not about my question, and no that isn't a bug. Error: **storage configuration failed: ('new lv is too large to fit in free space', 'vg00')** The wrong configuration: part /boot --fstype="xfs" --ondisk=vda --size=500 part pv.01 --fstype="lvmpv" --ondisk=vda --size=9500 --grow volgroup vg00 --pesize=4096 pv.01 logvol / --fstype="xfs" --size=9000 --name=root --vgname=vg00 logvol swap --fstype="swap" --size=250 --name=swap --vgname=vg00 logvol /home --fstype="xfs" --size=250 --name=home --vgname=vg00 The correct configuration: part /boot --fstype="xfs" --ondisk=vda --size=500 part pv.100 --fstype="lvmpv" --ondisk=vda --size=9739 volgroup vg00 --pesize=4096 pv.100 logvol swap --fstype="swap" --size=250 --name=swap --vgname=vg00 logvol /home --fstype="xfs" --size=250 --name=home --vgname=vg00 logvol / --fstype="xfs" --size=9000 --name=root --vgname=vg00 When I used the --grow option in partition, the kickstart create a anaconda-ks.cfg with that configuration above, I just can't understand how the size=14079 is calculated. The original-ks.cfg have the option --grow ;) Could someone give a idea about LVM math? Thx
bugsam (11 rep)
Sep 22, 2017, 07:36 PM • Last activity: Jun 8, 2025, 09:05 PM
2 votes
1 answers
5714 views
prompt for network setup during kickstart installation centos7
I am trying to set the IP manually during a kickstart installation using CentOS 7. During the installation it has to prompt for the network setup. I tried using the below configuration : `network --device=enp0s3 --bootproto=static` But this doesn't prompt for network setup. I tried `network device=e...
I am trying to set the IP manually during a kickstart installation using CentOS 7. During the installation it has to prompt for the network setup. I tried using the below configuration : network --device=enp0s3 --bootproto=static But this doesn't prompt for network setup. I tried network device=enp0s3 --bootproto=query and asknetwork too, but both are deprecated. I am aware that we can set it as network --bootproto=static --ip=192.168.1.120 inside the kickstart file, but I do not want it that way.
Shashi kumar S (121 rep)
Jul 7, 2016, 05:26 AM • Last activity: Jun 3, 2025, 10:04 AM
-1 votes
0 answers
64 views
setting up PXE and DHCP server on RHEL VM
So I am trying to setup a kickstart server with pxeboot and dhcp server (for ks) on RHEL 8 VM. When I capture network traffic I do not see any pxe/tftp traffic coming to the VM or the host.... I tried following: host: RHEL 8.10 kickstart server: RHEL 8.10 VM client: RHEL 7 physical host on other sub...
So I am trying to setup a kickstart server with pxeboot and dhcp server (for ks) on RHEL 8 VM. When I capture network traffic I do not see any pxe/tftp traffic coming to the VM or the host.... I tried following: host: RHEL 8.10 kickstart server: RHEL 8.10 VM client: RHEL 7 physical host on other subnet using pxeboot on server side, I opened ports as follows on kvm host and VM both: # firewall-cmd --add-service dhcp --perm # firewall-cmd --add-service tftp --perm # firewall-cmd --permanent --new-policy tftp-client-data # firewall-cmd --permanent --policy tftp-client-data --add-ingress-zone HOST # firewall-cmd --permanent --policy tftp-client-data --add-egress-zone ANY # firewall-cmd --permanent --policy tftp-client-data --add-service tftp # firewall-cmd --reload All config is on KVM VM acting as kickstart server. Only reason i included/mentioned KVM host in this post is - I suspect we need some config there too... I am not sure. dhcp and tftpserver service is enabled and running just fine. dhcp.conf file has 2 subnets defined. 1 for local VM (to get the dhcp server up and running) and one for client. (If you do not have subnet for dhcp server itself server will not start) When I boot the client with PXE boot option. I can see it is waiting for pxe / tftp server but I do not see any traffic on the host or VM. and eventually client times out. from client: pxeboot client What can I check on host and VM side? Thank you.
Rajeev (256 rep)
Apr 24, 2025, 11:33 PM • Last activity: Apr 25, 2025, 04:02 PM
1 votes
2 answers
1997 views
Unable to kickstart machine with spacewalk / 404 squashfs.img
I am using spacewalk 2.6 on a CentOS7 machine. I am trying to kickstart machine from the spacewalk server. For troubleshooting purposes, i have * disabled SElinux * no iptabled/firewalld I have tried creating an installable tree during the syncing of channel/repo of a CentOS7. After the distribution...
I am using spacewalk 2.6 on a CentOS7 machine. I am trying to kickstart machine from the spacewalk server. For troubleshooting purposes, i have * disabled SElinux * no iptabled/firewalld I have tried creating an installable tree during the syncing of channel/repo of a CentOS7. After the distribution is added in spacewalk, is set the installer generation to Red Hat Linux 7. I have also mounted an iso of a netinstall iso of SL, and copied its content to the spcewalk server to create a distribution in Spacewalk I create a kickstart in the GUI of spacewalk, all fine and well. When i kickstart a machine, it fails because it cannot find LiveOS/squashfs.img. The file is there on the server, but the httpd gives an 404. I tried to widen the permission on the LiveOS folder in the kickstart tree but no dice.
10.10.70.8 - - [15/Jan/2017:12:39:00 +0100] "POST /cobbler_api HTTP/1.1" 200 143 "-" "Java/1.8.0_111"
10.10.70.8 - - [15/Jan/2017:12:39:00 +0100] "POST /cobbler_api HTTP/1.1" 200 129 "-" "Java/1.8.0_111"
10.10.10.6 - - [15/Jan/2017:12:39:00 +0100] "GET /var/satellite/rhn/kickstart/sl_netinst/.treeinfo HTTP/1.1" 404 4715 "-" "curl/7.29.0"
10.10.10.6 - - [15/Jan/2017:12:39:00 +0100] "GET /var/satellite/rhn/kickstart/sl_netinst/LiveOS/squashfs.img HTTP/1.1" 404 4715 "-" "curl/7.29.0"
-rw-r-xr-x. 1 777 root 282337280 Jan 13 23:48 /var/satellite/rhn/kickstart/sl_netinst/LiveOS/squashfs.img
Can someone help me troublshoot this?
Arch (11 rep)
Jan 15, 2017, 11:44 AM • Last activity: Apr 21, 2025, 10:00 PM
0 votes
0 answers
28 views
How do you configure your network interface to be eth0 in your kickstart file when using PXE boot to install your bootable ISO?
How do you configure your network interface to be eth0 in your kickstart file when using PXE boot to install your bootable ISO? This is on a RHEL linux machine. I have a bootable ISO which I have staged on my PXE Server. I get the install to complete but it will rename my nic card as ens160 instead...
How do you configure your network interface to be eth0 in your kickstart file when using PXE boot to install your bootable ISO? This is on a RHEL linux machine. I have a bootable ISO which I have staged on my PXE Server. I get the install to complete but it will rename my nic card as ens160 instead of eth0? How do I resolve this issue?
Malcon Sykes (1 rep)
Mar 18, 2025, 07:23 PM
0 votes
1 answers
38 views
terraform resource dependency with count(loop)
I'm trying to create stack of multiple vms on KVM_HOST with terraform. The catch is, I'm using pxeboot & kickstart to do installation. Kickstart file needs to carry some dynamic information, like static IPs, hostname etc, therefore I have to create it for each vm, and this kickstart file needs to st...
I'm trying to create stack of multiple vms on KVM_HOST with terraform. The catch is, I'm using pxeboot & kickstart to do installation. Kickstart file needs to carry some dynamic information, like static IPs, hostname etc, therefore I have to create it for each vm, and this kickstart file needs to stay there till vm reads it & starts installation. Then next kickstart file is created for vm 2, and it needs to stay there till vm2 reads it for installation. So there should be some delay in creating these resources, either with loop or depend_on parameter, but what I'm getting is, kickstart files for all vms are generated right away, last one is overriding, of course, so correct info is not passed. here's two resources which I need to loop in sequence for number of variable value qty
variable "vm_count" {
  type    = number
  default = 1
}
below are resources
resource "null_resource" "delay" {
  count = var.vm_count

  provisioner "local-exec" {
    command = "sleep 150"
  }
  depends_on = [libvirt_domain.vm]
}

resource "local_file" "kickstart_file" {
  count = var.vm_count
  content = templatefile("ks.tpl", {
    ip                = "192.168.1.${117 + count.index}"
    netmask           = var.netmask
    gateway           = var.gateway
    dns               = var.dns
    hostname          = "${var.hostname}-${count.index + 1}"
    disk_size_rounded = ((var.disk_size - 1) * 1024) -1
  })
  filename = "/var/www/html/kickstart/ks-terraform.cfg"
}

resource "libvirt_domain" "vm" {
  count  = var.vm_count
  name   = "${var.hostname}-${count.index + 1}"
  memory = var.memory
  vcpu   = var.cpu
  arch   = "x86_64"

  cpu {
    mode = "host-passthrough"
  }

  boot_device {
    dev = ["hd", "network"]
  }

  disk {
    volume_id = libvirt_volume.default_disk[count.index].id
  }

  graphics {
    type        = "vnc"
    listen_type = "address"
    autoport    = true
  }

  network_interface {
    bridge = "virbr0"
    macvtap  = false
  }

  depends_on = [local_file.kickstart_file, null_resource.delay]
}
how can I improve the logic with depends on or for_each?
Sollosa (1993 rep)
Feb 11, 2025, 02:11 PM • Last activity: Feb 11, 2025, 07:18 PM
0 votes
0 answers
46 views
how to make terraform pass static IP information to kvm virtual machine with variables, in a kickstart pxeboot enabled env?
I have a kvm host, with bridge network, so the vms get IP info directly from router itself. I have created a pxeboot env with dnsmasq acting as dhcp proxy, and kickstart as method of installation passed via pxeboot menu. So far all working fine. but here's the problem, whenever I want to set static...
I have a kvm host, with bridge network, so the vms get IP info directly from router itself. I have created a pxeboot env with dnsmasq acting as dhcp proxy, and kickstart as method of installation passed via pxeboot menu. So far all working fine. but here's the problem, whenever I want to set static IP on a vm, I have to modify kickstart file with IP information. this is manageable for small number of vms, but now I introduced terraform for vm provisioning , and I want IP information to be passed on with use of terraform variables to kickstart file. so below is line of kickstart with static IP info
network  --bootproto=static --device=enp1s0 --ip=192.168.1.220 --netmask=255.255.255.0 --gateway=192.168.1.1 --nameserver=8.8.8.8 --noipv6 --activate
and here's variables that I have defined in terraform code
variable "vm_ip" {
  default = "192.168.1.200"
}

variable "vm_netmask" {
  default = "255.255.255.0"
}

variable "gat_eway" {
  default = "192.168.1.1"
}

variable "name_server" {
  default = "8.8.8.8"
}
any idea how to pass these variables to kickstart, so vm can get static IP with use of terraform variables?
Sollosa (1993 rep)
Feb 3, 2025, 06:48 PM • Last activity: Feb 3, 2025, 08:11 PM
0 votes
0 answers
77 views
pxeboot with dnsmasq as dhcp proxy for rockylinux
first, I installed apache & started its service ``` yum install httpd && systemctl enabled httpd --now ``` then I mounted dvd iso & copied its content to apache dir ``` mount -o ro ~/Downloads/rockylinux9.iso /mnt/iso cp -rv /mnt/iso/* /var/www/html/install-media/ ``` and copied kickstart file under...
first, I installed apache & started its service
yum install httpd && systemctl enabled httpd --now
then I mounted dvd iso & copied its content to apache dir
mount -o ro ~/Downloads/rockylinux9.iso /mnt/iso

cp -rv /mnt/iso/* /var/www/html/install-media/
and copied kickstart file under
cp ~/kickstart-rockylinux9.cfg /var/www/html/install-media/kickstart/
then I installed tftp-server & syslinux & started tftp-server
yum install tftp-server syslinux
then I created these dirs & copied kernel files to below path
mkdir -p /var/lib/tftpboot/{images,pxelinux.cfg}

cp /var/www/html/install-media/images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/images/
then I copied menu files from syslinux dir
cp /usr/share/syslinux/{menu.c32,pxelinux.0} /var/lib/tftpboot/
finally created menu file /var/lib/tftpboot/pxelinux.cfg/default with below content
default menu.c32
prompt 0
timeout 300
ontimeout 2

menu title PXE Boot Menu
label 1
  menu label ^1 - Install Rocky Linux 9
  kernel images/vmlinuz
  append initrd=images/initrd.img showopts method=http://192.168.1.254/install-media/  devfs=nomount ks=http://192.168.1.254/install-media/kickstart/kickstart-rockylinux9.cfg 
Now the critical part is dnsmasq.conf, as my physical host is on bridged network with kvm installed on it. so dnsmasq is supposed to proxy dhcp request to my router
# cat /etc/dnsmasq.con

# Enable proxy DHCP for PXE
port=0
dhcp-range=192.168.1.0,proxy
# Specify PXE options
dhcp-boot=pxelinux.0,,192.168.1.254
enable-tftp
tftp-root=/var/lib/tftpboot
here's my kickstart file
# Generated by Anaconda 34.25.5.9
# Generated by pykickstart v3.32
#version=RHEL9
# Use graphical install
graphical

# Remove CDROM installation media line
# cdrom

# Specify the HTTP repository
repo --name="AppStream" --baseurl=http://192.168.1.254/install-media/ 

%addon com_redhat_kdump --disable
%end

# Keyboard layouts
keyboard --xlayouts='us'

# System language
lang en_US.UTF-8

# Network information
network --bootproto=dhcp --device=enp1s0 --noipv6 --activate
network --hostname=ks-sample2

# Packages to install
%packages
@^minimal-environment
%end

# Firstboot configuration
firstboot --enable

# Disk and partition configuration
ignoredisk --only-use=vda
clearpart --none --initlabel
part /boot --fstype="xfs" --ondisk=vda --size=1024
part pv.50 --fstype="lvmpv" --ondisk=vda --size=70655
volgroup rl --pesize=4096 pv.50
logvol swap --fstype="swap" --size=7167 --name=swap --vgname=rl
logvol / --fstype="xfs" --size=63484 --name=root --vgname=rl
I am unable to boot, after getting IP info properly from dhcp it says, No boot devices found. enter image description here
Sollosa (1993 rep)
Jan 21, 2025, 07:42 AM
1 votes
0 answers
383 views
Converting CD Kickstart file to USB
I have a custom RHEL7 installation ISO, which was created by copying the files out of a downloaded RHEL7 ISO and adding a number of custom kickstart and other files. The goal being to create a single disk with which to install a number of different RHEL configurations (each from a separate kickstart...
I have a custom RHEL7 installation ISO, which was created by copying the files out of a downloaded RHEL7 ISO and adding a number of custom kickstart and other files. The goal being to create a single disk with which to install a number of different RHEL configurations (each from a separate kickstart file). When this ISO is burned to a DVD, then everything works fine. Now however I'd like to be able to perform the same installation from a USB device. **Update #1 - The Core Question** I believe that my current problem related to the *Installation Source* specified in the kickstart file. The original is configured to allow for CD/DVD based install (cdrom is listed as the *Installation Source* and that works perfectly fine when the ISO is put on a DVD and installed that way), however that doesn't want to work when I put the ISO on a USB drive. Based on what I've seen online, it *should* be as simple as switching cdrom to harddrive --partition=LABEL= --dir=/, however when I do that the installer doesn't find the *Installation Source* and requires me to input a remote repository to continue. **Update #2 - Progress** So after some more digging I realized that for some reason the .discinfo and .treeinfo files weren't copied over. I've manually copied them over and that seems to have helped (even though they don't appear to be necessary for DVD installation?). I've also added some additional lines to the kickstart file, namely: * Before including the install command I added a manual repository definition repo --name="USB Media" --baseurl=file:///mnt/install/repo * Switched away from nochroot in the %post and instead using a means of finding and mounting the USB device that I encountered elsewhere
usbblkid=$(blkid -L "MY_USB_LABEL")
mount $usbblkid /media/dvd
With these changes I'm seeing some improvements, however it's still not working the way I would expect. What I'm seeing now is: * On every boot from the USB device the Installation Source is displaying the error Error Setting Up Base Repository. * When selecting the repository configuration, there's a roughly 50% chance that * it'll list an option for Auto-Detected Installation Media with the USB listed. I can select the Verify button and it confirms that the media is good to be used. No Additional Repositories are listed. Selecting Done allows the installation to proceed and everything now will work as expected. * the USB Media repository will be listed and selected in the Additional Repositories list. However, the Auto-Detected Installation Media doesn't appear at all. The only source option available is network and I cannot leave this page and return to the main menu without adding *something* into the URL. * If I am able to proceed past the above, then the installation completes successfully and appears to work exactly as desired. I am not making any changes to the installation media between attempts, simply selecting Quit and rebooting after accessing the Installation Source from the main page. I would at bare minimum expect that it will consistently do the same thing on every boot, but if it auto-detects the USB installation media I would also expect it to "accept it" automatically and start the installation (same as what happens with the DVD based install). Any thoughts on what might be happening here? **Update #3 - More Progress** Switching to a more elaborate append in the isolinux.cfg looks to have resolved the issue with the Auto-Detected Installation Media not appearing. This line now looks like:
append xdriver=vesa nomodeset initrd=initrd.img inst.stage2=hd:LABEL=MY_USB_LABEL inst.repo=hd:LABEL=MY_USB_LABEL:/ inst.ks=hd:LABEL=MY_USB_LABEL:/config/opt1/anaconda-ks-option1.cfg
With this change I haven't seen a repeat of the Auto-Detected Installation Media not appearing, however on every boot from the USB device the Installation Source is still displaying the error Error Setting Up Base Repository and I have to go into the Installation Source section to "accept" the USB device as the installation source. For context, the full details of what I'm doing is below. **DVD Installation** First off, to allow for the different kickstart files to be selected there is a custom boot option for each kickstart file in isolinux/isolinux.cfg:
label linux
  menu label Option 1
  menu default
  kernel vmlinuz
  append xdriver=vesa nomodeset initrd=initrd.img ks=cdrom:/config/opt1/anaconda-ks-option1.cfg
One entry for each of the kickstart files provided. That allows triggering the separate kickstart files, with each one having the following setup:
firewall --disabled
install
user --name=username --password=password
cdrom
rootpw ==iscrypted password
# additional options

%pre --log=/root/ks-pre.log
# Executes scripts on the DVD to determine target HDD and other such things
sh /mnt/install/repo/config/common/do_stuff.sh
%end

%post --log=/root/ks-post.log
mkdir -p /media/dvd
mount -t iso9660 -o ro /dev/cdrom /media/dvd
# Copy files from the DVD and execute various scripts
umount /media/dvd
rmdir /media/dvd
eject /dev/sr0
%end

%packages
# list all required packages
%end
This setup has been working well for us for years, but I'm trying to add support for using a USB installation medium. **USB Installation** This is largely the same as above, just customized to reflect a USB (HDD) source rather than DVD. isolinux/isolinux.cfg is update to reflect a HD source.
label linux
  menu label Option 1
  menu default
  kernel vmlinuz
  append xdriver=vesa nomodeset initrd=initrd.img inst.stage2=hd:LABEL=MY_USB_LABEL inst.repo=hd:LABEL=MY_USB_LABEL:/ inst.ks=hd:LABEL=MY_USB_LABEL:/config/opt1/anaconda-ks-option1.cfg
where the ISO I generate is given the label *MY_USB_LABEL*. The kickstart files are left unchanged, except for again changing the reference from DVD to HDD:
firewall --disabled
repo --name="USB Media" --baseurl=file:///mnt/install/repo # ADDED
install
harddrive --partition=LABEL=MY_USB_LABEL --dir=/ # replaces the cdrom option
user --name=username --password=password
rootpw ==iscrypted password
# additional options

%pre --log=/root/ks-pre.log
# Executes scripts on the DVD to determine target HDD and other such things
# NO CHANGE HERE!
sh /mnt/install/repo/config/common/do_stuff.sh
%end

%post --log=/root/ks-post.log
mkdir -p /media/dvd

usbblkid=$(blkid -L "MY_USB_LABEL") # Change which device is mounted
mount $usbblkid /media/dvd # Change which device is mounted

#mount -t iso9660 -o ro /dev/cdrom /media/dvd
cd /media/dvd

# Everything else left unchanged after this point
%end

%packages
# list all required packages
# NO CHANGE HERE!
%end
So to summarize, the only changes I've made are in: * isolinux/isolinux.cfg - change ks=cdrom:/ to append xdriver=vesa nomodeset initrd=initrd.img inst.stage2=hd:LABEL=MY_USB_LABEL inst.repo=hd:LABEL=MY_USB_LABEL:/ inst.ks=hd:LABEL=MY_USB_LABEL:/config/opt1/anaconda-ks-option1.cfg * kickstart - added a manual reference to the Repository located on the USB * kickstart - change cdrom installation source to harddrive --partition=LABEL= --dir=/ * kickstart - the post section is (now) largely unchanged, with the only differnce being how which device is mounted. Using usbblkid to find the USB device and then mounting it. So with all this said and done, I can see that the kickstart is triggered however it's failing to resolve the Installation Source. If I select it in the installer, it doesn't even show the USB as a viable source, giving me only the option for using something remote. *Local Media* or equivalent is not available. In my situation I want to rely on the local media, as our target system(s) are offline and we cannot rely on some form of remote repository being available. In case it is of interest, I'm generating/preparing the ISO/USB by running the following commands:
mkisofs -quiet -o test.iso -V MY_USB_LABEL \
        -R -J -joliet-long -l -T \
        -b isolinux/isolinux.bin -c isolinux/boot.cat \
        -no-emul-boot \
        -boot-load-size 4 \
        -boot-info-table \
        -eltorito-alt-boot \
        -e images/efiboot.img \
        -no-emul-boot \
        -graft-points iso_dir/
isohybrid -u test.iso
implantisomd5 test.iso
dd if=test.iso of=/dev/sda && sync
Note: I'm focusing first on getting the legacy boot working before turning my attention to EFI. I'm assuming that the only change will be updating the inst.ks=cdrom entry EFI/BOOT/grub.cfg in an equivalent manner (inst.ks=hd:LABEL=MY_USB_LABEL).
cancech (11 rep)
Dec 10, 2024, 09:01 PM • Last activity: Dec 13, 2024, 06:38 PM
0 votes
1 answers
347 views
How to install Fedora with a kickstart file from Fedora livemedia?
I'm trying to install fedora with SED: https://fedoraproject.org/wiki/Changes/SelfEncryptingDrivesSupportInAnaconda The GUI doesn't support it, I have to install using a kickstart file. I checked everywhere, I can't find how to run the installation with the file. * Running Fedora 41 live media * Edi...
I'm trying to install fedora with SED: https://fedoraproject.org/wiki/Changes/SelfEncryptingDrivesSupportInAnaconda The GUI doesn't support it, I have to install using a kickstart file. I checked everywhere, I can't find how to run the installation with the file. * Running Fedora 41 live media * Edited the file while running f41
無名前 (729 rep)
Oct 30, 2024, 03:32 AM • Last activity: Nov 1, 2024, 02:55 PM
7 votes
1 answers
12168 views
Import EPEL GPG key in kickstart post-installation
I'm trying to use [Oz] to create a CentOS 6.4 virtual machine image and install some packages from EPEL. When it tries to install the epel-release package, I get the error: Public key for epel-release-6-8.noarch.rpm is not installed I can pass a custom kickstart file to Oz, so my thinking is to impo...
I'm trying to use [Oz] to create a CentOS 6.4 virtual machine image and install some packages from EPEL. When it tries to install the epel-release package, I get the error: Public key for epel-release-6-8.noarch.rpm is not installed I can pass a custom kickstart file to Oz, so my thinking is to import this key in the post-installation script. What should I put in the %post section so the appropriate key gets imported? For reference, here's what my Oz template looks like this: centos-6.4 CentOS-6 4 x86_64 file:///data/isos/CentOS-6.4-x86_64-bin-DVD1.iso CentOS 6.4 x86_64 http://download.fedoraproject.org/pub/epel/6/$basearch yes (I could just turn off the check for signed packages, but I'd like to figure out how to do this without turning off that check). Edit: Here's what my custom kickstart currently looks like: install text key --skip keyboard us lang en_US.UTF-8 skipx network --device eth0 --bootproto dhcp rootpw %ROOTPW% firewall --disabled authconfig --enableshadow --enablemd5 selinux --disabled timezone --utc America/New_York bootloader --location=mbr --append="console=tty0 console=ttyS0,115200" zerombr yes clearpart --all part / --fstype ext4 --size=1024 --grow reboot %packages @base %post # What do I put here???
Lorin Hochstein (8605 rep)
Jul 1, 2013, 03:23 PM • Last activity: Aug 13, 2024, 01:06 PM
1 votes
1 answers
1198 views
Can a kickstart file have multiple %pre or %post sections?
I am new to using `ks.cfg` files and came across one with 2 `%post` sections and thought it may be a mistake. The first `%post` section is empty and is just ``` %post --nochroot %end ``` The second `%post` does have some code in it. I did spot a reboot at the end of the command section of the kickst...
I am new to using ks.cfg files and came across one with 2 %post sections and thought it may be a mistake. The first %post section is empty and is just
%post --nochroot


%end
The second %post does have some code in it. I did spot a reboot at the end of the command section of the kickstart file, so wondered if perhaps it could be 2 separate %post sections for before and after the reboot? But so far found nothing in the documentation to indicate that could be the case.
Dave (113 rep)
Apr 27, 2023, 09:45 AM • Last activity: Jul 2, 2024, 02:07 PM
-1 votes
1 answers
349 views
Kickstart File Not Used During RHEL 6.9 Installation on UEFI System
**Question:** I followed the Red Hat documentation to create a Kickstart (ks) file located in the root directory of the installation image. The documentation I referred to is: Red Hat Installation Guide. I am using the rhel-server-6.9-x86_64-dvd.iso image. **Problem:** After modifying and generating...
**Question:** I followed the Red Hat documentation to create a Kickstart (ks) file located in the root directory of the installation image. The documentation I referred to is: Red Hat Installation Guide. I am using the rhel-server-6.9-x86_64-dvd.iso image. **Problem:** After modifying and generating the image according to the steps, I mounted it via HTTP to an HP server. Upon rebooting the server into the installation steps, it did not use the ks file for installation. Instead, it entered the media test option. After manually selecting "skip", it went into the graphical installation interface, and the ks file did not seem to take effect. **My Server Configuration:** - Server Model: HP - Boot Mode: UEFI ISO - Image: rhel-server-6.9-x86_64-dvd.iso **Steps I Have Tried:** Followed the steps in the Red Hat documentation: Installation Guide Modified and generated the image as per the guide. Mounted the image via HTTP to the server. **Actual Result:** Upon rebooting the server, it enters the media test option. After manually selecting "skip", it enters the graphical installation interface. The ks file is not used. **Expected Result:** The server should automatically use the ks file for installation upon reboot, instead of entering the media test option. **Relevant Code or Configuration Files:** isolinux/isolinux.cfg
# isolinux/isolinux.cfg
default vesamenu.c32
#prompt 1
timeout 600

display boot.msg

menu background splash.jpg
menu title Welcome to Red Hat Enterprise Linux 6.9!
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color scrollbar 0 #ffffffff #00000000

label linux
  menu label ^Install or upgrade an existing system
  menu default
  kernel vmlinuz
  append initrd=initrd.img inst.ks=cdrom:/ks.cfg
label vesa
  menu label Install system with ^basic video driver
  kernel vmlinuz
  append initrd=initrd.img nomodeset
label rescue
  menu label ^Rescue installed system
  kernel vmlinuz
  append initrd=initrd.img rescue
label local
  menu label Boot from ^local drive
  localboot 0xffff
label memtest86
  menu label ^Memory test
  kernel memtest
  append -
ks.cfg
#ks.cfg
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL

# Install OS instead of upgrade
install

# Use CDROM installation media
cdrom

# Use text mode install
text

# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'

# System language
lang en_US.UTF-8 --addsupport=zh_CN.UTF-8,zh_TW.UTF-8

# System authorization information
auth --useshadow --passalgo=sha512

# Root password
rootpw --iscrypted $1$1gxQXmsEo$VxO.PGlcdpalNRcxYbansxzxxv.9.

# System timezone
timezone Asia/Shanghai --isUtc --nontp

# SELinux configuration
selinux --disabled

# Network configuration
network --onboot yes --bootproto=static --device=9c:dc:71:b5:a4:b8 --ip=10.15.29.10 --netmask=255.25.25.0 --gateway=10.15.29.1 --noipv6
network --hostname=temptest

# Additional repository configuration
repo --name="Server-HighAvailability" --baseurl=file:///run/install/repo/addons/HighAvailability
repo --name="Server-ResilientStorage" --baseurl=file:///run/install/repo/addons/ResilientStorage

# Firewall configuration
firewall --disabled

# Firstboot configuration
firstboot --disable

# System bootloader configuration
bootloader --location=mbr --boot-drive=sda

# Partition clearing information
clearpart --all --initlabel --drives=sda

# Disk partitioning information
part /boot/efi --fstype="efi" --ondisk=sda --size=2048 --fsoptions="umask=0077,shortname=winnt"
part /boot --fstype="xfs" --ondisk=sda --size=2048
part / --fstype="xfs" --ondisk=sda --size=102400
part /oracle --fstype="xfs" --ondisk=sda --size=102400
part /Data --fstype="xfs" --ondisk=sda --size=902921
part swap --fstype="swap" --ondisk=sda --size=16384
part swap --fstype="swap" --ondisk=sda --size=16384


# Package installation
%packages
@^graphical-server-environment
@base
@core
@desktop-debugging
@dial-up
@fonts
@gnome-desktop
@guest-agents
@guest-desktop-agents
@hardware-monitoring
@input-methods
@internet-browser
@multimedia
@print-client
@x11
%end

# Service configuration
services --disabled="chronyd"

# Kdump configuration
%addon com_redhat_kdump --disable --reserve-mb='auto'
%end

# Anaconda password policy
%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end

# Reboot after installation
reboot
Command to generate a new image
mkisofs -U -r -v -T -J -joliet-long -V "RHEL-6" -volset "RHEL-6" -A "RHEL-6" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -
eltorito-alt-boot -e images/efiboot.img -no-emul-boot -o /Data/http/os/rhel-6.9-new.iso .
implantisomd5 /Data/http/os/rhel-6.9-new.iso
**Question:** Could the issue be related to the UEFI boot mode of my server? Do I need to add specific options to the boot parameters to ensure the ks file is used?
Tony (3 rep)
Jun 5, 2024, 02:51 AM • Last activity: Jun 5, 2024, 09:59 AM
3 votes
2 answers
686 views
Setup RAID-1 in Kickstart file with 1 Disk
Is it possible to setup RAID-1 on a system with only 1 disk and later add the second one? I read the instructions from Red Hat and there is an option to add --spare= I tried this with the code below part raid.11 --size=1024 --asprimary --ondrive=${DISKA} part raid.12 --size=512 --ondrive=${DISKA} pa...
Is it possible to setup RAID-1 on a system with only 1 disk and later add the second one? I read the instructions from Red Hat and there is an option to add --spare= I tried this with the code below part raid.11 --size=1024 --asprimary --ondrive=${DISKA} part raid.12 --size=512 --ondrive=${DISKA} part raid.11 --size=12000 --grow --ondrive=${DISKA} raid /boot --fstype=xfs --device=example --level=RAID1 --spares=1 raid.11 raid /boot/efi --fstype=efi --device=example --level=RAID1 --spares=1 raid.12 raid pv.01. --fstype=xfs --device=example --level=RAID1 --spares=1 raid.13 but gives me the error message below during the installation and it fails: RAID level raid1 requires that device have at least 2 members Thank you
giorgionasis (133 rep)
Mar 8, 2024, 08:50 AM • Last activity: Mar 8, 2024, 04:46 PM
0 votes
1 answers
257 views
How do I create a kickstart image file from a running server
We have two identical production servers that are both running RHEL 7.6, with custom applications, on two isolated networks. We are wanting to add eight more of these servers to eight more isolated networks. The hardware is identical for all servers as well as the users and groups, and custom applic...
We have two identical production servers that are both running RHEL 7.6, with custom applications, on two isolated networks. We are wanting to add eight more of these servers to eight more isolated networks. The hardware is identical for all servers as well as the users and groups, and custom applications. The only difference will be the IP addressing. Is there a way to make an image of one of the running servers to use as a kickstart for the new servers?
PCnetMD (19 rep)
Feb 6, 2024, 08:19 PM • Last activity: Feb 7, 2024, 03:27 AM
2 votes
1 answers
1203 views
Kickstart: get sw installation list of minimal-centos8
I am trying to create a custom kickstart-file for our installation media, which will be based on a minimal centos8 installation. But to have a bit better knowledge about what is actually being installed during the minimal i actually did this installation manually to extract that kickstart file. but...
I am trying to create a custom kickstart-file for our installation media, which will be based on a minimal centos8 installation. But to have a bit better knowledge about what is actually being installed during the minimal i actually did this installation manually to extract that kickstart file. but when investigating the file i only see this in the "packages" part of the file: %packages @^minimal-environment kexec-tools %end Searched the net, trying to find out what is actually being installed, but cannot find anything. There is still 373 rpm-packages installed but i would like to have them in a kickstart-format. Any ideas that could help me? Thanks!
Easyrider (121 rep)
May 25, 2021, 11:54 AM • Last activity: Jan 26, 2023, 11:18 AM
1 votes
1 answers
630 views
(Fedora) Anaconda Kickstart - Post Script - Display to GUI
I am looking for a way to display messages to the user within the graphical installer during a kickstart post script. Nearly all the documentation/questions I have found have successfully explained how to log messages to **console** but I'd like to log them to the gui installer instead. For example;...
I am looking for a way to display messages to the user within the graphical installer during a kickstart post script. Nearly all the documentation/questions I have found have successfully explained how to log messages to **console** but I'd like to log them to the gui installer instead. For example; right now, at the end of the install, it displays "Running post installation scripts..." and instead of that message, I'd like to replace it with messages relating to what is going on within the script. I found this: https://kickstart-list.redhat.narkive.com/X0Du63Np/display-progress-during-long-kickstart-post-script which seems to allude to some way to get it to display messages but I am not familiar enough with it to figure out how to get it to work. Does anyone know of a way to get this working?
nepher ki3den (11 rep)
Jul 14, 2022, 06:10 AM • Last activity: Nov 29, 2022, 05:14 PM
-1 votes
1 answers
1852 views
What configuration must be included in a Kickstart file so packages are pulled from epel, remi, and other remote repositories?
I'm creating kickstart files for various unattended Redhat installs, but for sake of focus, let's say CentOS 7. I'm using the minimal boot iso, and as part of the boot options, I have `inst.ks=https://gitlab.com/myrepoinfo/-/raw/main/centos7.cfg inst.text ip=dhcp` This works, so DNS is resolving, an...
I'm creating kickstart files for various unattended Redhat installs, but for sake of focus, let's say CentOS 7. I'm using the minimal boot iso, and as part of the boot options, I have inst.ks=https://gitlab.com/myrepoinfo/-/raw/main/centos7.cfg inst.text ip=dhcp This works, so DNS is resolving, and the installation succeeds with the exception of detecting and installing packages from remote sources. Per the documentation , I'm using the repo option with the following entries:
# Setup additional EPEL and Remi repositories 
repo --name=epel --baseurl=http://ftp.cse.buffalo.edu/pub/epel  --install
repo --name=remi --baseurl=http://rpms.remirepo.net/enterprise/remi-release-7.rpm  --install
Of course these aren't correct, and I get the error that every package under '%packages' cannot be found and would I like to continue anyway (y/n). So that I can copy and paste from your answer, what are the exact lines of config that I need to add to a kickstart file to allow HTTP based installation of packages from remote sources?
user658182 (117 rep)
Nov 6, 2022, 02:01 PM • Last activity: Nov 6, 2022, 07:57 PM
1 votes
1 answers
2944 views
RHEL ISO with kickstart file
I am trying to edit the original RHEL 6.5 DVD (rhel-server-6.5-x86_64-dvd.iso) from redhat in order to add kickstart file on it. The goal is to have one 3.4Go iso with automatic install. And not one boot media and one DVD. This technique is not supported by redhat officially, but I found a procedure...
I am trying to edit the original RHEL 6.5 DVD (rhel-server-6.5-x86_64-dvd.iso) from redhat in order to add kickstart file on it. The goal is to have one 3.4Go iso with automatic install. And not one boot media and one DVD. This technique is not supported by redhat officially, but I found a procedure : https://access.redhat.com/solutions/60959 My ks.cfg looks like : install cdrom repo --name="Red Hat Enterprise Linux" --baseurl=file:/mnt/source --cost=100 repo --name=HighAvailability --baseurl=file:///mnt/source/HighAvailability I got an error when the installer start : it didn't find the disk Red Hat Enterprise Linux. I guess this is because installer is not looking on its own media. Is there a way to achieve this ? Does the cdrom have optional parameter to hard link the device ?
Hugo (2498 rep)
Jan 7, 2015, 04:36 PM • Last activity: Oct 30, 2022, 03:43 PM
Showing page 1 of 20 total questions