Re: [partman] How to keep data in existing partitions
On Tue, Jan 10, 2006 at 06:34:44PM +0100, Free Ekanayaka wrote:
> Ok, by reading through the partman manual I figure out more or less
> how the system work, and how could I use the commands of the
> parted_server to write a shell script to decide whether to format or
> keep the data.
Partman-auto is not designed to reuse existing partitions. If you
instruct it not to format the partition for /home then it will create
a new partition for /home and it will try to use it without
formatting. This won't be a partition that already exists.
> But still I don't understand exactly where should I install the
> script. I've seen that partman-auto installs items in various menu
> directories. According to the manual the first one to bu run should be
> the one in the choose_partition directory:
I suppose the following will do the job. First, a script at the end
if there_is_a_partition_for_/home; then
create a recipy for / and swap only
create a recipy for /, /home and swap
Second partman-auto autopartitions the free space of the disc acording
to the new recipy.
Third, a script at the start of finish.d:
if a_recipy_without_/home_has_been_used; then
create files use_filesystem, filesystem and mountpoint in the \
partition directory of the partition for /home