Sponsored Content
Operating Systems Linux Fedora Rhel 6.1 - How to create a kickstart file? Post 302854163 by Scott on Monday 16th of September 2013 10:20:15 PM
Old 09-16-2013
anaconda-ks.cfg is created based on the selections you make during a manual installation.

You need to give more information about your setup. Are you installing RHEL, or a rebrand (i.e. Fedora, CentOS or Scientific Linux)? Are you installing on physical hardware (describe it) or in a VM (describe that). Do you have a physical DVD, or an ISO image?

Here's an example anaconda-ks.cfg file that was created during a basic desktop installation (I have modified the partition information):

Code:
# Kickstart file automatically generated by anaconda.

#version=DEVEL
install
cdrom
lang en_US.UTF-8
keyboard us-acentos
network --onboot no --device eth0 --bootproto dhcp --noipv6
rootpw  --iscrypted $6$npZDPR.Ns0fVhnhw$iddPpu0nJM.FGT2nEUOJlJUGHQVzCF60VRI7mLU0hh7loeFSYse35T2xrnQNO8z42q8dGBZJ.H5pkeyhNQzfe.
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --enforcing
timezone --utc Europe/Zurich
bootloader --location=mbr --driveorder=sda,sdb --append="crashkernel=auto rhgb quiet"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work

zerombr yes
clearpart --all --drives=sda

part /boot --fstype=ext4 --size=500
part pv.008002 --grow --size=1


volgroup vg_kvm --pesize=4096 pv.008002
logvol / --fstype=ext4 --name=lv_root --vgname=vg_kvm --grow --size=1024 --maxsize=51200
logvol swap --name=lv_swap --vgname=vg_kvm --grow --size=1984 --maxsize=1984

repo --name="CentOS"  --baseurl=cdrom:sr0 --cost=100

%packages
@base
@core
@debugging
@basic-desktop
@desktop-debugging
@desktop-platform
@directory-client
@fonts
@general-desktop
@graphical-admin-tools
@input-methods
@internet-applications
@internet-browser
@java-platform
@legacy-x
@network-file-system-client
@office-suite
@print-client
@remote-desktop-clients
@server-platform
@server-policy
@x11
mtools
pax
oddjob
wodim
sgpio
genisoimage
device-mapper-persistent-data
abrt-gui
samba-winbind
certmonger
pam_krb5
krb5-workstation
gnome-pilot
libXmu
%end

reboot

In particular you may need to modify the url, network, partition information and repo settings, and anything else to suit your needs.

To use the kickstart file during an installation, press TAB after starting the machine, during the GRUB loader, and edit the boot options (press e) and add the location of the kickstart file (ks=...) (reference here)

I would suggest that you first install manually from the DVD, then play around with the configurator.
 

10 More Discussions You Might Find Interesting

1. Linux

Redhat AS 3.0 Kickstart file issue

I am trying to create a custom ks.cfg file with redhat AS 3.0. I have a certain package list I would like to install so we have just the packages we need. The issue is in the file it show groups so I have removed them and added my list of packages as I would when useing this in AS 2.1 but for some... (2 Replies)
Discussion started by: Acleoma
2 Replies

2. UNIX for Advanced & Expert Users

kickstart file questions

Hi, I have few questions to make this kickstart file to be more efficient: 1) I would like to reboot the server once the installation (included installed all the optional rpm) is done. 2) Is there a nicer way to install rpm packages? (Here I included the commands in my kickstart file) #... (1 Reply)
Discussion started by: beeloo
1 Replies

3. UNIX for Advanced & Expert Users

Kickstart File

Hi, I was able to set up a kickstart to install Red Hat Enterprise thought a network. I'm trying to enable a NTP time server in the post section of the kickstart file and also enable/disable a few services using chkconfig. I can't seam to get it to work, can anyone help ? I don't beleive i... (2 Replies)
Discussion started by: Georgesaa
2 Replies

4. Shell Programming and Scripting

Simple script to modify kickstart file

