Auto Install for Mandrake Linux
Prev Next

partitions

This option is used to define the partitions that are to be created on your hard disks. It is used in conjunction with the 'partitioning' options entry for 'auto_allocate'. If 'auto_allocate' => 0, then this options' contents are ignored.

'partitions' => [

{

'mntpoint' => '/boot',

'type' => 131,

'size' => 64449,

'hd' => 'hda'

},

{

'mntpoint' => 'swap',

'type' => 130,

'size' => 524097,

'hd' => 'hda'

},

{

'mntpoint' => '/',

'type' => 387,

'size' => 573344,

'ratio' => 100,

'maxsize' => 5750000

'hd' => 'hda'

}

],

Descriptions:

'mntpoint'

normally, this is the directory where the partition will be mounted. However, it is also used to provide a unique name for a RAID volume or LVM physical volume (PV) that will be combined in a subsequent declaration using the 'parts' option.

'type'

file system type for the partition.


131 (0x83) is ext2, 130 (0x82) is swap, 387 (0x183) is reiserfs, 1155 (0x483) is ext3. See Mandrake/mdkinst/usr/bin/perl-install/partition_table.pm for a complete listing.



Use 142 (0x8e) for LVM PVs or 253 (0xfd) for RAID partitions

'size'

the number of sectors that the partition is to be created with. The partitioning of the disk is done to the nearest cylinder boundary less than or equal to the number you have specified. The number of sectors in a cylinder are found by (number of sectors per track) * (number of heads). Usually each sector is 512 bytes in size, so you can do the math...


A quick short way is: 'size' => 32 << 11 should give you something just short of 32 megabytes.

'ratio'

is the percentage (1 -> 100) of the disk that the partition can grow to.

'maxsize'

is the maximum number of sectors that the partition can be. A limit on the 'ratio'.

'hd'

device label (without the /dev/ part) for the disk drive that this set of definitions applies to. eg. hda or sdb. This entry is not required if you only have one hard disk, but it may be a good habit to get into in case the next system has more than one drive and you forget.

'level'

this specifies the Software RAID level that is desired. Supported levels are:


'linear', '0', '1', '4' or '5'

'options'

mount options for the device / file system being mounted and are very file system specific. See the appropriate man page for details about the options available.

'parts'

this is a space separated list of 'mntpoint' which are to be combined into either a RAID array or a LVM Volume Group (VG).

'VG_name'

is the name used to reference a Volume Group in a subsequent declaration.

'passno'

if present, the value specified is placed in the fifth (5) field (default value of 0 is used if this is omitted). See the man page for fstab (man fstab).

'freq'

if present, the value specified is placed in the sixth (6) field (default value of 0 is used if this is omitted). See the man page for fstab (man fstab).

'toFormatCheck' => 1,

if present, causes the associated 'device' to be checked for Bad Blocks.



To make your life a bit simpler and be able to allocate all of the disk, change the last partitions 'size' to some small value and set the 'ratio' to 100. This has the effect of allocating all of the remainder of the disk to that partition.

For 'passno', 'freq' and 'toFormatCheck' special information, see the Problems and Issues section.

Examples:

LVM:

partitions => [

...


{ 'mntpoint' => 'vg_a', 'size' => 400 << 11, 'type' => 0x8e, 'hd' => 'sda' },

{ 'mntpoint' => 'vg_b', 'size' => 400 << 11, 'type' => 0x8e, 'hd' => 'sdb', 'ratio' => 1 },

{ 'VG_name' => 'pixVG', 'parts' => 'vg_a vg_b' },

{ 'mntpoint' => '/home', 'size' => 500 << 11, 'type' => 0x183, 'hd' => 'pixVG' },

],



If the 'parts' field is omitted, then any PV available will be used.

Software RAID:

partitions => [

...


{ 'mntpoint' => 'raid_a', 'size' => 400 << 11, 'type' => 0xfd, 'hd' => 'sda', 'ratio' => 1 },

{ 'mntpoint' => 'raid_b', 'size' => 400 << 11, 'type' => 0xfd, 'hd' => 'sdb', 'ratio' => 1 },

{ 'mntpoint' => 'raid_c', 'size' => 400 << 11, 'type' => 0xfd, 'hd' => 'sdc', 'ratio' => 1 },

{ 'mntpoint' => 'raid_d', 'size' => 400 << 11, 'type' => 0xfd, 'hd' => 'sdd', 'ratio' => 1 },

{ 'mntpoint' => '/home', 'type' => 0x483, 'hd' => 'md0', 'level' => 1, 'parts' => 'raid_a raid_b' },

],



LVM on software raid:

partitions => [

...


{ 'mntpoint' => 'raid_a', 'size' => 400 << 11, 'type' => 0xfd, 'hd' => 'sda', 'ratio' => 1 },

{ 'mntpoint' => 'raid_b', 'size' => 400 << 11, 'type' => 0xfd, 'hd' => 'sdb', 'ratio' => 1 },

{ 'mntpoint' => 'raid_c', 'size' => 400 << 11, 'type' => 0xfd, 'hd' => 'sdc', 'ratio' => 1 },

{ 'mntpoint' => 'raid_d', 'size' => 400 << 11, 'type' => 0xfd, 'hd' => 'sdd', 'ratio' => 1 },

{ 'mntpoint' => 'vg_a', 'type' => 0x8e, 'hd' => 'md0', 'level' => 1, 'parts' => 'raid_a raid_b' },

{ 'mntpoint' => 'vg_b', 'type' => 0x8e, 'hd' => 'md1', 'level' => 1, 'parts' => 'raid_c raid_d' },

{ 'VG_name' => 'pixVG', 'parts' => 'vg_a vg_b' },

{ 'mntpoint' => '/home', 'size' => 500 << 11, 'type' => 0x183, 'hd' => 'pixVG' },

],



If the 'parts' field is omitted, then any PV available will be used.

Related Option Entries:

manualFstab, partitioning






PrevHome Next
partitioning   postInstall and postInstallNonRooted