[[ShowPath]] [[PageOutline]] = partition = This function allows you to partition a disk. {{{ #!sh partition disk partitionstring(s) }}} A partitionstring consists of 4 parts, each separated with a : * disksize:fstype:mountpoint:disklabel. ||'''Part'''||'''Required'''||'''Description'''|| ||disksize||Yes||You can specify the disksize in MB, starting with 1. When 0 is specified, the rest of the disk shall be used for that partition.|| ||fstype||Yes||See section [#FStype FS types]|| ||mountpath||Optional||This is used to mount the disk during installation.|| ||disklabel||Optional||When using disklabel and not mountpath, use this partitionstring; disksize:fstype::disklabel.|| == FS type == Currently the function partition supports: '''ext2''','''ext3''','''ext4''':: '''xfs''':: '''swap''':: '''grub_bios''':: Is used when installing GRUB2 on a GPT enabled disk '''ext2.128''':: Sali uses the latest version of e2fsprogs. This version uses a default inode block size of 256 by default. Grub 0.97 does not support this == Example == We want to create 4 partitions on disk sda: * A grub partition for GRUB2 * A boot disk for storing the kernels and initrd with label boot and mountpoint /boot * A swap partition with label swap * The last partition we use the rest of the disk for the root filesystem with label root and mountpoint / {{{ #!sh partition /dev/sda 1:grub_bios 1024:ext2:/boot:boot 4096:swap::swap 0:xfs:/:root }}} == depends on == * [wiki:SaliUsage/Functions/get_disksize get_disksize] * [wiki:SaliUsage/Functions/create_filesystem create_filesystem]