wiki:SaliUsage/Functions/partition

Version 7 (modified by bas, 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.
PartRequiredDescription
disksizeYesYou can specify the disksize in MB, starting with 1. When 0 is specified, the rest of the disk shall be used for that partition.
fstypeYesSee section FS types
mountpathOptionalThis is used to mount the disk during installation.
disklabelOptionalWhen 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 /
partition /dev/sda 1:grub_bios 1024:ext2:/boot:boot 4096:swap::swap 0:xfs:/:root

depends on