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

RE: Alligning partitions



Hello,

 

For RHEL5 partition alignment we use „parted“ insted „fdisk“ in the kickstart scripts.

Then you need to calculate the Start Sectors of your partition, make sure they

are exact divisible with 8 (8x512Byte =  4096Byte)

 

# SS_BOOT= Start Sector /boot partition

# SS_ROOT= Start Sector / partition

# SS_SWAP= Start Sector swap partition

# LASTSECTOR= Last usable Sector (exact divisible with 8, -1)

 

    parted -s -- ${DISC} mktable msdos

    parted -s -- ${DISC} mkpart   primary ext2       ${SS_BOOT}s $(( ${SS_ROOT} - 1 ))s

    parted -s -- ${DISC} mkpart   primary ext2       ${SS_ROOT}s $(( ${SS_SWAP} - 1 ))s

    parted -s -- ${DISC} mkpartfs primary linux-swap ${SS_SWAP}s ${LASTSECTOR}s

 

Regards

 

 

From: kickstart-list-bounces redhat com [mailto:kickstart-list-bounces redhat com] On Behalf Of Gerhardus Geldenhuis
Sent: Montag, 28. November 2011 13:57
To: kickstart-list redhat com
Subject: Alligning partitions

 

Hi

I am building Red Hat 5.4 and 5.5 boxes on VMWare and some on HP blades with SAN attached storage. I need to do partition alignment during build which I understand is done automatically in Red Hat 6's version of anaconda and later but not yet in 5.4, 5.5. So a number of questions:

* I could not find an option for part in the docs  (http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition) that easily allow me to set a sector offset. I have found a number of ways to do this but was wondering if there is an hidden option to do this using part. Currently I am using fdisk to create a partition starting at sector 64 rather than 63 for SAN storage and doing the same for VMWare boxes. 

 

* How can I easily debug my kickstart? I currently change the kickstart and then reboot the physical server but that is very painful as it has to go through all of the bios checks etc and then sometime I forget to press F12... I tried adding a sleep 100000 to my pre scripts which works and allows me to run some commands on the command line but I am not sure how to "reparse" the kickstart file to test whether new settings works.

 

* Also rather than use clever ways of getting a list of drives or anything similar... is there predefined procedures/variables that I can use, are they available in all scripting languages (bash, python) and where/how could I easily get a list of available variables for scripting.

 

If I need to rtfm, the please point me in the right direction.

 

Best Regards

 

--
Gerhardus Geldenhuis


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