Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #187578

Re: partman primary vs secondary partitions

From Andre Rodier <andre@rodier.me>
Newsgroups linux.debian.user
Subject Re: partman primary vs secondary partitions
Date 2017-10-05 15:20 +0200
Message-ID <uxeed-3j3-5@gated-at.bofh.it> (permalink)
References <uwVbz-i3-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 04/10/2017 17:41, Andre Rodier wrote:
> Hello,
> 
> I am testing the Debian Stretch preseed, and I have a question about
> the partition scheme.
> 
> I am using the following block in my partition recipe, and it works so 
> far:
> 
> d-i partman-auto-raid/recipe string		\
> 	1 2 0 ext3 /boot			\
> 	/dev/sda1#/dev/sdb1			\
> 	.					\
> 	1 2 0 lvm -				\
> 	/dev/sda5#/dev/sdb5 			\
> 	.					\
> 
> My question is, "how can I create two primary partitions instead of an
> extended partition ?" and of course, is this possible ?
> 
> I am also happy to use GPT partitioning scheme.
> 
> Thanks,
> André

OK, I found how to do it, and I thought it could be interesting to 
share:

--------------------------------------------------------------------------
## Partitioning using RAID
d-i partman-auto-raid/recipe string     \
         1 2 0 ext3 /boot                \
                 /dev/vdb1#/dev/vdc1     \
         .                               \
         1 2 0 lvm -                     \
                 /dev/vdb2#/dev/vdc2     \
         .
--------------------------------------------------------------------------

And:

--------------------------------------------------------------------------
# Note that in the example shown here the mountpoint for /boot
# (which is not encapsulated within LVM) is specified in the
# partman-auto-raid recipe, rather than in the corresponding
# raid partition definition below.
d-i partman-auto/expert_recipe string                        \
         multiraid ::                                         \
                 100 512 256 raid                             \
                         $lvmignore{ }                        \
                         $primary{ }                          \
                         method{ raid }                       \
                         $bootable{ }                         \
                         mountpoint{ /boot }                  \
                 .                                            \
                 900 5000 4000 raid                           \
                         $lvmignore{ }                        \
                         $primary{ }                          \
                         method{ raid }                       \
                 .                                            \
                 700 5000 4000 btrfs                          \
                         $defaultignore{ }                    \
                         $lvmok{ }                            \
                         method{ format }                     \
                         format{ }                            \
                         use_filesystem{ }                    \
                         filesystem{ btrfs }                  \
                         mountpoint{ / }                      \
                         lv_name{ system }                    \
                 .                                            \
                 64 512 200% linux-swap                       \
                         $defaultignore{ }                    \
                         $lvmok{ }                            \
                         method{ swap }                       \
                         format{ }                            \
                         lv_name{ swap }                      \
                 .                                            \
...
--------------------------------------------------------------------------

The secret is to add $primary() twice.

André Rodier.

Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

partman primary vs secondary partitions Andre Rodier <andre@rodier.me> - 2017-10-04 19:00 +0200
  Re: partman primary vs secondary partitions Andre Rodier <andre@rodier.me> - 2017-10-05 15:20 +0200

csiph-web