Debian /Ubuntu Preseeding provides a set of answer to the Installer so that you do not have to enter the answers manually during the Installation Process. Most of the questions asked by the Debian Installer can be pressed away. It can fully automate installation and even provide the features that are not available during the normal installation. To create a manual partitioning scheme we use expert recipe of Preseeding.
<owner> <question name> <question type> <value>
<owner>: “d-i” which stands for Debian Installer.
: partman-auto, partman-auto-raid and partman-auto-lvm are the packages that handle automatic partitioning of various types, and some of the questions (prompts) issued by them are described here:
<question type> says what sort of value to expect (eg string, boolean, select (for a menu)…)
<question value> this is where you put the answer that you would otherwise be entering interactively
Expert Recipe for manual partitioning
# configuration to create: # * 15G + 50 % RAM / # * 8G swap # * the rest formatted with LVM on /opt d-i partman-auto/method string lvm d-i partman-auto/disk string /dev/sda # the install makes sure we want to wipe the lvm d-i partman-lvm/device_remove_lvm boolean true d-i partman-auto/confirm boolean true d-i partman-lvm/device_remove_lvm boolean true d-i partman-lvm/confirm boolean true d-i partman-lvm/confirm_nooverwrite boolean true d-i partman-auto/expert_recipe string es :: \ #For GPT Partition Table 32 32 32 free \ $iflabel{ gpt } \ method{ biosgrub } \ . \ 15000+50% 15000 15000+50% ext4 \ $primary{ } \ $bootable{ } \ method{ format } \ format{ } \ use_filesystem{ } \ filesystem{ ext4 } \ mountpoint{ / } \ . \ 8000 8000 8000 linux-swap \ method{ swap } \ format{ } \ . \ 64 1000 10000000 ext4 \ method{ format } \ format{ } \ use_filesystem{ } \ filesystem{ ext4 } \ lv_name{ data } \ $defaultignore{ } \ $lvmok{ } \ mountpoint{ /opt } \ . d-i partman-auto-lvm/guided_size string 100% d-i partman/choose_partition \ select Finish partitioning and write changes to disk d-i partman-auto/confirm boolean true d-i partman-auto/choose_recipe es
References:
https://wikitech.wikimedia.org/wiki/PartMan
http://ftp.dc.volia.com/pub/debian/preseed/partman-auto-recipe.txt