Softpanorama

May the source be with you, but remember the KISS principle ;-)
Contents Bulletin Scripting in shell and Perl Network troubleshooting History Humor

Modifying ISO image to include kickstart file and other useful files

News Kickstart Recommended Books Recommended Links Creating a boot image that is using a remote kickstart file to install Red Hat Minimization of boot ISO Kickstart Configurator Loopback filesystem
Kickstart Installation of Red Hat from a USB drive Installation Networking NTP configuration LVM  Xinetd Etc

Introduction

The ISO9660 file structure is not designed for modification, everything has a strictly defined place with no room to extend files or directories. You copy the whole file structure it to working directory, modify that, and re-create a new image from this working directory.

There are several step you need to accomplish

  1. Extracting the source ISO image to work directory
  2. Adding your ks.cfg file to the tree
  3. Creating a new ISO Image which includes your modifications

Your additions are limited mostly by the capacity limits of a DVD. Skilled sysadmins create custom DVDs that automatically partitions the hard drives, install Linux, installed several add-on packages (for example for Oracle), created user accounts, and setup the networking. 

Creating you own ks.cfg file

The best way to create you own ks.cfg file is to use the one  that Anaconda created for this type of servers. That mean that the fist time you need to perform manual installation and that use the generated kickstart file as a starting point.  This way you can create pretty usable initial Kickstart file that you can refine as you get experince with both the type of servers you are treying to create in bulk and kickstart ecosystem.  Suggested steps: 

  1. Manually install one system out of, say, dozen similar system that  needs to be installed.
  2. Modify and partially verify it using Kickstart Configurator.
  3. Test it on one blade or server. Usually you will find some errors and need several iterations to make it right.  
  4. Include it in image and create a new ISO

TIP: If you disk was not initialized (new blade or server) you need to use

zerombr yes
clearpart --all --initlabel

in your ks.cfg file to avoid prompts. In this case  you will not be prompted to confirm that want to wipe out the whole disks.

You can put multiple Kickstart config files in your image and just specify the appropriate one at boot time or in you custom boot image. 

Within the ks.cfg file you can specify pre-install and post-install scripts. These are standard scripts that will be run either before or after the install process. Post install scripts can do the bulk of your configuration but it is important not to overdo this: kickstart is a limited environment with its own gotchas (it boot from its own virtual disk) and all operations that you can do in Postinstall scripts you can do after rebooting the sever via ssh as well. 

For inspiration you can also look at examples on Internet, but  there are a lot of overcomplexity junking out  their so be  careful.  Search for ks.cfg example in your favorite serach engine (actually Google is not the best in this particular case ;-). 

Examples of Kickstart files

There are multiple samples of  custom kickstart configuration files that can be downloaded from the Internet. But generally, you should never use them other that to borrow small fragment that accomplish a specific task (most of them are outdated anyway).

Some useful links:

Here is yet another outdated, but still pretty educational example from Red Hat of  a Classroom Server Kickstart Configuration File (2005). It split kickstart file into useful sections and you should borrow some of those comments, as they represent a useful documentation tool.

The following is a sample Kickstart configuration file for installing a Red Hat Academy Classroom Server. 

#########################################################################
#
# Red Hat Academy Classroom Server Kickstart Script
#
# $Id: 010_text.dbk,v 1.5 2005/08/08 08:35:41 bowe Exp $
# version: RHEL4
# academy-docs@redhat.com
#
# For more information, see the Red Hat Customization Guide, 
# http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/ch-kickstart2.html
#
#########################################################################

###############################################################
# you definately want to set one of the following
###############################################################

rootpw redhat
bootloader --location=mbr --password=redhat

###########################################################################
#
# the following MD5 encrypted passwords can be generated using
#
#    openssl passwd -1 redhat
#
#  see "man sslpasswd" for more information
#
###########################################################################
#rootpw --isencrypted $1$Su2Gv/$fZeEi7RtQq/RAZ1oEla5z0 # md5 encrypted "redhat"
#bootloader --location=mbr --md5pass=$1$x.3x1cDe$ucwc8hTScWzfb5DYW6r25/


###############################################################
# point to a local installation server, or use "cdrom"
###############################################################
text		# you're not going to be standing there watching it, are you?
cdrom
# url --url http://kickstart.example.com/pub/es4/i386


###############################################################
# partitioning
###############################################################
zerombr yes
clearpart --all --initlabel 
part /boot --fstype ext3 --size 128 
part / --fstype ext3 --size 4096 --grow --maxsize 8192
part /var --fstype ext3 --size 4096 --grow --maxsize 8192 
part swap --recommended 

###############################################################
# network configuration
#   - the following is for the "recommended solution" outlined
#     in the Red Hat Academy Instructor's Guide
###############################################################
network --bootproto=static --ip=192.168.0.254 --netmask=255.255.255.0 --device=eth0
network --bootproto=dhcp --device=eth1
#firewall --enabled --http --ftp --port=https:tcp --port=ipp:tcp
firewall --disabled


###############################################################
# environment 
###############################################################
lang en_US
langsupport --default=en_US
timezone America/New_York
#timezone America/Chicago
#timezone America/Denver
#timezone America/Los_Angeles

###############################################################
# hardware 
###############################################################
mouse generic3ps/2
#mouse genericps/2 --emulthree   	# enable for 2 button mice
keyboard us
xconfig --depth=16 --resolution=1024x768 --defaultdesktop=GNOME --startxonboot


###############################################################
# misc
###############################################################
auth  --useshadow  --enablemd5 
reboot					# reboot automatically when done
install					# instead of "upgrade"

###############################################################
#
# New in RHEL-4: SELinux
#
###############################################################
selinux --enforcing
#selinux --permissive
#selinux --disabled

###############################################################
#
# Software
#
###############################################################
%packages --resolvedeps
@ Workstation Common
@ Server
@ GNOME 

@ Engineering and Scientific
@ Games and Entertainment
@ Mail Server
@ DNS Name Server
@ FTP Server
@ Network Servers
@ Development Tools
@ System Tools

ypserv
dhcp
ethereal-gnome
sysstat
vlock

%post
###############################################################
#
# Post Script - the following script runs on the newly
# installed machine, immediately after installation
#
###############################################################

########################################################
# add entry to /etc/hosts, if necessary
########################################################
#echo "192.168.0.254      rha-server" >> /etc/hosts

########################################################
# turn on required services
########################################################

chkconfig httpd on
chkconfig vsftpd on

########################################################
# install red hat academy custom software
########################################################

#RHASRC=ftp://kickstart.example.com/pub/rha/RPMS/
#rpm -ihv $RHASRC/rha-base*.rpm $RHASRC/rha-classroom-rha*.rpm $RHASRC/rha-server-*.rpm  $RHASRC/fauxlp-*.rpm
#unset RHASRC

########################################################
# add proxy server to /etc/rha_server.conf, if necessary
########################################################

#echo "ExerciseReporterProxy  http://10.1.1.1:8080" >> /etc/rha_server.conf


########################################################
# mirror RHEL-4-ES distribution from remote server
########################################################

#lftp -c "mirror ftp://kickstart.example.com/pub/es4 /var/ftp/pub/es4"

########################################################
# ln anonymous FTP pub dir to Document Root
########################################################

ln -s ../../ftp/pub /var/www/html/pub
# set SELinux context s.t. contents of pub directory available from web
chcon -R --reference /var/www/html /var/ftp/pub

Extracting the source ISO image to work directory

First create a directory that will house the modified image. For example: 

$ mkdir /tmp/RHEL_custom

Now we need to mount the source ISO image locally so we can work with it.

# mount -t iso9660 -o loop RHEL-5.6-x86_64-DVD.iso /media

To extract the source ISO files into another directory. This will take a couple of minutes as we are copying more then 3GB of information: 

cd /media
tar cf - . | (cd /tmp/RHEL_custom; tar xfp -)

Note: you need to preserve attributes and copy dot files

Adding your ks.cfg file to the tree

The ks.cfg file is what the install routine will use while loading the OS. You can add it to the root directory of your ISO image making it king of "golden image" for particular type of servers. Or you can put is on HTTP server or NFS.

If your ks,cfg is added to ISO  you need to type  "linux" line path to your ks.cfg file.

boot: linux text ks=cdrom:/ks.cfg

Adding custom RPMs

If you have additional packages that you want to install, you can copy them into the custom image directory. This way they will be included in the image when we create the new ISO.

You can then put a post install script in place to install and configure those packages automatically at install time.

Here the game probably is not worse the candles, as you always install additional RPMS after system is installed and rebooted.  But theoretically as long as you do not exceed the capacity of a CD or DVD, then you can add as much as you want.

Creating a new ISO Image which includes your modifications

Once all of your modifications are complete, you just need to put it all together and create a new ISO image.  With UEFI this a tricky business.

See Creating a boot image that is using a remote kickstart file to install Red Hat


Top Visited
Switchboard
Latest
Past week
Past month

NEWS CONTENTS

Old News ;-)

[Sep 18, 2017] Kickstart File Example

Kickstart File Example

Below is an example of a kickstart file that you can use to install and configure Parallels Cloud Server in unattended mode. You can use this file as the basis for creating your own kickstart files.

# Install Parallels Cloud Server

install

# Uncomment the line below to install Parallels Cloud Server in a completely unattended mode

# cmdline

# Use the path of http://example.com/pcs to get the installation files.

url --url http://example.com/pcs

# Use English as the language during the installation and as the default system language.

lang en_US.UTF-8

# Use the English keyboard type.

keyboard us

# Uncomment the line below to remove all partitions from the SDA hard drive and create these partitions: /boot, /, /vz, and swap.

# clearpart --drives=sda --all --initlabel

# zerombr

part /boot --fstype=ext4 --size=512

part / --fstype=ext4 --size=20096

part /vz --fstype=ext4 --size=40768 --grow

part swap --size=4000

# Use a DHCP server to obtain network configuration.

network --bootproto dhcp

# Set the root password for the server.

rootpw xxxxxxxxx

# Use the SHA-512 encryption for user passwords and enable shadow passwords.

auth --enableshadow --passalgo=sha512

