How do I preseed multiple partitions on one disk; /tmp /data /usr swap?
I've solved it myself now. The problem was that partman creates the partitions in the order they are defined, and i was defining a partition which was supposed to take all available disk space not at the end, therefore the following partitions (including the one for the rootfs) could not be created.
This is the recipe which now worked for me:
d-i partman-auto/method string regular
d-i partman-auto/expert_recipe string \
thisDoesNotMatter :: \
1000 50 1000 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
mountpoint{ /boot } \
. \
64 512 10000 linux-swap \
method{ swap } format{ } \
. \
1 600 10000 ext4 \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /tmp } \
. \
1 700 350000 ext4 \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /data } \
. \
500 1000 1000000000 ext4 \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
.
Related videos on Youtube
Moritz
Updated on September 18, 2022Comments
-
Moritz over 1 year
trying to get preseeding on 12.04 64bit with what should be a basic setup to work:
/dev/sda - the only drive beeing used
/ - rootfs - 100GB
- /boot - 1GB
- /tmp - 10GB
- /data - should take all available space
- swap - 10GB
-
d-i partman-auto/expert_recipe string \ boot-root :: \ 1000 50 1000 ext4 \ $primary{ } $bootable{ } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ mountpoint{ /boot } \ . \ 500 1000 10000 ext4 \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ mountpoint{ /tmp } \ . \ 500 5000 100000000 ext4 \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ mountpoint{ /data } \ . \ 64 2000 10000 linux-swap \ method{ swap } format{ } \ . \ 500 3000 100000 ext4 \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ mountpoint{ / } \ .
If i only use the code for /boot,swap and / it works. Also i was wondering weather i have to specify some other recipe name than "boot-root", but trying "thisNameIsNotDefinedInPartman" the result was the same.
The Error message displayed by the ubuntu installer is always "no root file system is defined"
-
jackweirdy over 11 yearsAre you trying to preseed Ubuntu server or desktop?
-
Moritz over 11 yearsThe above was for ubuntu 12.04 64bit server
-
Moritz over 11 yearsI've solved it myself now. The problem was that partman creates the partitions in the order they are defined, and i was defining a partition which was supposed to take all available disk space not at the end, therefore the following partitions (including the one for the rootfs) could not be created.