RE: Sane default kickstarts that understand hard disk differences

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

 



Oops, forgot to mention that list-hardrives also returns the SIZE of the
drive.  $2 is the size of the first drive, $4 the size of the second,
and so on. 

-----Original Message-----
From: kickstart-list-bounces@xxxxxxxxxx
[mailto:kickstart-list-bounces@xxxxxxxxxx] On Behalf Of Shabazian, Chip
Sent: Wednesday, January 03, 2007 11:28 AM
To: Discussion list about Kickstart
Subject: RE: Sane default kickstarts that understand hard disk
differences

I've got a great way that I've been doing this for years.  It works for
all types of drives, scsi, ide, even the cciss scsi controllers in HP DL
Servers.

In %pre, I figure out what drives exist in the system, and write out a
partion scheme based on one or two drives:


%pre

# Determine how many drives we have
set $(list-harddrives)
let numd=$#/2
d1=$1
d2=$3

if [ $numd -ge 2 ] ; then
cat << EOF >> /tmp/partinfo
part pv.01 --size=1 --grow --fstype=ext3 --ondisk=$d1 volgroup volgrp01
pv.01 part pv.02 --size=1 --grow --fstype=ext3 --ondisk=$d2 volgroup
volgrp02 pv.02 #HOWEVER_YOU_WANT_TO_PARTITION EOF

else

cat << EOF >> /tmp/partinfo
part pv.01 --size=1 --grow --fstype=ext3 --ondisk=$d1 volgroup volgrp01
pv.01 #HOWEVER_YOU_WANT_TO_PARTITION EOF

fi

I then %include the partitioning back up in the command section:

%include /tmp/partinfo 

-----Original Message-----
From: kickstart-list-bounces@xxxxxxxxxx
[mailto:kickstart-list-bounces@xxxxxxxxxx] On Behalf Of Michael DeHaan
Sent: Wednesday, January 03, 2007 11:11 AM
To: kickstart-list@xxxxxxxxxx
Subject: Sane default kickstarts that understand hard disk differences

Fellow Kickstarters,

Cobbler (http://cobbler.et.redhat.com) ships some default kickstart
files that it provides for users for setting up fully automated installs

(users who do not want to write their own kickstarts).   I am trying to 
improve those default kickstarts.

One of the things I want to do is ship a good default kickstart that, on
the given system, does a reinstall of the OS using a sane partitioning
layout, regardless of whether the boot drive is /dev/hda or /dev/sda, 
and regardless of size.   I don't want to assume IDE drives of a certain

size, for instance.
That wouldn't be good.   A much larger SCSI drive should be usable too, 
and should result in a larger "/" partition.

Obviously this won't fit everyone's needs, but it is useful for 
basic/intermediate users.   Does anyone have any kickstarts that 
accomplish this?  I realize this is all documented to some extent,
though if anyone can share some real life working fully automatic
kickstarts that ignore drive size/type would be really great.

Thanks,

Michael DeHaan
 


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

_______________________________________________
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