Version 9 (modified by Chris Pepper <pepper@reppep.com>, 14 years ago) (diff) |
---|
partition
This function allows you to partition a disk.
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 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 partition function 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, which uses a default inode block size of 256 by default. GRUB 0.97 does not support this, so ext2.128 overrides the inode block size to 128 for GRUB.
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 /
partition /dev/sda 1:grub_bios 1024:ext2:/boot:boot 4096:swap::swap 0:xfs:/:root