Hi, I would like to create a script so that it will ask me the following: 1) What is the ip address? 2) What is the gateway address? 3) What is the hostname? and then put the answer to the below kickstart file (kickstart.cfg) Here I included the kickstart.cfg: # Kickstart file... (9 Replies)
Discussion started by: beeloo
9 Replies

5. Red Hat

RHEL Kickstart

Hi, I am trying to install RHEL5.3 using kickstart method. Copied the rhel.iso file from DVD to http location. ks.cfg and rhel.iso files are available on a WINDOWS2008 Server (via HTTP). In ks.cfg file, provided the media path as url --url=http://xx.xx.xx.xx/RHEL53. System understanding the... (3 Replies)
Discussion started by: uday123
3 Replies

6. Red Hat

RHEL Kickstart Pre-Install script

Hey all, I'm not sure if this possible but I had tested it out manually during the installation (placed a sleep in the pre-installation) and it worked. I'm trying to have a pexpect script to log into the mysql and input a new row for the pre-installation, which will end up displaying on a web... (1 Reply)
Discussion started by: karljbaker
1 Replies

7. Red Hat

Does RHEL 5 provide a command to collect RHEL system log in single compress file?

Hi, I heard a command that can collect all RHEL 5 log in a single compress file before I forget. Does any body know...What the command is ? Thanks. (4 Replies)
Discussion started by: nnnnnnine
4 Replies

8. Red Hat

OpenSUSE installation using RHEL / CentOS Kickstart

Hi guys I have CentOS installed on my server. I have also installed TFTP server, DHCP server. I am able to install CentOS on remote machines using PXE boot and kickstart cfg file. I would like to install OpenSUSE using CentOS kickstart file. How do I do it ? I am also fine with any other... (2 Replies)
Discussion started by: msohail
2 Replies

9. UNIX Desktop Questions & Answers

Create/remove desktop short cuts via command line RHEL 6.3....

I would like to write a script that would remove and/or create shortcuts in Gnome desktop in RHEL 6.3... I googled all over the place could never find what I needed... Any help would be greatly appreciated! Thank you! (0 Replies)
Discussion started by: ruberked
0 Replies

10. Red Hat

Trouble creating RHEL 6.5 bootable image with custom kickstart file

Hi everyone, I have a custom kickstart file from a software vendor and I'm trying to package that with a RHEL 6.5 and then attach it to a VM and install RHEL with the settings in the kickstarter file. I'm doing this from a windows PC using an app called InfraRecorder. I've extracted the... (0 Replies)
Discussion started by: 911Eric
0 Replies
BOOTCD2DISK.CONF(5)						   bootcd utils 					       BOOTCD2DISK.CONF(5)

