Disk detection with kickstart

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22/10/12 4:41 PM, kickstart-list-request@xxxxxxxxxx wrote:
Hi,

I have to provision the servers and all the servers are different disk types like hda, sda, xvda. So I have issue to detect the disk type itself with kickstart and make partitions. Does anyone have pre installation script that will do this job?

There are a couple of different approaches to this problem.

One is to build a fairly sophisticated one-size-fits-all kickstart script that works for every situation. We have one admin at work (responsible for a small area--two or three hundred servers) who has done this. However he has strong control over his configurations and is very knowledgeable.

This is fairly complicated, and honestly if you have to ask for more than a very narrow and specfic pointer or two you're not going to have much luck.

Another way is to define a different kickstart for each type of server and use DHCP/PXE to differentiate between them. I don't have the details off the top of my head, but you can create a couple of different kickstart servers and then link each IP address to a config. Then when the tftp request comes in it gets handed the right ks.cfg file for that machine

I've taken a third tack.. I have little control over my configurations (I have to mantain a 4.x, 2-3 5.x and so far 3 6.x kickstart configurations), but for the most part I have known hardware (HP DL3x0s, g4 and up) and I do something (off the top of my head) like this:

%pre

(some stuff to set up resolve.conf and kick ntpd up)

if /dev/sda
    do
    cat << EOF >> /tmp/partitions
<insert partition table for /dev/sda>
EOF

elif /dev/cciss/c0d0
    do
    cat <<EOF>> /tmp/partitions
<partition table for the cciss/c0d0 setup>
EOF
else
    write error file.

(clearly this is NOT the real code, and might have some errors :) )

Then were I'd normally have my disk layout in the ks.cfg I just

%include /tmp/partitons

And yes, in the first iteration I *did* spell it different in one place than the other. Just because I like beating my head into brick walls.

The other thing is I only do the first disk/disk set in the ks.cfg, and configure the rest of the disks later.


_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux