0

I'm preseeding my Debian installation quite successfully, but I have one problem. I want my swap partition to be labeled, but the installer is ignoring the label { } element. The partion is created, it has an UUID, but I want to mount by labels (multisystem environment with Windows, etc.) Other labels are created without problems.

I'm preseeding Debian Stretch.

d-i partman/early_command \
        string sfdisk --wipe-partitions always --delete /dev/sda 2 3 4
d-i partman-auto/disk string /dev/sda
d-i partman-auto/init_automatically_partition select biggest_free

d-i partman-auto/expert_recipe string                       \
    lk-part ::                                              \
            2000 2000 2000 linux-swap                       \
                    $primary{ }                             \
                    method{ swap }                          \
                    format{ }                               \
                    label{ SWAPPART }                       \
            .                                               \
            50000 50000 50000 xfs                           \
                    $primary{ }                             \
                    method{ format }                        \
                    format{ }                               \
                    use_filesystem{ }                       \
                    filesystem{ xfs }                       \
                    mountpoint{ / }                         \
                    label{ LKLINUX }                        \
            .                                               \
            40000 40100 -1 xfs                              \
                    $primary{ }                             \
                    method{ format }                        \
                    format{ }                               \
                    use_filesystem{ }                       \
                    filesystem{ xfs }                       \
                    mountpoint{ /tmp }                      \
                    label{ TEMPFS }                         \
            .
d-i partman/mount_style select label

Does anyone know why the label on swap is ignored?

After the installation, when I manually do:

swapoff /dev/sda2
mkswap --label SWAPPART /dev/sda2
swapon /dev/sda2

the label is present and displayed for example by blkid.

Best Regards
Kamil

  • What outputs are you listing? It is not clear that your label is not being accepted as everything you have posted shows your desired label being used. – kemotep Mar 28 '18 at 17:14
  • It is my preseed.cfg file, it is my config to be set on my disks during installation. After the installation partitions are created properly, but labels are set only on / and /tmp, but not on swap. – Kamil Apr 13 '18 at 18:02

Your Answer

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

Browse other questions tagged or ask your own question.