Score:0

Partionning with preseed

nz flag

I used to find my solutions on old post here but today I have to write for help as I don't find any usefull answer anywhere. I'm sure you'll rock and help me with this problem I have for quite a while now. So thanks in advance for all your help. I also apologies in advance for english mistakes... (FR)

I try to install ubuntu as following (roughly):

/boot
/efi
LVM crypt
|--> /           ->10Go
|--> /tmp        ->2Go 
|--> /var/log    ->10Go
/opt/space/1      ->25% 
/opt/space/2      ->25% 
/opt/space/3      ->25% 
/opt/space/4      ->25% 

So basically / will be crypted in a LVM, but I want the 4 mains spaces taken around 25% available disk not crypted.

Is it somthing possible ?

When I run my installation, the installer complain I don't have the free space, but I have....

Following pressed and partman file

d-i partman-auto/method crypto
db_set partman-auto-lvm/new_vg_name crypt
d-i partman-crypto/passphrase password WILLBEOVERRIDEN
d-i partman-crypto/passphrase-again password WILLBEOVERRIDEN


d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto-lvm/new_vg_name string crypt
d-i partman-auto/choose_recipe select mytest

d-i partman-auto/expert_recipe_file string /cdrom/mytest/installer/mytest.partman
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-basicfilesystems/no_mount_point boolean false

the partman file:

mytest ::
    538 538 538 free
            $iflabel{ gpt }
            method{ efi }
            format{ }
    .
    512 512 512 ext4
            $primary{ } $bootable{ }
            method{ format } format{ }
            use_filesystem{ } filesystem{ ext4 }
            mountpoint{ /boot }
            options/nosuid{ nosuid }
            options/nodev{ nodev }
            options/noexec{ noexec }
            options/noauto{ noauto }
    .
    10240 10240 10240 ext4
            $lvmok{ } in_vg { crypt } lv_name{ root }
            method{ format } format{ }
            use_filesystem{ } filesystem{ ext4 }
            mountpoint{ / }
    .
    2048 2048 2048 ext4
            $lvmok{ } in_vg { crypt } lv_name{ var_log }
            method{ format } format{ }
            use_filesystem{ } filesystem{ ext4 }
            mountpoint{ /var/log }
            options/nosuid{ nosuid }
            options/nodev{ nodev }
            options/noexec{ noexec }
    .
    1024 1024 1024 ext4
            $lvmok{ } in_vg { crypt } lv_name{ tmp }
            method{ format } format{ }
            use_filesystem{ } filesystem{ ext4 }
            mountpoint{ /tmp }
            options/nosuid{ nosuid }
            options/nodev{ nodev }
            options/noexec{ noexec }
    .
    2048 2048 2048 linux-swap;
            $lvmok{ } in_vg { crypt } lv_name{ swap }
            method{ swap } format{ }
    .
    5000 1000000000 1000000000 ext4
        $defaultignore{ }
        $primary{ }
        method{ format } format{ }
            use_filesystem{ } filesystem{ ext4 }
            mountpoint{ /opt/space/1 }
            label{ 1 }
    .
    5000 1000000000 1000000000 ext4
        $defaultignore{ }
            $primary{ }
        method{ format } format{ }
            use_filesystem{ } filesystem{ ext4 }
            mountpoint{ /opt/space/2 }
            label{ 2 }
    .
    5000 1000000000 1000000000 ext4
        $defaultignore{ }
            $primary{ }
        method{ format } format{ }
            use_filesystem{ } filesystem{ ext4 }
            mountpoint{ /opt/space/3 }
            label{ 3 }
    .
    5000 1000000000 1000000000 ext4
        $defaultignore{ }
            $primary{ }
        method{ format } format{ }
            use_filesystem{ } filesystem{ ext4 }
            mountpoint{ /opt/space/4 }
            label{ 4 }
    .
cn flag
Is this an old Ubuntu version as as of 20.04 we do not use preseed anymore (https://discourse.ubuntu.com/t/server-installer-plans-for-20-04-lts/13631 We use "autoinstall", a yaml based method. One of the main features "advanced storage support with RAID and LVM, including encrypted LVM" sooooooo that seems to line up with what you want...
Thomas B avatar
nz flag
It's Ubuntu 20.04 . It's not this old, it'still supported.
cn flag
Here is a template for encrypted LVM but it will use a whole disk encryption if you still want to use preseed: https://wiki.ubuntu.com/Enterprise/WorkstationAutoinstallPreseed If you want a YAML that one is auto created during an attended install in /var/log/installer
Thomas B avatar
nz flag
Thanks, but I don't want the whole disk encrypted. /opt/space/[1..4] must not be crypted
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.