Preseed deletes data on partitions, how can I stop this?

Asked by Hank

Here is my main preseed file:

# Partition Disks
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular

d-i partman-auto/expert_recipe string \
      boot-root :: \
              30000 30000 30000 btrfs \
                      $primary{ } $bootable{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ btrfs } \
                      mountpoint{ / } \
              . \
              8000 8000 8000 linux-swap \
                      method{ swap } format{ } \
                      use_filesystem{ } filesystem{ swap } \
                      $primary{ } \
              . \
              30000 30000 30000 ext4 \
                      method{ format } format{ } \
              use_filesystem{ } filesystem{ ext4 } \
              mountpoint{ /data } \
              label{ data } \
              . \
              15000 15000 15000 ext4 \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ ext4 } \
                      mountpoint{ /work } \
              label{ work } \
              .

d-i partman/confirm_write_new_label boolean true
d-i partman/confirm boolean true
d-i partman/choose_partition select Finish partitioning and write changes to disk
d-i partman/confirm_nooverwrite boolean true

And this is the preseed that should format and do a fresh install, but not touch the partitions or the data on the partitions:

# Partition Disks
d-i partman-auto/expert_recipe string \
      boot-root :: \
              30000 30000 30000 btrfs \
                      $primary{ } $bootable{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ btrfs } \
                      mountpoint{ / } \
              . \
              8000 8000 8000 linux-swap \
                      method{ swap } format{ } \
                      use_filesystem{ } filesystem{ swap } \
                      $primary{ } \
              . \
              30000 30000 30000 ext4 \
                      method{ keep } \
                      label{ data } \
              . \
              15000 15000 15000 ext4 \
                      method{ keep } \
                      label{ work } \
              .

partman-basicfilesystems partman-basicfilesystems/no_mount_point boolean false
d-i partman/confirm_write_new_label boolean true
d-i partman/confirm boolean true
d-i partman/choose_partition select Finish partitioning and write changes to disk
d-i partman/confirm_nooverwrite boolean true

After running the install with this preseed, the files within data and work are gone.

I have looked at https://wikitech.wikimedia.org/wiki/PartMan and set the method to keep but sadly still no luck.

The partitions are fine and still remaind, just the files within the partitions are gone.

My end goal is to have a unattended installation where it will format and restaill ubuntu, but still keep the partitions and the data still intact.

Thank you!

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Hank (s0meguyorgirl) said :
#2

If you're still having this problem, you can reopen your question either
by replying to this email

------ Original Message ------
From: "Launchpad Janitor" <email address hidden>
To: "<email address hidden>" <email address hidden>
Sent: 16/03/2019 08:52:59
Subject: Re: [Question #678861]: Preseed deletes data on partitions, how can I stop this?

Your question #678861 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/678861

Status: Open => Expired

Launchpad Janitor expired the question:
This question was expired because it remained in the 'Open' state
without activity for the last 15 days.

--
If you're still having this problem, you can reopen your question either
by replying to this email or by going to the following page and
entering more information about your problem:
https://answers.launchpad.net/ubuntu/+question/678861

You received this question notification because you asked the question.

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.