Skip to content

Instantly share code, notes, and snippets.

@craigtracey
Created October 11, 2013 20:57
Show Gist options
  • Save craigtracey/6941922 to your computer and use it in GitHub Desktop.
Save craigtracey/6941922 to your computer and use it in GitHub Desktop.
Preseed partitioning example
# Keyboard and locale
d-i debian-installer/locale string en_US
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string us
# Network
d-i netcfg/choose_interface select eth0
d-i hw-detect/load_firmware boolean true
# Mirror
d-i mirror/country string manual
d-i mirror/http/hostname string mirror.anl.gov
d-i mirror/http/directory string /pub/ubuntu
d-i mirror/http/proxy string
# Clock
d-i clock-setup/utc boolean true
d-i time/zone string UTC
# Partitioning
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string lvm
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-auto/expert_recipe string \
boot-root :: \
100 5000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
device{ /dev/sda } \
vg_name{ openstack } \
. \
512 1000 1000 ext4 \
$primary{ } \
$bootable{ } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
mountpoint{ /boot } \
. \
128000 50 128000 linux-swap \
method{ swap } \
format{ } \
. \
20000 60 50000 ext4 \
$lvmok{ } \
lv_name{ root } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
in_vg{ openstack } \
mountpoint{ / } \
. \
1000000 70 -1 ext4 \
$lvmok{ } \
lv_name{ var } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
in_vg{ openstack } \
mountpoint{ /var } \
.
d-i partman-auto/choose_recipe select boot-root
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman-auto/init_automatically_partition select biggest_free
d-i partman/confirm_nooverwrite boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto-lvm/guided_size string max
# Set to true if you want to encrypt the first user's home directory.
d-i user-setup/encrypt-home boolean false
# Users
# Kernel params
# Late command
# etc etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment