4

I want to preseed an Ubuntu 12.04 installer using a custom partitioning recipe. My disk layout is reasonably complex, and so is the recipe syntax itself. Hand-crafting such a recipe seems tedious and error prone.

Is there a tool to simply create a recipe from an existing disk, including its partitions and LVM configuration?

0

I have found no such tool and don't want to write one. What I did was to treat the expert recipes as standard text files that I edit online with ACE editor. Before sending the recipe to the preseed file in the mako template, I use this function to convert the text into a form ready for debconf.

https://github.com/umeboshi2/paella/blob/master/src/paella/paella/managers/util.py#L25

This function could be expanded to allow you to put comments in the recipe if it is complex enough to need that.

0

You can use Kickstart. An excerpt from https://gist.github.com/ludo/3652811 example:

bootloader --location=mbr
zerombr yes
clearpart --all --initlabel
part /boot --fstype=ext2 --size=64
part swap --size=1024
part / --fstype=ext4 --size=1 --grow
0

I am not entirely sure about what you mean with "preseed". If you are talking about a KickStart or unattended install, one good tool for that is anaconda.

I have used it extensively for unattended installation of RedHatLinux. According to Debian Wiki it is supported at Debian also. Being ubuntu a Debian derivative it should be usable.

You control the partitions with command part.

The basic idea behind an unattended install is that you provide a kickstart config file and anaconda does all the work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.