# Set the system time zone to America/New York and the hardware clock to UTC.

timezone --utc America/New_York

# Set sda as the first drive in the BIOS boot order and write the boot record to mbr.

bootloader --location=mbr

# Tell the Parallels Cloud Server installer to reboot the system after installation.

reboot

# Install the Parallels Cloud Server license on the server.

key XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX

# Create the virt_network1 Virtual Network on the server and associate it with the network adapter eth0.

vznetcfg --net=virt_network1:eth0

# Configure the ip_tables ipt_REJECT ipt_tos ipt_limit modules to be loaded in Containers.

# Use the http://myrepository.com to handle Fedora OS and application templates.

vztturlmap $FC_SERVER http://myrepository.com

# Install the listed EZ templates. Cache all OS templates after installation. Skip the installation of pre-created templates.

nosfxtemplate

%eztemplates --cache

centos-6-x86_64

centos-6-x86

mailman-centos-6-x86_64

mailman-centos-6-x86

# Install the packages for Parallels Cloud Server on the server.

%packages

@base

@core

@vz

@ps

Kickstart file example for installing on EFI-based systems

You can use the file above to install Parallels Cloud Server on BIOS-based systems. For installation on EFI-based systems, you need to modify the following places in the file (the changes are highlighted in bold):

# The following 4 commands are used to remove all partitions from the SDA hard drive and create these partitions: /boot/efi (required for EFI-based systems), /boot, /, /vz, and swap.

# clearpart --drives=sda --all --initlabel

part /boot/efi --fstype=efi --grow --maxsize=200 --size=20

part /boot --fstype=ext4 --size=512

part / --fstype=ext4 --size=20096

part /vz --fstype=ext4 --size=40768 --grow

part swap --size=4000

# Configure the bootloader.

bootloader --location=partition

Kickstart file example for upgrading to Parallels Cloud Server 6.0

Below is an example of a kickstart file you can use to upgrade your system to Parallels Cloud Server 6.0.

# Upgrade to Parallels Cloud Server rather than perform a fresh installation.

upgrade

# Use the path of http://example.com/pcs to get the installation files.

url --url http://example.com/pcs

# Use English as the language during the upgrade and as the default system language.

lang en_US.UTF-8

# Use the English keyboard type.

keyboard us

# Set the system time zone to America/New York and the hardware clock to UTC.

timezone --utc America/New_York

# Upgrade the bootloader configuration.

bootloader --upgrade

[Sep 18, 2017] RHEL ISO with kickstart file

Aug 06, 2017 | unix.stackexchange.com

Hugo , asked Jan 7 '15 at 16:36

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 ?

tonioc , answered Jan 7 '15 at 17:30

You don't need to set the repo URLs in ks.cfg, here is an example of kickstart that I use currently with rhel6.
# interactive install from CD-ROM/DVD
interactive
install
cdrom

key --skip
lang en_US.UTF-8
# keyboard us

#
clearpart --all --initlabel
part /boot --fstype ext4 --size=100
part pv.100000 --size=1 --grow
volgroup vg00 --pesize=32768 pv.100000
logvol / --fstype ext4 --name=lvroot --vgname=vg00 --size=15360
logvol swap --fstype swap --name=lvswap --vgname=vg00 --size=2048
logvol /var --fstype ext4 --name=lvvar --vgname=vg00 --size 5120

timezone Europe/Paris
firewall --disabled
authconfig --useshadow --passalgo=sha512
selinux --enforcing

#skipx

# pre-set list of packages/groups to install 
%packages
@core
@server-policy
acpid
device-mapper-multipath
dmidecode
# ... and so on the list of packages/groups I pre-customize (and with - those I don't want)
vsftpd
wget
xfsprogs
-autoconf
-automake
-bc
# ... and so on
#-----------------------------------------------------------------------------
# postinstall, execution avec chroot dans le systeme installé.
%post --interpreter=/bin/sh --log=/root/post_install.log
echo -e "================================================================="
echo -e "       Starting kickStart post install script "

# do some extra stuff here , like mounting cd-rom copying add-ons specific for my product

Hugo , asked Jan 7 '15 at 16:36

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 ?

tonioc , answered Jan 7 '15 at 17:30

You don't need to set the repo URLs in ks.cfg, here is an example of kickstart that I use currently with rhel6.
# interactive install from CD-ROM/DVD
interactive
install
cdrom

key --skip
lang en_US.UTF-8
# keyboard us

#
clearpart --all --initlabel
part /boot --fstype ext4 --size=100
part pv.100000 --size=1 --grow
volgroup vg00 --pesize=32768 pv.100000
logvol / --fstype ext4 --name=lvroot --vgname=vg00 --size=15360
logvol swap --fstype swap --name=lvswap --vgname=vg00 --size=2048
logvol /var --fstype ext4 --name=lvvar --vgname=vg00 --size 5120

timezone Europe/Paris
firewall --disabled
authconfig --useshadow --passalgo=sha512
selinux --enforcing

#skipx

# pre-set list of packages/groups to install 
%packages
@core
@server-policy
acpid
device-mapper-multipath
dmidecode
# ... and so on the list of packages/groups I pre-customize (and with - those I don't want)
vsftpd
wget
xfsprogs
-autoconf
-automake
-bc
# ... and so on
#-----------------------------------------------------------------------------
# postinstall, execution avec chroot dans le systeme installé.
%post --interpreter=/bin/sh --log=/root/post_install.log
echo -e "================================================================="
echo -e "       Starting kickStart post install script "

# do some extra stuff here , like mounting cd-rom copying add-ons specific for my product

[Sep 17, 2017] RHEL6 Unable to download kickstart file

Sep 17, 2017 | unix.stackexchange.com
Oops! I didn't mean to do this.
up vote down vote favorite

robertpas , asked Nov 9 '15 at 15:13

In our lab we have a set of scripts that automatically configure a kickstart installation for RHEL5 on HP ProLiant DL380p Gen8. Based on data from several configuration files, it does the following steps:
  1. mounts redhat dvd
  2. modifies isolinux.cfg accordingly
  3. creates ks.cfg
  4. creates a bootdisk with the installation data (isolinux.cfg, ks.cfg, etc)
  5. creates a http server with the bootdisk directory.
  6. mounts the bootdisk through ILO ( /dev/scd1 )
  7. installs RHEL5

Here is the line referring to the kickstart file location :

append initrd=initrd.img ks=hd:scd1:/isolinux/ks.cfg ksdevice=eth4

Everything works well for RHEL5, but there have been requests for RHEL6.

For RHEL6, everything seems to work OK until #7, where it returns the message "unable to download kickstart file" . I have commented some lines in the scripts, eliminating the installation part and leaving only the ILO mount part.

The bootdisk is mounted and accessible on /dev/scd1 . The ks.cfg file is present there. I have also tested and the files from the Kickstart server are accessible with wget .

I have also tried accessing the ks.cfg file through http :

append initrd=initrd.img ks=http://<ip>:<port>/boot/isolinux/ks.cfg ksdevice=eth4

The above part did not work.

But what really vexes me is that RHEL5 works in the same conditions, but RHEL6 does not.

I have been talking to redhat support for a week and they don't seem to know what is wrong.

Any help would be greatly appreciated.

robertpas , answered Nov 11 '15 at 8:11

I have figured out the problem.

There seems to be a difference between RHEL5 and RHEL6 at the installation level.

RHEL5 will detect your physical cdrom and mount it on /dev/scd0 , therefore the location of the mount will be /dev/scd1 . RHEL6 does not seem to do this, therefore the mount location will be /dev/scd0 .

The correct way to declare the ks file location in a case like this is :

append initrd=initrd.img ks=hd:scd0:/isolinux/ks.cfg ksdevice=eth4

I hope someone will find this helpful in the future.

[Aug 10, 2017] Kickstart Problem with --initlabel

Notable quotes:
"... Last edited by phatrik; 08-07-2012 at 11:17 AM . Reason: prefixed with solved ..."
Aug 07, 2012 | www.linuxquestions.org
phatrik
Kickstart: Problem with --initlabel

I'm having a problem when using kickstart to deploy CentOS 6.3 KVM guest OS and no one seems to know why so I figured I'd ask in the KVM SF :-) Details:

- Tyring to install CentOS 6.3
- Doing a netinstall using a FTP site
- The installation is for a guest OS (KVM).

The install is being launched with:

virt-install -n server1.example.com -r 768 -l /media/netinstall -x "ks=ftp://192.168.100.2/pub/ks.cfg"

The install starts and gets to the point where I see "Error processing drive. This device may need to be re-initialized." The relevant part of my KS file:

clearpart --initlabel --all

# Disk partitioning information

part /boot --fstype="ext4" --size=500
part /home --fstype="ext4" --size=2048
part swap --fstype="swap" --size=2048
part / --fstype="ext4" --grow --size=1

When I switch to the 3rd terminal for information, here's what I see:

required disklable type for sda (1) is None
default diskalbel type for sda is msdos
selecting msdos diskalbel for sda based on size

Based on "required diskalbel type for sda (1) is none" I decided to remove the --initlabel parm, however I still face the same problem (prompted to initialize the disk).

TIA

Erik


Last edited by phatrik; 08-07-2012 at 11:17 AM . Reason: prefixed with solved
dyasny 08-07-2012 Registered: Dec 2007 Location: Canada Distribution: RHEL,Fedora Posts: 995
I'd just abandon virt-install and deploy VMs from a template instead. Much faster and easier to do
phatrik 08-07-2012, 08:14

Thank you for your reply, but that's obviously not the answer I'm looking for. Yes I know virt-clone could be used but what I'm truly interested in is getting at the bottom of this problem.

wungad

From RedHat Knowledge base
Issue

The 'clearpart --initlabel' option in a kickstart no longer initializes drives in RHEL 6.3.

Environment
Red Hat Enterprise Linux 6.3
Anaconda (kickstart)

Resolution

Use the 'zerombr' option in the kickstart to initialize disks and create a new partition table.

Use the 'ignoredisk' option in the kickstart to limit which disks are initialized by the 'zerombr' option. The following example will limit initialization to the 'vda' disk only:
zerombr
ignoredisk --only-use=vda

phatrik

Thank you for your reply, that's exactly what I was looking for.

Quote:

Originally Posted by wungad Issue
The 'clearpart --initlabel' option in a kickstart no longer initializes drives in RHEL 6.3.

Environment

Red Hat Enterprise Linux 6.3
Anaconda (kickstart)

Resolution

Use the 'zerombr' option in the kickstart to initialize disks and create a new partition table.
Use the 'ignoredisk' option in the kickstart to limit which disks are initialized by the 'zerombr' option. The following example will limit initialization to the 'vda' disk only:
zerombr
ignoredisk --only-use=vda

[Aug 08, 2017] Kickstart option to set GRUB drive location?

Notable quotes:
"... ignoredisk --drives=sdb ..."
Aug 08, 2017 | www.centos.org

andersbiro " 2010/03/04 12:36:32

Hello, I have successfully created a Centos USB stick installation with an automated kickstart configuration according to the instructions at http://wiki.centos.org/HowTos/InstallFromUSBkey .

Everything works flawlessly with the exception that the installation writes the GRUB Boot Loaders on the USB stick instead of the destination hard drive and hence can only be booted from the USB stick.

Afterwards I can solve this manually by editing grub.conf to point to the hard drive and using the grub utility I can nstall the Grub loader on the hard drive MBR instead and then it boots normally.

The aim is however to create a fully automated installation since the end users in question are expected to be technically proficient so my question is if there is a kickstart option to explicitly write GRUB correctly to the hard drive from the very beginning?

There seems to be a kickstart "bootloader" option but I can not really see any flags that would explicitly set the GRUB on a specified hard drive? Top


AlanBartlett
Forum Moderator
Posts: 9310
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact: Contact AlanBartlett Website
Re: Kickstart option to set GRUB drive location?

Post by AlanBartlett " 2010/03/04 18:52:16

In the CentOS wiki article that you reference, under the heading Notes , there is a [color=ff1480]cherry-red[/color] block of text. Isn't that appropriate?

If not, do you have any suggestions for improvement to the article? Top


pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact: Contact pschaff Website
Kickstart option to set GRUB drive location?

Post by pschaff " 2010/03/04 21:36:41

andersbiro wrote:
...
There seems to be a kickstart "bootloader" option but I can not really see any flags that would explicitly set the GRUB on a specified hard drive?

How about Kickstart Options : Code: Select all

bootloader (required)
Specifies how the boot loader should be installed. This option is required for both installations and upgrades.

* --append= ? Specifies kernel parameters. To specify multiple parameters, separate them with spaces. For example:

bootloader --location=mbr --append="hdd=ide-scsi ide=nodma"

* --driveorder ? Specify which drive is first in the BIOS boot order. For example:

bootloader --driveorder=sda,hda

* --location= ? Specifies where the boot record is written. Valid values are the following: mbr (the default),
partition (installs the boot loader on the first sector of the partition containing the kernel), or
none (do not install the boot loader).

Still can't guarantee that a totally automated approach is possible, unless the hardware is identical, as the devices and ordering will be system-dependent. Top


andersbiro
Posts: 12
Joined: 2010/02/22 10:07:54
Re: Kickstart option to set GRUB drive location?

Post by andersbiro " 2010/03/08 08:48:17

AlanBartlett wrote:
In the CentOS wiki article that you reference, under the heading Notes , there is a [color=ff1480]cherry-red[/color] block of text. Isn't that appropriate?

If not, do you have any suggestions for improvement to the article?

To my understanding this specific part of the text refers to an interactive installation but since I deal with a fully automatic installation I do not think that part is appropriate so that is why I am looking for corresponding kickstart options to achieve the same thing.
To be fair it also mentions the line bootloader --driveorder=cciss/c0d0,sda --location=mbr" that might be appropriate but since I am not very proficient with completely comprehending the parameters. Top


andersbiro
Posts: 12
Joined: 2010/02/22 10:07:54
Re: Kickstart option to set GRUB drive location?

Post by andersbiro " 2010/03/08 08:58:16

pschaff wrote:
andersbiro wrote:
...
There seems to be a kickstart "bootloader" option but I can not really see any flags that would explicitly set the GRUB on a specified hard drive?

How about Kickstart Options : Code: Select all

bootloader (required)
Specifies how the boot loader should be installed. This option is required for both installations and upgrades.

* --append= ? Specifies kernel parameters. To specify multiple parameters, separate them with spaces. For example:

bootloader --location=mbr --append="hdd=ide-scsi ide=nodma"

* --driveorder ? Specify which drive is first in the BIOS boot order. For example:

bootloader --driveorder=sda,hda

* --location= ? Specifies where the boot record is written. Valid values are the following: mbr (the default),
partition (installs the boot loader on the first sector of the partition containing the kernel), or
none (do not install the boot loader).

I was aware of these parameters but I am not fully sure about how to apply them... the "--location" flag seemed easy enough and also driveorder but the "append" kernel parameters eludes me but perhaps this is not required.

I know that the kernel and Grub part should reside on the first partition of disk "sda" and the USB stick on "sdb" so would setting the "--driveorder=sda,sdb" insure that grub.conf points to the sda disk?

Also, would that automatically write the GRUB loader on "sda" as well or do you need to use the "partition flag" for that? Top


andersbiro
Posts: 12
Joined: 2010/02/22 10:07:54
Re: Kickstart option to set GRUB drive location?

Post by andersbiro " 2010/03/08 12:04:09

As a matter of fact I tried the --driveorder flag and that actually worked as it now can boot directly without USB stick which is a great step forward.
The only remaining obstacle is that somehow the FAT32 partition disappear from the USB stick so it cannot be used for future installations.
This can however be fixed by using FDISK to create a new FAT32 partition in the same space and somehow this also restores the previous file in the partition.

Since the GRUB bootloader seems to be written to the destination disk I must say that I cannot understand at all why the FAT32 partition disappears?
Are additional flags required to prevent this from happening? Top


pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact: Contact pschaff Website
Re: Kickstart option to set GRUB drive location?

Post by pschaff " 2010/03/08 12:51:41

andersbiro wrote:
...
Since the GRUB bootloader seems to be written to the destination disk I must say that I cannot understand at all why the FAT32 partition disappears?
Are additional flags required to prevent this from happening?

I have not seen that happen. You have both FAT32 and ext3 partitions, and the FAT32 one is gone after the install? I'd check the kickstart file carefully to be sure it is not inadvertently messing with the USB drive.

Thanks for reporting back, and please keep us posted. Any recommendations for the Wiki article appreciated. Top


andersbiro
Posts: 12
Joined: 2010/02/22 10:07:54
Re: Kickstart option to set GRUB drive location?

Post by andersbiro " 2010/03/08 14:49:12

I managed to solve the issue by adding the "ignoredisk --drives=sdb" parameter for the USB drive and now the installer leaves the USB stick intact and the installation works flawlessly.
I however still do not know why the installer affected the disk in the first place but this flag did at any rate solve the problem for me. Top
pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact: Contact pschaff Website
Re: Kickstart option to set GRUB drive location?

Post by pschaff " 2010/03/08 14:53:40

Thanks for the additional info. Still seems that a general solution is elusive, as there's no guarantee that on a different set of hardware the USB drive will show up as /dev/sdb. Top
nektoid
Posts: 1
Joined: 2012/04/03 17:00:26
Re: Kickstart option to set GRUB drive location?

Post by nektoid " 2012/04/03 17:06:27

Hi. I ran into this recently kickstarting both 5.5 and 6.2 hosts. Kickstarts worked one day and the next the bootloader wanted to be on the usb key, odd. This is was an example of what worked for me with 5.5 where the usb key was consistently seen as sdb. Both at their respective parts in the preamble section of ks.cfg.

#stop writing bootloader to usb
bootloader --driveorder=sda,sdb --location=mbr

#stop erasing my usb stick
ignoredisk --drives=sdb

[Aug 06, 2017] Unable to download the kickstart file

Aug 06, 2017 | community.hpe.com
Hi there
There is a kickstart file on http://10.10.0.3/ks.cfg it opens in the browser fine and I can read the content.
Also wget http://10.10.0.3/ks.cf works flawlessly yet the installation fails with the following error : "Unable to download the kickstart file, please modify the kickstart parameter..."
I'm using apache as a web server.
Any idea what's causing the problem ?
Do I need some special configuration of Apache ?

Jesus is the King Solved! Go to Solution. 0 Kudos Reply

12 REPLIES Michal Kapalka (mikap) Honored Contributor

‎11-15-2010 11:54 PM

‎11-15-2010 11:54 PM

Re: Unable to download the kickstart file
hi,

check this forum thread :

http://web.archiveorange.com/archive/v/YcynVy2jK7BBdYo5BvqY

mikap 0 Kudos Reply Piotr Kirklewski Super Advisor

‎11-16-2010 05:50 AM

‎11-16-2010 05:50 AM

Re: Unable to download the kickstart file
Well - I'm not using NFS here.
So it seems to me that post is irrelevant unless I don't get it. Jesus is the King 0 Kudos Reply Piotr Kirklewski Super Advisor

‎11-16-2010 06:08 AM

‎11-16-2010 06:08 AM

Re: Unable to download the kickstart file
Also I have only one NIC in my VM and I'm not specifying the ksdevice in my ks.cfg .
Should I do that ? Jesus is the King 0 Kudos Reply Matti_Kurkela Honored Contributor

‎11-17-2010 01:52 AM

‎11-17-2010 01:52 AM

Re: Unable to download the kickstart file
You did not mention the name of your Linux distribution, but Kickstart suggests RedHat or one of its derivatives.

RedHat's installer sets up a shell prompt on one of the virtual consoles, and a log or two on other virtual consoles.

You might take a look at the logged messages, and/or use the shell prompt to verify the system has a working network connection.

See paragraph 4.1.1 of this document for a description of the virtual console functionality of the installer (this part of the installer has not changed significantly since RHEL 3):

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/3/html/Installation_Guide_x8664/ch-guimode.html

Another possibility is that the web server offers the kickstart file using a MIME content type the installer does not like. I guess "text/plain" would be acceptable, but this might not be Apache's default content type for .cfg files.

If this is the case, you might have to add the file type to your Apache configuration:

AddType text/plain .cfg

MK MK 0 Kudos Reply Jimmy Vance HPE Pro

‎11-17-2010 04:06 AM

‎11-17-2010 04:06 AM

Re: Unable to download the kickstart file
You don't mention the server model or distribution version your working with. Even though other systems can access the ks file OK, maybe the system your trying to install on does not have proper NIC drivers during boot to access the ks file?

__________________________________________________
No support by private messages. Please ask the forum! I work for HPE

If you feel this was helpful please click the KUDOS! thumb below! 0 Kudos Reply Piotr Kirklewski Super Advisor

‎11-17-2010 09:47 AM

‎11-17-2010 09:47 AM

Re: Unable to download the kickstart file
I'm trying to install Centos5.5 64-bit
The PXE server is Debian.

vim /tftpboot/pxelinux.cfg/default

### CENTOS 5.5 - CUSTOM ###
LABEL Centos 5.5 x86_64 Custom
kernel CentOS/vmlinuz noapic
append initrd=CentOS/initrd.img ks= http://10.10.0.3/ks.cfg text nofb
TEXT HELP
Customized, unatended installation version of Centos 5.5
ENDTEXT
\n

Did you mean to add this to apache config ? :

DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm index.cfg ks.cfg

Jesus is the King 0 Kudos Reply Jimmy Vance HPE Pro

‎11-17-2010 10:15 AM

‎11-17-2010 10:15 AM

Re: Unable to download the kickstart file

OK, so now we know your working with CentOS

Does the CentOS 5.5 initrd image your booting from contain the correct NIC drivers for the server your trying to install on? You didn't mention the server model.

__________________________________________________
No support by private messages. Please ask the forum! I work for HPE

If you feel this was helpful please click the KUDOS! thumb below! 0 Kudos Reply Piotr Kirklewski Super Advisor

‎11-17-2010 02:30 PM

‎11-17-2010 02:30 PM

Re: Unable to download the kickstart file
It's a VM on ESXi 4.1.
I'm already using the same intrd here:
Label CentOS 5 64-bit installer & rescue
kernel centos5x64/vmlinuz
append initrd=centos5x64/initrd.img text vga=791
\n

I have just copied it to a different dir and started working on the kickstart installation.
The manual installation goes without any problems so I can't see why would it be different for the kickstart.
Jesus is the King 0 Kudos Reply Jimmy Vance HPE Pro

‎11-17-2010 04:56 PM

‎11-17-2010 04:56 PM

Solution
Re: Unable to download the kickstart file
A manual installation from media doesn't matter if it is bare iron, or a VM, the network does not come into play. For bare iron, or a VM, network installation the boot installer needs to be able to access the network to pull the KS file. While your in the installer switch over to one of the other console screens F2, F4, etc and see if the network is functional

__________________________________________________
No support by private messages. Please ask the forum! I work for HPE

If you feel this was helpful please click the KUDOS! thumb below! 1 Kudo Reply Piotr Kirklewski Super Advisor

‎11-18-2010 04:52 PM

‎11-18-2010 04:52 PM

Re: Unable to download the kickstart file
Alt + F3 shows the following message:
ERROR: No network device in choose network device!
ERROR: No network drivers for dooing kickstart
ERROR: Unable to bring up network

Where do I go from there ?

Jesus is the King 0 Kudos Reply Jimmy Vance HPE Pro

‎11-18-2010 05:12 PM

‎11-18-2010 05:12 PM

Re: Unable to download the kickstart file
Hopefully someone with more VMware experience than I have will chime in. I'm not sure what driver you need to load for the virtual NIC VMware presents to the guest OS

__________________________________________________
No support by private messages. Please ask the forum! I work for HPE

If you feel this was helpful please click the KUDOS! thumb below! 0 Kudos Reply DeafFrog Valued Contributor

‎11-22-2010 12:05 AM

‎11-22-2010 12:05 AM

Re: Unable to download the kickstart file
Hi ,

pls check this :

http://www.vmware.com/support/vsphere4/doc/vsp_41_new_feat.html

section "network" > ESXi configuration guide > page 96 .

hope this helps..

Reg. FrogIsDeaf

[Aug 06, 2017] Customising Anaconda uEFI boot menu to include kickstart parameter - Red Hat Customer Portal

Aug 06, 2017 | access.redhat.com
Customising Anaconda uEFI boot menu to include kickstart parameter Latest response March 3 2017 at 6:50 AM Hi

I am producing a remastered RHEL 6.5 which contains a custom kickstart. I have got the ISO to boot using the kickstart from a BIOS boot by making the standard modifications to isolinux.cfg (i.e. "append initrd=initrd.img ks=cdrom:/ks-x86_64.cfg"). However I cannot locate the correct file(s) to perform the same customisation when I boot to UEFI. I can enter the "ks=cdrom:/ks-x86_64.cfg" parameter to the UEFI anaconda boot menu by editing the kernel parameters but I cannot find a way of customising it like you can with editing isolinux.cfg.

Does anyone know how to customise the anaconda boot parameters when using UEFI?

Many thanks Started March 21 2014 at 11:55 AM by Aidan Beeson Community Member 87 points Join the conversation Responses Guru 6863 points 21 March 2014 4:03 PM James Radtke Community Leader Hey Aidan - I don't know this for certain (and don't have time to validate right now) but hopefully to get you moving forward.

Look in /EFI/BOOT in your media. It seems to resemble what is in /isolinux

Specifically, check out BOOTX64.conf

Raw
#debug --graphics
default=0
splashimage=/EFI/BOOT/splash.xpm.gz
timeout 5
hiddenmenu
title Red Hat Enterprise Linux 6.4
    kernel /images/pxeboot/vmlinuz
    initrd /images/pxeboot/initrd.img
title Install system with basic video driver
    kernel /images/pxeboot/vmlinuz xdriver=vesa nomodeset askmethod
    initrd /images/pxeboot/initrd.img
title rescue
    kernel /images/pxeboot/vmlinuz rescue askmethod
    initrd /images/pxeboot/initrd.img

I'll revisit this later if I have something to update/change. But, hopefully this is correct and helpful. ;-)

Community Member 87 points 21 March 2014 4:26 PM Aidan Beeson Hi James,

That does look promising. Bit of a "d'oh" moment as it was kinda obvious really! When I get a chance to get onto the UEFI hardware again I'll have a play and update this thread...

Thanks!

Community Member 87 points 25 March 2014 10:07 AM Aidan Beeson James,

You're correct, the configuration is located in the /EFI/BOOT/BOOTX64.conf.
Unlike the non-efi Anaconda boot it uses a standard grub menu rather than the (slightly) fancier one. To get it to boot anaconda using the kickstart file I've used the following:

Raw
#debug --graphics
default=0
splashimage=/EFI/BOOT/splash.xpm.gz
timeout 60
# hiddenmenu
title Install RHEL with kickstart
    kernel /images/pxeboot/vmlinuz ks=cdrom:/ks-x86_64.cfg
    initrd /images/pxeboot/initrd.img
title Install Standard Red Hat Enterprise Linux OS
    kernel /images/pxeboot/vmlinuz
    initrd /images/pxeboot/initrd.img
title Install system with basic video driver
    kernel /images/pxeboot/vmlinuz xdriver=vesa nomodeset askmethod
    initrd /images/pxeboot/initrd.img
title rescue
    kernel /images/pxeboot/vmlinuz rescue askmethod
    initrd /images/pxeboot/initrd.img

Many thanks

:)

Guru 6863 points 25 March 2014 2:27 PM James Radtke Community Leader Good to hear it. I'm glad we were on the right page. I believe this (uEFI) will start to become more of a hot topic as time goes on. (I know I have a lot to learn yet ;-) Community Member 30 points 9 March 2015 5:33 PM Jun Li Yes, uefi is becoming more popular now, uefi is standard now for HP G9 servers, while IBM/Lenovo x series made uefi standard couple years ago.

Satellite 6 is falling behind, so far, it doesn't support pxe uefi kickstart, reasons are:
1. tftp server doesn't have uefi boot image, only has bios boot image;
2. dhcp server config doesn't have have definition for uefi based pxe request. This actually isn't a satellite/foreman issue, because foreman is missing the function of update dhcpd.conf when a subnet defined.
3. A uefi compatible pxe config file is missing when a new host defined in foreman/satellite.
the one that defined in /var/lib/tftpboot/pxelinux.cfg only works for bios based pxe.

Based on the 3 issues, I got pxe uefi kickstart working this morning, by addressing the above 3 accordingly:

  1. Manually add uefi boot image to ttftp server:

[root@capsule tftpboot]# pwd
/var/lib/tftpboot
[root@capsule tftpboot]# cd efi/
[root@capsule efi]# ls
bootx64.efi efidefault images splash.xpm.gz TRANS.TBL
[root@capsule efi]#
[root@capsule efi]# pwd
/var/lib/tftpboot/efi
[root@capsule efi]# ls
bootx64.efi efidefault images splash.xpm.gz TRANS.TBL
[root@capsule efi]# ls -l images/pxeboot/
total 36644
-r--r--r-- 1 root root 33383449 Mar 6 12:27 initrd.img
-r--r--r-- 1 root root 441 Mar 6 12:27 TRANS.TBL
-r-xr-xr-x 1 root root 4128944 Mar 6 12:27 vmlinuz
[root@capsule efi]#
[root@capsule efi]# cat efidefault

debug --graphics

default=0
splashimage=(nd)/splash.xpm.gz
timeout 5
hiddenmenu
title Red Hat Enterprise Linux 6.5
root (nd)
kernel /images/pxeboot/vmlinuz ks=http://satellite6.example.com:80/unattended/provision?token=fc25b9df-8c28-41cf-af5d-fa42b6401c29 ksdevice=bootif network kssendmac
initrd=/images/pxeboot/initrd.img
IPAPPEND 2
title Install system with basic video driver
kernel /images/pxeboot/vmlinuz xdriver=vesa nomodeset askmethod
initrd /images/pxeboot/initrd.img
title rescue
kernel /images/pxeboot/vmlinuz rescue askmethod
initrd /images/pxeboot/initrd.img
[root@capsule efi]#

  1. Add one section to serve uefi based pxe request, so the cliet will get bootx64.efi boot image instead of pxelinux.0

class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
next-server 10.1.1.1;

Raw
              if option arch = 00:06 {
                      filename "efi/bootia32.efi";
              } else if option arch = 00:07 {
                      filename "efi/bootx64.efi";
              } else {
                      filename "pxelinux.0";
              }

}

  1. every time when a new host defined in satellite 6/foreman, you will get a unattended provision url, copy this url, replace the ks url in /var/lib/tftpboot/efi/efidefault,

Now you should be able to kickstart a uefi system via pxe in a satellite 6/capsule environment.

Community Member 95 points 6 March 2015 12:02 AM David Worth Hi,

I am trying to create a custom iso for kickstart builds on servers with UEFI. From looking at the post, it looks like you were able to create a boot iso for EFI. If that is the case, what were the steps that you followed to create it? I am struggling to find good detailed info.

Thanks,
David

Community Member 39 points 9 March 2015 3:35 PM Aidan Beeson Hi David,

There are probably better/different ways of doing this but this is how I got it to work:

  1. Loop mount the install iso.
  2. Create local disk copies of "isolinx", "EFI" and "images" directories.
  3. Modify files in isolinux & EFI directories as required (e.g. isolinux.cfg and EFI/BOOT/BOOTX64.conf)
  4. Create the new ISO:
Raw
 mkisofs -o my.iso \
        -R -J -A "MyProject" \
  -hide-rr-moved \
  -v -d -N \
  -no-emul-boot -boot-load-size 4 -boot-info-table \
  -b isolinux/isolinux.bin \
  -c isolinux/isolinux.boot \
  -eltorito-alt-boot -no-emul-boot  \
  -eltorito-boot images/efiboot.img \
  -x ${mountDIR}/isolinux \
  -x ${mountDIR}/images \
  -x ${mountDIR}/EFI \
  -x .svn \
  -graft-points /path/to/loopmount/install_dvd my_kickstart.cfg=my_kickstart.cfg isolinux/=isolinux images=images EFI=EFI

The isolinux.cfg and BOOTx64.conf should contain a reference to the ks file, for example:

(isolinux.cfg)

Raw
label linux
  menu label ^Install OS using kickstart
  menu default
  kernel vmlinuz
  append initrd=initrd.img ks=cdrom:/my_kickstart.cfg
label vesa
  menu label Install ^standard Red Hat Enterprise Linux OS
  kernel vmlinuz
  append initrd=initrd.img 
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 -

(BOOTx64.conf)

Raw
  title Install OS using kickstart
        kernel /images/pxeboot/vmlinuz ks=cdrom:/my_kickstart.cfg
        initrd /images/pxeboot/initrd.img
title Install standard Red Hat Enterprise Linux OS
        kernel /images/pxeboot/vmlinuz
        initrd /images/pxeboot/initrd.img
title Install system with basic video driver
        kernel /images/pxeboot/vmlinuz xdriver=vesa nomodeset askmethod
        initrd /images/pxeboot/initrd.img
title rescue
        kernel /images/pxeboot/vmlinuz rescue askmethod
        initrd /images/pxeboot/initrd.img

Hope this helps. I've tested it using a VMware EFI emulation but not in anger on any "real" EFI systems.

Aidan

Community Member 95 points 11 March 2015 8:23 PM David Worth Thanks for the info. We are building new servers on HP gen8 and 9 servers. The Gen9's are defaulting to UEFI. For this go around I reverted back to legacy, but we will have more builds to come. So it would be nice to figure a way to boot and install using UEFI. I am guessing that is the direction hardware vendors are going. Also interesting that it was not too easy to find a lot of good info. Just pieces here and there.

I will give this a try on the next hardware build using EFI.

Thanks again!

Community Member 95 points 22 March 2015 12:44 AM David Worth Hi Aidan

Thanks again for the info. I was troubleshooting why boot from SAN was not working with a HP bl460Gen9 blade. I was trying legacy mode, but would not boot after install from kickstart. Waiting For HP on this issue.

However, I created a dual boot ISO, legacy and EFI. I was able to set the bios to EFI and image the server from kickstart. I just added the following to EFI/BOOT/BOOTX64.conf:

debug --graphics

default=0
splashimage=/EFI/BOOT/splash.xpm.gz
timeout 360
title RHEL 6.6 l00l
kernel /images/pxeboot/vmlinuz ks=nfs:nfsserver:/ifs/data/kickstart/KSConfigs/l001/l001-ks.cfg initrd=rhe6664.img ksdevice=eth0 ip= gateway= netmask=255.255.255.0 dns=
initrd /images/pxeboot/initrd.img
title RHEL 6.6 l002
kernel /images/pxeboot/vmlinuz ks=nfs:nfsserver:/ifs/data/kickstart/KSConfigs/l002/l002-ks.cfg initrd=rhe6664.img ksdevice=eth0 ip= gateway= netmask=255.255.255.0 dns=
initrd /images/pxeboot/initrd.img
title Red Hat Enterprise Linux 6.6
kernel /images/pxeboot/vmlinuz
initrd /images/pxeboot/initrd.img
title Install system with basic video driver
kernel /images/pxeboot/vmlinuz xdriver=vesa nomodeset askmethod
initrd /images/pxeboot/initrd.img
title rescue
kernel /images/pxeboot/vmlinuz rescue askmethod
initrd /images/pxeboot/initrd.img

There was only one instance where the ISO booted up and was went to a grub menu. Not sure why, but rebooted and everything was good. So your steps also work with physical as well.

Regards,
David

Community Member 35 points 18 June 2015 5:38 PM Jose Carlos Alves Hi David,

What you have in your file isolinux/isolinux.cfg?

Regards,
Sara

Community Member 95 points 18 June 2015 10:24 PM David Worth Hi Sarah,

To setup a dual legacy and EFI boot iso, I mount the latest RHEL 6.x dvd and copy the following directories to a work area on my server.

EFI/ images/ isolinux

If you are just setting up legacy boot, you can ignore the EFI and images directories.

Here is an example of what I am putting in the isolinux.cfg

------start of file --------
default vesamenu.c32

prompt 1

timeout 600

display boot.msg

menu background splash.jpg
menu title Welcome to Red Hat Enterprise Linux 6.6!
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
label vesa
menu label Install system with ^basic video driver
kernel vmlinuz
append initrd=initrd.img xdriver=vesa 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 servera-set-Network
kernel vmlinuz
append ks=nfs:nfsserver.example.com:/kickstart/location/servera-ks.cfg initrd=initrd.img ksdevice=eth0 ip=192.168.1.5 gateway=192.168.1.1 netmask=255.255.255.0 dns=1192.168.1.2
label serverb-dhcp
kernel vmlinuz
append ks=nfs:nfsserver.example.com:/kickstart/location/serverb-ks.cfg initrd=initrd.img ksdevice=eth0

------end of file --------

Then you have to run mkisofs to create the iso.

Hope that helps.

Regards,
David

Community Member 35 points 19 June 2015 8:15 AM Jose Carlos Alves Hi David,

My problema is because I have a HP Gen9 with UEFI and not EFI

I have
images
isolinux

In the isolinux.cfg, I have this

default=0
splashimage=/EFI/BOOT/splash.xpm.gz

prompt 1

timeout 5
hiddenmenu

label ptmtshdpnopp01
kernel vmlinuz
append initrd=initrd.img ksdevice=eth0 ip=10.126.77.11 netmask=255.255.255.224 gateway=10.126.77.1 dns=10.126.26.47 ks=nfs:10.126.58.136:/apps/redhat/ks-rhel-server-6.6-x86_64_hdp.cfg

label ptmtshdpnopp02
kernel vmlinuz

append initrd=initrd.img ksdevice=eth0 ip=10.126.77.12 netmask=255.255.255.224 gateway=10.126.77.1 dns=10.126.26.47 ks=nfs:10.126.58.136:/apps/redhat/ks-rhel-server-6.6-x86_64_hdp.cfg

I create th iso with

mkisofs -N -J -joliet-long -D -V "HADOOP" -o rhel-server-6.6-x86_64-hadoop.iso -b "isolinux/isolinux.bin" -c "isolinux/boot.cat" -hide "isolinux/boot.cat" -no-emul-boot -boot-load-size 4 -boot-info-table isolinux-6.6-x86_64/

But the machine doesn't see the iso

Thanks for the help
Regards,
Sara

Community Member 95 points 19 June 2015 1:18 PM David Worth Hi Sara,

I ran into the same thing earlier this year. We started using Gen9's. We had issues with boot from San and switching them to legacy mode, so we went with EFI, aka UEFI. EFI or UEFI boot is a different method of managing booting the OS. It was developed by HP in the Itanium servers. But you can search for the features and differences with legacy boot.

The way I went after booting with an ISO for kickstart installs is to create a dual boot ISO, legacy and EFI boot. Anything that will boot from legacy mode will read the isolinux.cfg and EFI mode will read the Bootx64.conf.

To create a dual ISO, create directory and copy EFI/ images/ isolinux/ directories from an install DVD. Next all you legacy boot entries will go into the isolinux/isolinux.cfg. You can see the example I have above. For EFI, you will have to edit the EFI/BOOT/BOOTx64.conf. Here is an example of what I put into mine.

-----start------

debug --graphics

default=0
splashimage=/EFI/BOOT/splash.xpm.gz
timeout 900
title Red Hat Enterprise Linux 6.6
kernel /images/pxeboot/vmlinuz
initrd /images/pxeboot/initrd.img
title rescue
kernel /images/pxeboot/vmlinuz rescue askmethod
initrd /images/pxeboot/initrd.img
title server-d
kernel /images/pxeboot/vmlinuz ks=nfs:nfsserver.example.net/kickstart/KSConfigs/server-d-ks.cfg ksdevice=eth0 ip=192.168.5.6 gateway=192.168.5.1 netmask=255.255.255.0 dns=192.168.2.2
initrd /images/pxeboot/initrd.img
title server-e
kernel /images/pxeboot/vmlinuz ks=nfs:nfsserver.example.net/kickstart/KSConfigs/server-e-ks.cfg ksdevice=eth0
initrd /images/pxeboot/initrd.img