NAME
bootcd2disk.conf - configuration file for bootcd2disk DESCRIPTION
The file bootcd2disk.conf contains configuration option for the bootcd2disk(1) program of the same named package. The file must be located in the configuration directory which is usually /etc/bootcd. Blank lines are ignored and lines with leading # are comments. Values have to be set with name=value You can use a wildcard named DISK<number> to specify partitions instead of e.g. /dev/hda<number>. DISK was replaced by $DISK, which can be set by the same named parameter. FORMAT
ERRLOG=<path> Write all errors to this file. Required. DISK=<device|auto> Specify the disk you want to use for the installation, e.g. /dev/hda for the first IDE drive in the system. If you use "auto", bootcd2disk automatically try to use the first hard disk in the system. Required. SFDISK=<partitions in sfdisk syntax|auto> Configuration options for sfdisk, which creates the partitions for us. If you use "auto", we create default partitions "/", "/boot" and a swap partition. Required. VFAT=<partitions separated by spaces> Configure vfat partitions there, if you need some. Optional. EXT2FS=<partitions separated by spaces|auto> Specify the partitions with ext2 or ext3 (see next parameter) here. This partitions would be created and formated. If you use "auto", the "/" and the "/boot" partition would be created. Required. EXT3FS=<yes|no> Enter "yes" If you want ext3 partitions. If you use "auto", the systems use ext3 partition, if the kernel supports it. Required. SWAP=<partitions separated by spaces|auto> The partitions configured there are created as swap. If you use "auto", one swap partition is been created. Required. MOUNT=<mount <partition> <mountpoint>; ... |auto> Insert here the mount command line to mount your partitions or use "auto". Required. UMOUNT=<umount <mountpoint>; ... |auto> Insert here the mount command line to umount your partitions or use "auto". Required. FSTAB=<entries for the systems fstab |auto> Configure here all partitions you need to mount after target systems startup in the fstab syntax or use "auto". Required. LILO=<entries for the systems lilo.conf |auto> This variable includes the complete configuration file for the lilo bootloader on the target system. Use "auto" for automatically generated file. Only required, if you want LILO. Make sure GRUB and GRUB2 are defined as empty if you want to use LILO. GRUB=<entries for the systems grub/menu.lst |auto> This variable includes the complete configuration file for the grub bootloader on the target system. Use "auto" for automatically generated file. Only required, if you want GRUB. GRUB2=<entries for the systems grub/grub.cfg |auto> This variable includes the complete configuration file for the grub2 bootloader on the target system. Use "auto" for automatically generated file. Only required, if you want GRUB 2. GRUBBOOTDIR=<number of partition which contains grub-dir | 0> This variable defines the partition where the grub bootloader information is stored. You want to use this if you have defined your own partition layout and the grub information is not on the first partition. Remember that grub starts counting partitions at 0. So if you decided that /boot is on partition /dev/sda2 you need to set the parameter to 1. GRUBBOOTDISK=<grub disk> This should be "hd0". Only if your BIOS sees another disk as the first disk you may have to change it. GRUBDEVICEMAP=<auto|no|<value>> GRUBDEVICEMAP="auto" means, bootcd2disk deletes the original device.map, so that it will be auto-created by grub again. This should work also when installing on different hardware with different disks. GRUBDEVICEMAP="no" means bootcd2disk does not change device.map. This should work if a bootcd is installed on the original hardware Everything else will be used as new value for device.map. ELILO=<entries for the systems elilo.conf |auto> Same as LILO but for the elilo bootloader on ia64 systems. Use "auto" for automatically generated file. Only required, if you want ELILO. SSHOSTKEY=<yes|no> If you are using ssh it is helpful to have a unique ssh hostkey for each system installed with bootcd2disk. This will be generated if this option is set to "yes". Required. UDEV_FIXNET=<yes|no> If you are using the udev filesystem and want to install the image on other machines, you need to set this to "yes" because the net- work interfaces are hardwired in /etc/udev/rules.d/z25_persistent-net.rules (etch) or in /etc/udev/rules.d/70-persistent-net.rules (lenny) and we must remove them. Required. IMAGEURL=<url> If bootcd2disk is slow on your system (because of a slow CD/DVD drive or the HP ILO virtual CD interface), you can use a image server to get the bootcdimage from. bootcd2disk use the swap partition of your upcoming system as temporary space and copy the image from the configured image server to this partition and use it as image. May be overwritten from command line "-url". Need the following parameter "IMAGEURL". Required. The <url> is used with wget, all url syntax from wget are possible. Please use a ip because of failed DNS and you need also the con- figured ip interface. May be overwritten from command line (-url). Required. example: IMAGEPURL="https://192.168.1.1:81/cdimage.iso" function before_copy() { return } If you want some action before copying the system to the target disk, like remount or other thinks, you can write this action to the body of this function. Optional. function after_copy() { return } If you want some action after copying the system to the target disk, like remount or other thinks, you can write this action to the body of this function. Optional. SEE ALSO
bootcd2disk(1), bootcd(1), bootcdflopcp(1), bootcdwrite(1) AUTHOR
This manual page was written by Carsten Dinkelmann <carsten.dinkelmann@foobar-cpa.de>, for the Debian GNU/Linux system (but may be used by others). bootcd2disk.conf 2007-04-04 BOOTCD2DISK.CONF(5)
All times are GMT -4. The time now is 04:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy