Creating a simple, reliable kickstart network install point

General support questions
Post Reply
hpux
Posts: 25
Joined: 2012/02/07 05:42:30
Contact:

Creating a simple, reliable kickstart network install point

Post by hpux » 2012/02/21 04:12:20

Created a network install point.

[root@solaria RPM]# pwd
/var/www/html/network-install/RPM
[root@solaria RPM]# ls -lart
total 1088
drwxr-xr-x. 2 root root 4096 Dec 10 17:36 isolinux
drwxr-xr-x. 3 root root 4096 Dec 10 17:38 images
drwxr-xr-x. 3 root root 4096 Dec 10 17:38 EFI
-rw-r--r--. 1 root root 1734 Jan 14 23:55 RPM-GPG-KEY-CentOS-Testing-6
-rw-r--r--. 1 root root 1730 Jan 14 23:55 RPM-GPG-KEY-CentOS-Security-6
-rw-r--r--. 1 root root 1730 Jan 14 23:55 RPM-GPG-KEY-CentOS-Debug-6
-rw-r--r--. 1 root root 1706 Jan 14 23:55 RPM-GPG-KEY-CentOS-6
-rw-r--r--. 1 root root 2251 Feb 19 22:25 mars-ks.cfg
-rw-r--r--. 1 root root 31 Feb 19 22:41 .discinfo
-rw-r--r--. 1 root root 338 Feb 19 22:41 .treeinfo
-rw-r--r--. 1 apache apache 338 Feb 19 22:43 treeinfo
-rw-r--r--. 1 root root 171 Feb 20 19:31 installerror.txt
drwxr-xr-x. 4 root root 4096 Feb 20 19:49 ..
drwxr-xr-x. 4 root root 598016 Feb 20 20:57 Packages
drwxr-xr-x. 6 root root 462848 Feb 20 20:57 .


cp -av from the iso files mounted mount - o loop /mountpoint

[root@solaria RPM]# cat .discinfo
1323560292.885204
6.2
x86_64
1
[root@solaria RPM]# cat .treeinfo
[general]
family = CentOS
timestamp = 1323560005.81
variant =
totaldiscs = 1
version = 6.2
discnum = 1
packagedir =
arch = x86_64

[images-x86_64]
kernel = images/pxeboot/vmlinuz
initrd = images/pxeboot/initrd.img

[images-xen]
kernel = images/pxeboot/vmlinuz
initrd = images/pxeboot/initrd.img

[stage2]
mainimage = images/install.img


Copied in .treeinfo .discinfo from the original media.


Wanting to create consistent vm machines with kickstart

Here is the script that kicks off the install



[root@solaria ~]# cat makekvm.ksh
#!/bin/ksh
name=$1
filename="/var/lib/libvirt/images/${name}.rh6.img"

virt-install --network network:default --name=${name} --ram=1024 --vnc --file=${filename} --file-size=30 --location=http://192.168.122.1/network-install/RPM -x "ks=http://192.168.122.1/network-install/RPM/mars-ks.cfg ksdevice=eth0 ip=192.168.122.30 netmask=255.255.255.0 dns=192.168.0.1 gateway=192.168.0.1"



Here is the kickstart file

# Kickstart file automatically generated by anaconda.

#version=DEVEL
install
url --url http://192.168.122.1/network-install/RPM

lang en_US.UTF-8
keyboard us
# network --onboot no --device eth0 --noipv4 --noipv6
network --bootproto=static --device=eth0 --ip=192.168.122.30 --netmask=255.255.2
55.0 --gateway=192.168.122.1 --onboot=on --hostname=mars --noipv6
rootpw --iscrypted $6$zhvbOyiIpHC3Pglj$3yLqHyZ.8aPWKhemyO9aqQEpAvFgKpYvdrDx8gw1
7NMDi85zlYIogATIRIKNloQiKF1c8hJenVgj/MnJbd1LD1
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --enforcing
timezone --utc America/Chicago
bootloader --location=mbr --driveorder=sda --append=" rhgb crashkernel=auto quie
t"
# 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
clearpart --none

part /boot --fstype=ext4 --size=512
part pv.008002 --grow --size=200

volgroup vg_mars --pesize=4096 pv.008002
logvol / --fstype=ext4 --name=LogVol00 --vgname=vg_mars --size=2048
logvol swap --name=LogVol01 --vgname=vg_mars --size=1024
logvol /usr --fstype=ext4 --name=LogVol02 --vgname=vg_mars --size=4096
logvol /var --fstype=ext4 --name=LogVol03 --vgname=vg_mars --size=23036

#repo --name="CentOS" --baseurl=file///var/www/html/repo --cost=100
#repo --name="CentOS" --baseurl=nfs///iso --cost=100
repo --name="CentOS" --baseurl=http://192.168.122.1/network-install/RPM

%packages
@base
@client-mgmt-tools
@console-internet
@core
@debugging
@directory-client
@hardware-monitoring
@ha
@ha-management
@java-platform
@large-systems
@load-balancer
@system-management-messaging-client
@mysql-client
@mysql
@storage-server
@network-file-system-client
@php
@performance
@perl-runtime
@resilient-storage
@system-management-snmp
@scalable-file-systems
@server-platform
@server-policy
@system-admin-tools
@turbogears
@virtualization
@virtualization-client
@virtualization-platform
@virtualization-tools
@web-server
@web-servlet
pax
oddjob
sgpio
genisoimage
certmonger
pam_krb5
krb5-workstation
perl-DBD-MySQL
sg3_utils
perl-DBD-SQLite
pexpect
crypto-utils
scrub
certmonger
perl-CGI
%end
%post
chkconfig isdn off
chkconfig pcmcia off
chkconfig apmd off


