function hydra_provision_config {
hydra_user_config interactive y "Interactive mode? (y/n)"
hydra_user_config device /dev/sdb "Destination device"
+ hydra_user_config device_label msdos "Device disk label"
hydra_user_config root_size 20G "Size of root partition"
hydra_user_config swap_size 2000 "Swap size (in MB, 0 to not create it)"
hydra_user_config home_size 20G "Size of home partition (0 to not create it, -1 for all free space)"
# Disk partitioning.
if [ "$swap" != "0" ]; then
boot_end=$(($swap_size + 200))
- hydra_safe_run parted -s -- $device mklabel msdos
+ hydra_safe_run parted -s -- $device mklabel $device_label
hydra_safe_run parted -s -- $device unit MB mkpart primary linux-swap 2 $swap_size
hydra_safe_run parted -s -- $device unit MB mkpart primary ext2 $swap_size $boot_end
hydra_safe_run parted -s -- $device unit MB mkpart primary ext2 $boot_end -1
boot_device="$device"2
syst_device="$device"3
else
- hydra_safe_run parted -s -- $device mklabel msdos
+ hydra_safe_run parted -s -- $device mklabel $device_label
hydra_safe_run parted -s -- $device unit MB mkpart primary ext2 2 200
hydra_safe_run parted -s -- $device unit MB mkpart primary ext2 200 -1
hydra_safe_run parted -s -- $device set 1 boot on