Creating a simple, reliable kickstart network install point

General support questions

Creating a simple, reliable kickstart network install point

Postby 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

Re: Creating a simple, reliable kickstart network install point

Postby hpux » 2012/02/21 04:20:36

attaching tar file of relevant repodata/ files
hpux
 
Posts: 25
Joined: 2012/02/07 05:42:30

Creating a simple, reliable kickstart network install point

Postby pschaff » 2012/02/21 15:59:36

Please review Readme First:


11. Formatting your post.

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

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

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

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

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

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

Similarly quotations can be added with [ quote ] ... [ /quote ] tags. Text in the quote 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.

The forum attachment function is permanently broken, so please do not try to "Attach file" to the post. 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 link and setting the retention time to longer than the default One day.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Creating a simple, reliable kickstart network install point

Postby 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.
hpux
 
Posts: 25
Joined: 2012/02/07 05:42:30

Re: Creating a simple, reliable kickstart network install point

Postby pschaff » 2012/02/21 16:37:02

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

Have you read the upstream Installation Guide?
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Creating a simple, reliable kickstart network install point

Postby 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-l ... e-network/
hpux
 
Posts: 25
Joined: 2012/02/07 05:42:30

Re: Creating a simple, reliable kickstart network install point

Postby 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:
hpux
 
Posts: 25
Joined: 2012/02/07 05:42:30


Return to CentOS 6 - General Support

Who is online

Users browsing this forum: No registered users and 7 guests