11

I'm trying to make a installation usb stick for a equipment we have here. I would like to automate linux installation, because we have a lot of these machines to install.

The machine has a 30GB SSD . I want preseed to use the entire disk to create an ext4 partition (mount point '/') and do not create a swap (it's a SSD, so no swap to avoid more read/write).

I read some blog's and articles on the internet where you define an expert_recipe to partman. But I wasn't able to find and option to say use the whole free space. There's the defaut option for partman but I believe (not sure of that) partman would create a swap partition.

How could I do that? Tell preseed to create a single partition using the entire disk and not create a swap partition ?

14

partman indeed creates swap partitions by default, unless you use the expert option. The following expert_recipe creates a single root partition for the entire disk.

d-i partman-basicfilesystems/no_swap boolean false
d-i partman-auto/expert_recipe string myroot :: 1000 50 -1 ext4 \
     $primary{ } $bootable{ } method{ format } \
     format{ } use_filesystem{ } filesystem{ ext4 } \
     mountpoint{ / } \
    .
d-i partman-auto/choose_recipe select myroot

Line 1 disables the partman warning about a missing swap partition. Lines 2-6 create a single partition with a minimum size of 1000 MB. The -1 indicates the maximum size (infinite), which makes partman grow the partition to the size of the disk.

  • 4
    I don't even work in that company anymore, but very good to know that. =) – lcguida May 29 '15 at 8:47

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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