I'm pretty sure I'm missing the right createrepo command and location to run it from

createrepo -g $PWD

Install is crashing unable to find the group file

My install script is also running into a minor annoyance, the disk carving the disk up. I'm attaching a screen shot of the error.

I'd like to tweak the kickstart file so the install is completely unattended.

See attached screen shot. I will upload the repodata/ files as well.

hpux
Posts: 25
Joined: 2012/02/07 05:42:30
Contact:

Re: Creating a simple, reliable kickstart network install point

Post by hpux » 2012/02/21 04:20:36

attaching tar file of relevant repodata/ files

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Creating a simple, reliable kickstart network install point

Post by pschaff » 2012/02/21 15:59:36

Please review [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=28726&forum=54]Readme First[/url]:


[b][size=120]11. Formatting your post.[/size][/b]

Some of the widgets such as [i][u]Code[/u][/i] "", [i][u]Quote[/u][/i], and [i][u]Add[/u][/i] are badly broken and should not be used to paste extended or formatted text as they will [b]remove[/b] all line terminators and formatting.

The [i][u]Add[/u][/i] widget can be used for text attributes such as [b]Bold[/b], [i]Italics[/i], [u]Underline[/u], [d]Strike-Through[/d], to set the [color=ff0000]color[/color], [font=Impact]font[/font], and [size=120]size[/size].

The [i][u]Link[/u][/i] widget can be used to add a URL, and the [i][u]Picture[/u][/i] widget to add a link to an image, posted somewhere public.

[b] All the widgets will add at the end of the edit window, rather than at the current cursor position, as might be desired.[/b]

To add a formatted [u][i]code[/i][/u] segment it is easiest to manually insert tags, and paste your text between. For example:
[b][ code ][/b]
paste formatted
text
here[b][ /code ][/b]

Remove the spaces between the square brackets to make them legal tags. Be careful of long lines as [i][u]code[/u][/i] segments will not wrap.

Similarly quotations can be added with [b][ quote ] ... [ /quote ][/b] tags. Text in the [i][u]quote[/u][/i] segment will be wrapped and whitespace at the beginning of lines will be ignored, similar to the behavior for untagged text within the edit window.

The "Enable html tags" checkbox below the window can be used to allow HTML tags.

[b]The forum attachment function is permanently broken, so please do not try to "Attach file" to the post.[/b] Use the above methods to post in-line, or for long listings such as logs or debug output, use http://pastebin.centos.org/ or another such site, providing a [u][i]link[/i][/u] and setting the retention time to longer than the default [b]One day[/b].

hpux
Posts: 25
Joined: 2012/02/07 05:42:30
Contact:

Re: Creating a simple, reliable kickstart network install point

Post by hpux » 2012/02/21 16:16:55

Quite cool. I will attempt to reformat my post.

I was thinking if I comment out the clearpart command the annoying stop/confirm might stop happening.

I will try that out.

I'm fishing here for a cookbook. Must be one somewhere. I just want an install point. I'm wondering why I need to run createrepo.

I didn't have to do that for RHEL 2/3/4. I used centos yum on regular RH and then used createrepo without options to create install points.

Guess something has changed. I may have made this more complex than it needs to be.

To my post.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Creating a simple, reliable kickstart network install point

Post by pschaff » 2012/02/21 16:37:02

The primary point was about the broken attachment function more so than formatting.

Have you read the [url=http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html-single/Installation_Guide/index.html#s1-steps-network-installs-x86]upstream Installation Guide[/url]?

hpux
Posts: 25
Joined: 2012/02/07 05:42:30
Contact:

Re: Creating a simple, reliable kickstart network install point

Post by hpux » 2012/02/21 23:36:09

I'm a RHCE back to version 4.

So yes I've read the doc.

I'm trying something I tried on every release, which is an installation that has no human intervention. Run the right command, use kickstart and the installation point, properly prepared just serves up the files.

The point is to produce machines with absolute consistency.

I will unzip the attachments and repost them when I gain access to the system (upon going home from work). I tried to get a little cute with them.

I also failed to upload an error message my install has been generating which points its finger directly at the install point as a culprit.

This cookbook is looking good for me: http://diznix.com/articles/installing-linux-via-the-network/

hpux
Posts: 25
Joined: 2012/02/07 05:42:30
Contact:

Re: Creating a simple, reliable kickstart network install point

Post by hpux » 2012/02/22 03:14:27

Cookbook worked.

Only the annoying warning on clearpart remains.

As often happens, sometimes me posting to a forum is part of the creative process. Its a twisted, strange way that I talk to myself.

That is one nice little cook book !!!

I'm thinking maybe the clearpart is not needed because I'm creating a virtual machine and there is no partition information anyway.

I will experiment and get on to the next part of the inventive process.

:lol: 8-) :-o :-( :-( :-D :lol: :-P :hammer: :pint:

Post Reply