------End------
In the example above, I put in an example of setting an IP as well as using DHCP. After you edit your legacy or EFI configs, then you have to create the ISO. Here is what I run to create a dual ISO:

  1. cd into the directory that contains the 3 directories I mentioned earlier.
  2. run > mkisofs -o ../my-iso-name.iso -R -J -A "MyDualISO" -hide-rr-moved -v -d -N -no-emul-boot -boot-load-size 4 -boot-info-table -b isolinux/isolinux.bin -c isolinux/isolinux.boot -eltorito-alt-boot -no-emul-boot -eltorito-boot images/efiboot.img -x ${mountDIR}/isolinux -x ${mountDIR}/images -x ${mountDIR}/EFI .

Also, after this is done, your kickstart will need to be able to work with EFI boots. First, the partition table will need to be gpt. Next, the bootloader location needs to be partition. Last, you will need a partition /boot/efi with fstype as efi and size 200.

If you need help with that, I can send you my disk layout from my kickstart config. Just let me know.

Regards,
David

Community Member 97 points 5 August 2015 7:26 PM Ivan Borghetti Hello David, how are you. I am also trying to create an iso that supports dual boot , i am now testing the UEFI boot and it works however i still need to customize the menu to list my different kickstarts, etc.

After copying the directories i needed i created the iso running mkisofs however i did not have the following lines in my command:

-x ${mountDIR}/isolinux -x ${mountDIR}/images -x ${mountDIR}/EFI .

Would you mind explaining me why those are needed and which would be the $(mountDIR) , i guess is the parent directory where those 3 subdirectories are, right? in my case would be iso

iso_cfg/
├── EFI
│ └── BOOT
├── images
│ └── pxeboot
└── isolinux

thanks in advance

Community Member 95 points 8 August 2015 10:27 AM David Worth Hi Ivan,

I am almost sure you do not need them. The -x is similar to the -m, which if you look in the man page, it allows you to exclude files. I was basing my mkisofs command off the one in this thread above. I thought I removed it from the one I use, but I still have it in.

Try removing it and see what happens. Can you let me know the outcome? Just curious.

Community Member 97 points 10 August 2015 12:12 PM Ivan Borghetti Hello David, thanks for your response, I tried without those parameters and it worked without issues,

thanks again

Community Member 95 points 10 August 2015 1:06 PM David Worth Great. Thanks for letting me know. I will take it out of my build script as well. Community Member 35 points 19 June 2015 2:37 PM Jose Carlos Alves Hi David,

Yes please, let me know what you have in your kickstart config about the disk layout.

Thanks,
Sara

Community Member 95 points 19 June 2015 3:05 PM David Worth Hi Sara,

I am setting up my disk partitioning in a pre section, then writing the disk to a file that gets included. The script will check for all drives and then only select a disk that is greater than 130000MB, roughly 126GB. This is to deal with the ISO, USB, or cdrom that you are using to image the server. It will ignore that and select my disk which is 134GB.

--------start---------

Disk Configuration

%include /tmp/partitioning

End Disk Configuration

%pre --log /root/ks-rhn-pre.log

Find OS disk

tdsk=""
list-harddrives | while read DISK DSIZE
do
#Convert float into int
DSIZEI=${DSIZE%.*}
# get scsi ID for disk
scsi_id="$(/mnt/runtime/lib/udev/scsi_id -gud /dev/${DISK})"
echo "F-$DSIZE I-$DSIZEI-- ID $scsi_id"

Raw
# determine if we should partition this device
###  if disk is smaller than 130000, than change the size in mb to reflect it.
if [ ${DSIZEI} -gt 130000 ]; then
     # add device to ignoredisk --only-use list
     ##the following is for SAN disks##
     tdsk="/dev/disk/by-id/scsi-${scsi_id}"
     ##End SAN Disk###

    ##if using local disks, comment the tdsk above and use this###
    ##tdsk="/dev/$DISK"
    ###End Local disk###

    echo "DISK - $tdsk"
Create GPT partition

echo "creating gpt on ${tdsk}"
parted -s ${tdsk} mklabel gpt

cat << EOF >> /tmp/partitioning
bootloader --location=partition --driveorder=${tdsk}
ignoredisk --only-use=${tdsk}
zerombr
clearpart --linux --drives=${tdsk}

part /boot/efi --fstype=efi --size=200 --ondisk=${tdsk}
part /boot --fstype ext4 --size=512 --ondisk=${tdsk}
part pv.4 --size=100 --grow --ondisk=${tdsk}
volgroup vg00 --pesize=32768 pv.4

logvol / --fstype ext4 --name=lvroot --vgname=vg00 --size=10240
logvol /opt --fstype ext4 --name=lvopt --vgname=vg00 --size=2048
logvol /home --fstype ext4 --name=lvhome --vgname=vg00 --size=2048
logvol /tmp --fstype ext4 --name=lvtmp --vgname=vg00 --size=6144
logvol /var --fstype ext4 --name=lvvar --vgname=vg00 --size=5120
logvol /usr/local --fstype ext4 --name=lvulocal --vgname=vg00 --size=4096
logvol swap --fstype swap --name=lvswap1 --vgname=vg00 --size=16384
logvol swap --fstype swap --name=lvswap2 --vgname=vg00 --size=16384
EOF
exit
fi
done

%end

--------end---------

Also note, I am booting from SAN so this line will work for SAN disks. > tdsk="/dev/disk/by-id/scsi-${scsi_id}"

If you are using local disks or VMware, use this > tdsk="/dev/$DISK"

I added comments to the pre script so you can see where to make changes. Hope that helps.

Regards,
David

Community Member 95 points 19 June 2015 3:18 PM David Worth It seems the formatting of the code is off. Let me try again. Raw
##Disk Configuration##
%include /tmp/partitioning

##End Disk Configuration##

%pre --log /root/ks-rhn-pre.log
##Find OS disk

 tdsk=""
 list-harddrives | while read DISK DSIZE
 do
    #Convert float into int
    DSIZEI=${DSIZE%.*}
    # get scsi ID for disk
    scsi_id="$(/mnt/runtime/lib/udev/scsi_id -gud /dev/${DISK})"
        echo "F-$DSIZE I-$DSIZEI-- ID $scsi_id"

    # determine if we should partition this device
###  if disk is smaller than 130000, than change the size in mb to reflect it.
    if [ ${DSIZEI} -gt 130000 ]; then
         # add device to ignoredisk --only-use list
##the following is for SAN disks##
         tdsk="/dev/disk/by-id/scsi-${scsi_id}"
##End SAN Disk###

    ##if using local disks, comment the tdsk above and use this###
    ##tdsk="/dev/$DISK"
    ###End Local disk###

        echo "DISK - $tdsk"

##Create GPT partition
echo "creating gpt on ${tdsk}"
parted -s ${tdsk} mklabel gpt

cat << EOF >> /tmp/partitioning
bootloader --location=partition --driveorder=${tdsk}
ignoredisk --only-use=${tdsk}
zerombr
clearpart --linux --drives=${tdsk}

part /boot/efi --fstype=efi --size=200 --ondisk=${tdsk}
part /boot --fstype ext4 --size=512 --ondisk=${tdsk}
part pv.4 --size=100 --grow --ondisk=${tdsk}
volgroup vg00 --pesize=32768 pv.4

logvol / --fstype ext4 --name=lvroot --vgname=vg00 --size=10240
logvol /opt --fstype ext4 --name=lvopt --vgname=vg00 --size=2048
logvol /home --fstype ext4 --name=lvhome --vgname=vg00 --size=2048
logvol /tmp --fstype ext4 --name=lvtmp --vgname=vg00 --size=6144
logvol /var --fstype ext4 --name=lvvar --vgname=vg00 --size=5120
logvol /usr/local --fstype ext4 --name=lvulocal --vgname=vg00 --size=4096
logvol swap --fstype swap --name=lvswap1 --vgname=vg00 --size=16384
logvol swap --fstype swap --name=lvswap2 --vgname=vg00 --size=16384
EOF
        exit
     fi
 done

%end

Community Member 35 points 29 June 2015 8:52 AM Jose Carlos Alves Thanks David,

I already installed my machines with your help.

Best regards,
Sara Soares

Community Member 32 points 1 October 2015 6:45 PM Gustavo Vegas Hello everyone,
I have a similar requirement, in our case we use ISO images to kickstart our servers. With pieces of information from this thread as well as some other resources out there, I have been able to get the RHEL6 side working. Now, I am also trying to do this for RHEL7, and things seem to have changed. The BOOTX64.conf seems to be getting ignored and GRUB2/grub.conf seems to be the one been taken into account. Any insights on how to work this out on RHEL7? Any help would be appreciated.

Thanks.

Red Hat Active Contributor 190 points 2 October 2015 1:07 PM Petr Bokoc Hello,

For RHEL7 on UEFI systems, the file you want to modify on the boot media is BOOT/EFI/grub.cfg . You can append the inst.ks= parameter to the line starting with linuxefi in any of the entries. The second entry is selected by default; you can use the set_default= option at the beginning of the file to change that (entries are numbered from 0).

After you change grub.cfg to your preferences, you can follow the instructions in the Anaconda Customization Guide to create a new bootable ISO image with the modified boot menu.

Newbie 11 points 3 March 2017 11:48 AM systeembeheer beeldengeluid Hello, just a update to help a few people along te way on Rhel 7.3 the dual(UEFI/Bios) boot iso, it can be build with a few steps.

Use following steps : Copy the content from a iso boot image say "rhel-server-7.3-x86_64-boot.iso" to your own image directory. Where you modify your dualboot image. Modify the EFI/Boot/grub.cfg for your UEFI boot needs. Modify the isolinux/isolinux.xfg for your BIOS based Boot needs.

Now the right mkisofs command( this one did it for me) Start this in the root of your own image directory mkisofs -U -A "RHEL-7.3 x86_64" -V "RHEL-7.3 x86_64" -volset "RHEL-7.3 x86_64" -J -joliet-long -r -v -T -x ./lost+found \ -o ../Kickstart_lab_7.3-disc1-dualboot.iso -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 .

The volume name ( "RHEL-7.3 x86_64") may come back to bite you ( haven't tried to change it) This label important in the Uefi part of your dual boot and comes back in the EFI/BOOT/grub.cfg. In two places, first in the search line and second after inst.stage2 parameter in the menu entry.

------------------- snippet grub.cfg------

search --no-floppy --set=root -l 'RHEL-7.3 x86_64'

--### BEGIN /etc/grub.d/10_linux ###-- menuentry 'Install Red Hat Enterprise Linux 7.3' --class fedora --class gnu-linux --class gnu --class os { linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=RHEL-7.3\x20x86_64 quiet initrdefi /images/pxeboot/initrd.img

}

After the inst.stage2 you can place your inst.ks parameters you need.

The isolinux/isolinux.cfg has your bios based boot parameter

Have fun.. and good luck

[Aug 06, 2017] Nathan Mike - Senior System Engineer - LPI1-C and CLA-11

Notable quotes:
"... mkdir -p bootdisk/RHEL ..."
"... example: cp -R /mnt/isolinux/* ~/bootdisk/RHEL/ ..."
"... cd ~/bootdisk/RHEL/ ..."
"... example: cp ks.cfg ~/bootdisk/RHEL/ ..."
"... mkisofs -r -T -J -V "RedHat KSBoot" -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -v -o linuxboot.iso . ..."
"... linux ks=cdrom:/ks.cfg ..."
"... linux ks=cdrom:/ks.cfg append ip=<IPaddress> netmask=<netmask> ksdevice=<NICx> ..."
"... example: linux ks=cdrom:/ks.cfg append ip=10.10.10.10 netmask=255.255.255.0 ksdevice=eth0 ..."
Aug 06, 2017 | mikent.wordpress.com
How to create a kickstart ISO boot disk for RedHat Posted by mikent on April 12, 2012 14 Votes


1) logon as root

2) create a directory name bootdisk/RHEL

mkdir -p bootdisk/RHEL

3) copy the directory isolinux from your RedHat DVD or other location containing RedHat binaries in bootdisk/RHEL

example: cp -R /mnt/isolinux/* ~/bootdisk/RHEL/

4) change direcotry to ~/bootdisk/RHEL/

cd ~/bootdisk/RHEL/

5) create (or copy) your ks.cfg (it will be discussed later in another post how to create a kickstart file) in ~/bootdisk/RHEL/

example: cp ks.cfg ~/bootdisk/RHEL/

6) Now, you can create the ISO boot disk as follow (make sure you run the command from ~/bootdisk/RHEL/) :

mkisofs -r -T -J -V "RedHat KSBoot" -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -v -o linuxboot.iso .

7) Burn your iso linuxboot.iso into a blank cd-rom or mount it as it is on a Virtual Machine for example

8) At linux boot prompt, type the following command:

linux ks=cdrom:/ks.cfg

if you need to install using a specific IP address using a specific Ks boot device, type the following:

linux ks=cdrom:/ks.cfg append ip=<IPaddress> netmask=<netmask> ksdevice=<NICx>

example: linux ks=cdrom:/ks.cfg append ip=10.10.10.10 netmask=255.255.255.0 ksdevice=eth0

9) your are done!

[Aug 06, 2017] How can I troubleshoot a failing Linux kickstart installation

Aug 06, 2017 | serverfault.com
down vote favorite I am having some trouble getting my pxebooting kickstart process working.

The script is known to work when installed via a DVD with the local media on the disk. I have updated the script to work with a remote repository and am leveraging PXEBooting so this can be leveraged for my enterprise. The script executes fine up until it starts to download packages.

Checking the log files on the web server hosting the repository, the first file is downloaded successfully with a 200 HTTP code. But the server running the kickstart indicates a failure and attempts to download the package again. I have confirmed this on the web server, as I see multiple requests for the same package repeated, all with the 200 HTTP code. But kickstart indicates that the download failed.

I am using CentOS 5. I copied the entire first DVD (I do not need the OpenOffice suite from the second) to the location on the web server, so the repodata already exists.

I have been able successfully download software from this repository using other systems that have already been built.

No errors appear in any of the log files that I have found on the kickstarted server, no messages are output to the screen. I have not been able to find any means of debugging this issue.

I am hoping that someone here can provide a link or information on how to attain more detailed debugging information to resolve this.

Thank you in advance. linux centos installation kickstart

share improve this question edited Apr 21 '15 at 14:34 ewwhite 162k 64 332 643 asked May 22 '12 at 13:48 Nick V 105
1
Try hitting ALT+F2 and ALT+F3 on the server you are kickstarting to see if it has any additional information that might help. – becomingwisest May 22 '12 at 14:03
If you download the package from that URL, do you get a valid package? – larsks May 22 '12 at 14:22
I have tried ALT+F2 and ALT+F3. F2 brings me to the BusyBox prompt, but no error messages. I have looked through the entire filesystem and nothing. The install logs under /mnt/sysimage/root/ do not even contain information. – Nick V May 22 '12 at 14:31
I am able to download a package from the repository without error. The issue only exists when I attempt to use the repository for installation. I even attempted to run a manual installation from the repository. The image/stage2.img file is loaded, but when it comes time to download packages the behavior is the same. At this point, I have loopback-mounted the first DVD but the same issue exists. (using CentOS 5.8) – Nick V May 22 '12 at 14:32
add a comment |
1 Answer active oldest votes
up vote down vote accepted Can you post an excerpt of your kickstart? What is the relationship between the repository and the system you're building? Same subnet?

I had a period of kickstart installation problems during the middle of the CentOS 5 series. The best thing to do from your standpoint is to check the other virtual terminals during the installation. Are you running the installation in graphical (X Windows) or text mode?

Here's what the different virtual terminals display. You should be able to debug from there.

Alt-F1
The installation dialog when using text or cmdline

Alt-F2
A shell prompt

Alt-F3
The install log displaying messages from install program

Alt-F4
The system log displaying messages from kernel, etc.

Alt-F5
All other messages

Alt-F7
The installation dialog when using the graphical installer

At some point, I was unable to resolve a kickstart performance issue. I ended up changing the installation method to NFS and the issues disappeared. See: CentOS 5.5 remote kickstart installation stalls at "Starting install process." How to debug?

share improve this answer edited Apr 13 at 12:14 Community ♦ 1 answered May 22 '12 at 14:42 ewwhite 162k 64 332 643
For the same mystical reason, the NFS change resolved the issue. – Nick V Aug 6 '12 at 4:33

[Aug 06, 2017] TipsAndTricks-KickStart - CentOS Wiki

Aug 06, 2017 | wiki.centos.org
Tips and tricks for anaconda and kickstart

For full documentations, please see https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Installation_Guide/ch-kickstart2.html (CentOS 5), https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/ch-kickstart2.html (CentOS 6) or https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/chap-kickstart-installations.html (CentOS 7)

Tuning the %packages section

When using %packages to define the set of packages that should be installed there are a number of more or less documented options that can be set:

--resolvedeps
Dependencies between packages will be automatically resolved. This option has been deprecated in Centos 5, dependencies are resolved automatically every time now.
--excludedocs

Skips the installation of files that are marked as documentation (all files that are listed when you do rpm -qld <packagename>)

--nobase
Skips installation of @Base. This won't work unless you know what you're doing as it might leave out packages required by post installation scripts
--ignoremissing
Ignore missing packages and groups instead of asking what to do. This option has been deprecated in Centos 5, dependencies are resolved automatically every time now.

Example of minimal package selection for CentOS 4:

%packages --resolvedeps --excludedocs --nobase
kudzu

please note that essential stuff will be missing. There will be no rpm, no yum, no vim, no dhcp-client and no keyboard layouts. Kudzu is required, because the installer fails if it is missing.

Example of minimal package selection for CentOS 5:

%packages --excludedocs --nobase
@Core

Again, this will leave you with a *very* basic system that will be missing almost every feature you might expect.

The --resolvedeps used with CentOS 4 is not required for CentOS 5 and newer releases as the newer installer always resolves dependencies.

Partitioning

If you start out with a unpartitioned disk, or a virtual machine on a unpartitioned image, use the --initlabel parameter to clearpart to make sure that the disklabel is initialized, or Anaconda will ask you to confirm creation of a disklabel interactively. For instance, to clean all partitions on xvda , and initialize the disklabel if it does not exist yet, you could use:

clearpart --all --initlabel --drives=xvda
Running anaconda in real text-mode

You probably already know that you can make anaconda run with a ncurses interface instead of the X11 interface by adding the line "text" to your kickstart file. But there's another option: install in real shell-like textmode. Replace the "text"-line with a "cmdline"-line in your kickstart file and anaconda will do the whole installation in textmode. Especially when you use %packages --nobase or run complex %post scripts this will probably save hours of debugging, because you can actually see the output of all scripts that run during the installation.

Enable/disable firstboot

You all know firstboot, the druid that helps you to set up the system after install. It can be enabled and disabled by adding either "firstboot --enable" or "firstboot --disable" to the command section of your kickstart file.

What the different terminals display
Alt-F1
The installation dialog when using text or cmdline
Alt-F2
A shell prompt
Alt-F3
The install log displaying messages from install program
Alt-F4
The system log displaying messages from kernel, etc.
Alt-F5
All other messages
Alt-F7
The installation dialog when using the graphical installer
Logging %pre and %post

When using a %pre or %post script you can simply log the output to a file by using --log=/path/to/file

%post --log=/root/my-post-log
echo 'Hello, World!'

Another way of logging and displaying the results on the screen would be the following:

%post
exec < /dev/tty3 > /dev/tty3
chvt 3
echo
echo "################################"
echo "# Running Post Configuration   #"
echo "################################"
(
echo 'Hello, World!'
) 2>&1 | /usr/bin/tee /var/log/post_install.log
chvt 1
Trusted interfaces for firewall configuration

You can use the --trust option to the firewall option multiple times to trust multiple interfaces:

# Enable firewall, open port for ssh and make eth1 and eth2 trusted
firewall --enable --ssh --trust=eth1 --trust=eth2
Use a specific network interface for kickstart

When your system has more than one network interface anaconda asks you which one you'd like to use for the kickstart process. This decision can be made at boot time by adding the ksdevice paramter and setting it accordingly. To run kickstart via eth0 simply add ksdevice=eth0 to the kernel command line.

A second method is using ksdevice=link . In this case anaconda will use the first interface it finds that has a active link.

A third method works if you are doing PXE based installations. Then you add IPAPPEND 2 to the PXE configuration file and use ksdevice=bootif . In this case anaconda will use the interface that did the PXE boot (this does not necessarily needs to be the first one with a active link).

Within the kickstart config itself you need to define the network interfaces using the network statement. If you are using method 2 or 3 then you don't know which device actually will be used. If you don't specify a device for the network statement anaconda will configure the device used for the kickstart process and set it up according to your network statement.

Forcing kickstart to ask for network configuration

Starting at CentOS 5, there a undocumented option that enable a prompt asking for network configuration during the installation. At the network statement, put the query keyword at the --bootproto= networking configuration, as we see below:

network --device=eth0 --bootproto=query

And a dialog box will appear asking for IP addressing, as well the hostname configuration.

Useful collection of ready-made kickstart files

At https://github.com/CentOS/Community-Kickstarts you can find a collection of ready-made kickstart files. Their primary goal is to provide functional sample kickstarts and snippets for the various types of deployments used in the community.

[Aug 06, 2017] Unable to get kickstart file from http webserver

Aug 06, 2017 | superuser.com
up vote down vote favorite I'm trying to get a vm up using a kickstart file. However, whenever the virtual machine initalize, it says it is unable to located the kickstart file from the location provided.

Code to build vm:

virt-install --name guest --ram 2048 --disk /vm/guest.img --location /CentOS-6.6-x86_64-bin-DVD1.iso -x "ks=http://192.168.1.72/engineer.cfg ksdevice=eth0 ip=192.168.0.1 netmask=255.255.255.0 dns=8.8.8.8 gateway=192.168.1.254"

kickstarter file:

#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --disabled
# Install OS instead of upgrade
install
# Use network installation
url --url="http://192.168.1.72/"
# Root password
rootpw --iscrypted $1$AcXRM2i4$9Wzd1rjvrLNREmeIsM9.W1
# System authorization information
auth  --useshadow  --passalgo=sha512
# Use graphical install
graphical
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --enforcing
# Installation logging level
logging --level=info

# System timezone
timezone  Asia/Singapore
# Network information
network  --bootproto=dhcp --device=eth0 --onboot=on
# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all  
# Disk partitioning information
part /boot --fstype="ext4" --size=100
part swap --fstype="swap" --size=512
part / --fstype="ext4" --grow --size=1

%post
echo "ENGINEERING WORKSTATION" > /etc/issue
%end

The file is located at the /var/www/html directory of the webserver.

Any advice on what I may have missed will be greatly appreciated. linux virtual-machine centos httpd kickstart

share improve this question asked Jan 28 '15 at 17:12 user4985 1
add a comment |
1 Answer active oldest votes
up vote down vote Make sure that your .cfg file have right permissions and is readable by other users/systems. You may try to wget or just simply open it from any other PC in your network and see if it works.

If you have permissions problem try to set chmod to 666.

chmod 666

[Nov 18, 2011] ISO Master - GUI Tool to edit ISO Images in openSUSE SUSE & openSUSE

susegeek.com

ISO Master which is claimed to be the best ISO editing tool is a graphical editor for ISO images. ISO Master is useful for extracting, deleting, or adding files and directories to or from an ISO image. ISO Master can read .ISO files (ISO9660, Joliet, RockRidge, and El Torito), most .NRG files, and some single-track .MDF files and can save and only save as .ISO.

The supported operations include, add/delete files and directories under the ISO image, Modify/delete the Boot records. extract files from the ISO etc.

Install ISO Master

Packman as always hosts a 1-click install Yast Metapackage for ISO Master. This installer is supported on openSUSE 11.0, openSUSE 10.3, openSUSE 10.2, and SUSE 10.1 & 10.0

[Nov 18, 2011] Edit and create your bootable iso image – the easy way

Ubuntu and friends
ISO Master

ISO Master allows you to modify the content of an ISO file without damaging the bootrecord and ruining the image's bootable capabilities. If you ever need to add or remove content from a CD Image, then ISO Master is the application you should use!

Creating a custom Red Hat installation DVD

October 2005

How to create a single CD for fast and easy customized installation.

Setting up the build directory:

The first thing to do is to copy all the cdrom ISOs to one location:

mkdir -p /mnt/disk{1,2,3,4}
mount -o loop RHEL4-U1-i386-AS-disc1.iso /mnt/disk1
mount -o loop RHEL4-U1-i386-AS-disc2.iso /mnt/disk2
mount -o loop RHEL4-U1-i386-AS-disc3.iso /mnt/disk3
mount -o loop RHEL4-U1-i386-AS-disc4.iso /mnt/disk4
We now copy all the files from the directories to a single directory: mkdir -p /data/isobuild
rsync -rv /mnt/disk{4,3,2,1}/* /data/isobuild/
We also need to copy across the .diskinfo file that is not caught by our *:
cp /mnt/disk1/.diskinfo /data/isobuild/

The .diskinfo file identifies the CD as being a correct Red Hat Installer disk and is checked by anaconda during the start of the install.

We could now build the DVD as it is but we really should have a fiddle first :-)

Adding more software to the DVD

We could add some of our own rpms to /data/isobuild/RedHat/RPMS; however by just doing this does not make them available at install time. There is an XML file that is read and ensures that the packages are installed in the correct order.

So let us throw a few random packages into the mix:

Add some java:

cp jre-1_5_0_03-linux-i586.rpm /data/isobuild/RedHat/RPMS/
Some encryption for GAIM:
cp gaim-encryption-2.36-3.rf.i386.rpm /data/isobuild/RedHat/RPMS/
Updating the comps.xml file

We need to ensure that the host computer has anaconda and anaconda-runtime installed: up2date anaconda anaconda-runtime

Before we update the XML dependency file we need to sort out package orders. If you have added a lot of new packages you may need to remove some old packages that you have replaced with newer versions to stop conflicts.

So the first command is: PYTHONPATH=/usr/lib/anaconda /usr/lib/anaconda-runtime/pkgorder \ /data/isobuild/ i386 > /data/isobuild/xander-pkgorder

This creates a list of files in the order it needs to install them in the file /data/isobuild/xander-pkgorder. Sometimes an occasional RPM will not provide the information anaconda needs. You can edit the file manually and insert your RPMs at the end.

Next we need to generate the dependency file:

/usr/lib/anaconda-runtime/genhdlist --fileorder /data/isobuild/xander-pkgorder \ /data/isobuild/

You will probably have a few hiccoughs the first time you run these commands. Most may be resolved by adding the missing entries to the pkgorder file or deleting duplicate packages.

Creating an automated installer We could *now* if we wanted to build our DVD; however we can make an automated installer.

So crack open system-config-kickstart and create a kickstart file with all the packages and partitioning etc you need for your systems.

copy the resulting file to /data/isobuild/ks.cfg

we can now edit the file /data/isobuild/isolinux/isolinux.cfg

copy or change the three lines:

label linux
  kernel vmlinuz
  append initrd=initrd.img ramdisk_size=8192
to
label xander
  kernel vmlinuz
  append initrd=initrd.img ramdisk_size=8192 ks=cdrom:/ks.cfg
Then change the default at the top of the file to xander. This means that the default action is to install directly from the DVD using your kickstart file.

Building the DVD iso

Now to build the iso:

cd /data/isobuild

chmod a+w isolinux/isolinux.bin

mkisofs -r -T -J -V "Custom RHEL4 Build" -b isolinux/isolinux.bin \
 -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
-boot-info-table -o /data/custom-RHEL4-dvd.iso  /data/isobuild/
Burning the DVD

Now we can burn the image to the CD. I assume the CD writer is already set up on your system. We use cdrecord below, but you can use other programs as well. The command is invoked as:

cdrecord -v speed=4 dev=0,0,0 /data/custom-RHEL4-dvd.iso
The speed and dev options depend on your system. The device for the dev argument can be determined by using the -scanbus option to cdrecord:
cdrecord -scanbus
Using the DVD

Once the image is burned onto the DVD, insert the DVD into the target machine and boot the machine. You should get the custom message that you created earlier. At this point, you can either press Enter at the boot prompt or let it timeout. When it times out it uses the default label, which we specified as ks (Kickstart).

Recommended Links

Softpanorama hot topic of the month

Softpanorama Recommended

Top articles

Sites



Etc

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available in our efforts to advance understanding of environmental, political, human rights, economic, democracy, scientific, and social justice issues, etc. We believe this constitutes a 'fair use' of any such copyrighted material as provided for in section 107 of the US Copyright Law. In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit exclusivly for research and educational purposes.   If you wish to use copyrighted material from this site for purposes of your own that go beyond 'fair use', you must obtain permission from the copyright owner. 

ABUSE: IPs or network segments from which we detect a stream of probes might be blocked for no less then 90 days. Multiple types of probes increase this period.  

Society

Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers :   Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism  : The Iron Law of Oligarchy : Libertarian Philosophy

Quotes

War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda  : SE quotes : Language Design and Programming Quotes : Random IT-related quotesSomerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose BierceBernard Shaw : Mark Twain Quotes

Bulletin:

Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 :  Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method  : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law

History:

Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds  : Larry Wall  : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOSProgramming Languages History : PL/1 : Simula 67 : C : History of GCC developmentScripting Languages : Perl history   : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history

Classic books:

The Peter Principle : Parkinson Law : 1984 : The Mythical Man-MonthHow to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite

Most popular humor pages:

Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor

The Last but not Least


Copyright © 1996-2016 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License.

The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.

Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.

This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

You can use PayPal to make a contribution, supporting development of this site and speed up access. In case softpanorama.org is down you can use the at softpanorama.info

Disclaimer:

The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

Last modified: August 13, 2017