Debian installer or how to preseed

Good afternoon!

Could you please clarify me how to use correct Debian's preseed file?

I have a kernel version 4.15.0-20-generic (Ubuntu 18.04) and default initrd (both downloaded from official repo)
Also I have a little kickstart file and main preseed cfg file
Installation start by iPXE
I no have problems this installation, all works good and installation during fine but...

I noticed one an interesting and working rule:

d-i partman/early_command \
        string debconf-set partman-auto/disk "$(list-devices disk | tr -s '\n' ' ')"

it works fine, but following this logic I tried to make similar next:

d-i preseed/early_command \
        string wget -q -O /tmp/include.template myurl \
        touch /tmp/expert_recipe; \
        cat /tmp/include.template | sed -n '2,17p' > /tmp/expert_recipe

after these steps /tmp/include.template will have next path:

      justraid ::                                         \
              1000 5000 4000 raid                          \
                      $primary{ } method{ raid }           \
              .                                            \
              1000 4000 4000 raid                          \
                      method{ raid }                       \
              .                                            \
              1000 5000 4000 raid                          \
                      method{ raid }                       \
              .                                            \
              1000 5000 4000 raid                          \
                      method{ raid }                       \
              .                                            \
              1000 5000 10000000000 raid                   \
                      method{ raid }                       \
              .

following this logic I tried next step:

d-i partman-auto/expert_recipe_file string /tmp/include.template

OR btw next try doesn't work too:

d-i partman/early_command \
        string debconf-set partman-auto/expert_recipe "$(cat /tmp/include.template | sed -n '2,17p')"

I would to make flexible installation via preseed file, for example single installation, single installation with custom partitioning, raid installation mirror, stripe, 5, 6, 10...
Now I'm needed to make many preseed files and wget those, but I want to have just one main preseed file with many templates

Also I have more one question
Next raid's partitioning in preseed file like as:

d-i partman-auto-raid/recipe string \
    1 2 0 ext4 /                                        \
          /dev/sda1#/dev/sdb1                           \
    .                                                   \
    1 2 0 ext4 /home                                    \
          /dev/sda5#/dev/sdb5                           \
    .                                                   \
    1 2 0 ext4 /var                                     \
          /dev/sda6#/dev/sdb6                           \
    .                                                   \
    1 2 0 ext4 /usr                                     \
          /dev/sda7#/dev/sdb7                           \
    .                                                   \
    1 2 0 ext4 /local                                   \
          /dev/sda8#/dev/sdb8                           \
    .

Could somebody clarify me, why I can't specify sda1#sdb1, sda2#sdb2... etc? If I'll do it then installation will be crashed with error. But if I make as above, then installation will be OK

--- Post updated at 02:40 PM ---

because sda1 is 1 primary partition
primary partitions can be only 4 (if it isn't GPT)

sda, sdb - it's disks
sda1,sdb1 - it's first primary partitions

extended partitions start with number 5
and we have next pic:

sda
|- sda1
|-- md0
|
|- sda5
|-- md1
|- sda6
|- md2

and with sdb same...

What error do you get?

I solved it. This was my mistake, I made kickstart file which contains preseed's rules with \ symbol and new rows were starting with no "preseed" keyword.
For example:

preseed partman/auto-raid... \
  multiraid :: \
  1 2 0 ...
but correct are:
preseed partman \ auto-raid \
preseed multiraid :: \

etc

Another way write it in one row

And now I still have understanding why installation was done as no RAID 1 but guided with 1th option, single partition on / with full free space

preseed partman-auto/expert_recipe string multiraid :: 1000 5000 4000 raid $primary{ } method{ raid } . 1000 4000 4000 raid method{ raid } . 1000 5000 4000 raid method{ raid } . 1000 5000 4000 raid method{ raid } . 1000 5000 10000000000 raid method{ raid } .
preseed partman-auto-raid/recipe string 1 2 0 ext4 / /dev/sda1#/dev/sdb1 . 1 2 0 ext4 /home /dev/sda5#/dev/sdb5 . 1 2 0 ext4 /var /dev/sda6#/dev/sdb6 . 1 2 0 ext4 /usr /dev/sda7#/dev/sdb7 . 1 2 0 ext4 /local /dev/sda8#/dev/sdb8 .

These rows ignored and installation is continue by default /dev/sda1 / ext4 100%
Also in %pre section are unavailable drives information, for example

list-devices disk

or

ls /dev/* | egrep -io '[hs]d[a-z]' | sort | uniq

I'm needed it that I would make flexible templates (for ssd raid or hdd (with GPT) or ssd + hdd, etc)