Hi Experts & Admins,
OS Ver: SLES 10 SP4, HW : HP Proliant DL 3xx
I was trying to create a customized DVD image for SLES 10 SP4 installation using autoyast/autoinst.xml methods. I want to create all my paritions to be sector aligned (starting sector is multiple of 8 or 4K) at the time of installation itself.
When I use <partitions><size></size></partitions> method to create partitions, it is creating the parition starting from Sector #63, not a multiple of 8 (4K). I guess, this is because of SLES 10 SP4 kernel detected my drive’s geometry as 255 Heads/63 Sectors and it creates Cylinder aligned paritions by default. <region_entry> list also not helping to start the parition at specific sector.
So, I added a small code in pre-script to create aligned partitions using parted as follows. (/dev/cciss/c0d0 is disk device name of HP SmartArray disk)
<pre-scripts config:type=“list”>
<script>
<filename>cciss.sh</filename>
<feedback config:type=“boolean”>true</feedback>
<interpreter>shell</interpreter>
<source><![CDATA[
#!/bin/bash
echo “Running Pre-installation script”
parted -s /dev/cciss/c0d0 mklabel msdos
parted -s /dev/cciss/c0d0 mkpart primary 2048s 990m
parted -s /dev/cciss/c0d0 mkpart primary 2048000s 100%
partprobe /dev/cciss/c0d0
fdisk -ul /dev/cciss/c0d0
]]></source>
</script>
</pre-scripts>
When I do like this, the first partition gets created at sector 2048, but second partition gets created with some other starting sector other than 2048000s. According to documentation, the pre-script will be executed before the system doing anything else, and can be used for creating customized paritions like this (ref: http://www.suse.com/company/novell_redirect.html?url=http://www.novell.com/support/kb/doc.php?id=3664970 ) but it is not working as expected. Sometimes, the partition changes that has been done in pre-script is not getting recognized by the installer GUI; a partprobe / sfdisk -R failing to rescan the device too. However, if the hard disk is blank and no existing parition table/partitions already, partitioning from pre-script works properly; otherwise it throws message “busy, could not re-read partition table, reboot the system” etc…
Is there any ways to instruct the installer create sector aligned paritions or start at specific sector? (Sles 10 SP4)
Is that possible to change drive geometry before the installer starts? I tried doing this by “sfdisk -S 32 -H 255” code also in pre-script; but it works at times, sometimes not.
Thanks in advance,
Jibs