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:

Code:

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:

Code:

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:

Code:

      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:

Code:

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


OR btw next try doesn't work too:

Code:

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

Sign In or Register to comment.