• Chain Loading Preseed Files

    From Charles Curley@21:1/5 to All on Tue Aug 20 21:10:02 2024
    I have a preseed file set up to do a lot of the installation process
    for me. However, I still have to customize it for each machine, e.g.
    host name. I then do the disk partition layout manually during the installation.

    What I would like to do is have a file with the standard parts of the
    setup, and then separate files for each machine.

    I can do the include, but it doesn't seem to work correctly. The Debian GNU/Linux Installation Guide says "It is possible to include other preconfiguration files from a preconfiguration file. Any settings in
    those files will override pre-existing settings from files loaded
    earlier. This makes it possible to put, for example, general networking settings for your location in one file and more specific settings for
    certain configurations in other files." B.5.3

    If a.cfg calls b.cfg, it appears that b.cfg's settings override
    a.cfg's regardless of the order. If both files set the host name, I get
    b.cfg's host name regardless of whether a.cfg sets the host name before
    or after calling b.cfg.

    I am working with the current (August 18th) weekly build.


    --
    Does anybody read signatures any more?

    https://charlescurley.com
    https://charlescurley.com/blog/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From john doe@21:1/5 to Charles Curley on Wed Aug 21 11:30:01 2024
    On 8/20/24 21:04, Charles Curley wrote:
    I have a preseed file set up to do a lot of the installation process
    for me. However, I still have to customize it for each machine, e.g.
    host name. I then do the disk partition layout manually during the installation.

    What I would like to do is have a file with the standard parts of the
    setup, and then separate files for each machine.

    I can do the include, but it doesn't seem to work correctly. The Debian GNU/Linux Installation Guide says "It is possible to include other preconfiguration files from a preconfiguration file. Any settings in
    those files will override pre-existing settings from files loaded
    earlier. This makes it possible to put, for example, general networking settings for your location in one file and more specific settings for
    certain configurations in other files." B.5.3

    If a.cfg calls b.cfg, it appears that b.cfg's settings override
    a.cfg's regardless of the order. If both files set the host name, I get b.cfg's host name regardless of whether a.cfg sets the host name before
    or after calling b.cfg.



    The below assumes that this is not a regression or a bug for the
    debian-boot mailing list.

    When I was playing with this, the only way I could get it to work was by specifying options that are common in `preseed.cfg` and add more
    specific options in included CFG files.

    For the sake of clarity `preseed.cfg` could have the name of
    `common.cfg` and `node01.cfg`, `node02.cfg` would have specific configs
    for node01 and node02 respectively.
    This makes it impossible to specify options twice with different values.

    To me the documentation is somewhat misleading and does not match what
    you already found out.

    --
    John Doe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Charles Curley@21:1/5 to john doe on Wed Aug 21 18:10:02 2024
    On Wed, 21 Aug 2024 11:27:08 +0200
    john doe <[email protected]> wrote:

    The below assumes that this is not a regression or a bug for the
    debian-boot mailing list.

    Agreed.


    When I was playing with this, the only way I could get it to work was
    by specifying options that are common in `preseed.cfg` and add more
    specific options in included CFG files.

    For the sake of clarity `preseed.cfg` could have the name of
    `common.cfg` and `node01.cfg`, `node02.cfg` would have specific
    configs for node01 and node02 respectively.
    This makes it impossible to specify options twice with different
    values.

    The only way I finally got anything to work at all was to have a computer-specific file, in your terms node01.cfg, and a general file, common.cfg, and have common.cfg call node01.cfg. So at d-i boot time,
    the command line would include "file=/media/common.cfg".

    The problem is that I must then edit common.cfg for each machine I want
    to install, something I was hoping to avoid. I would prefer to have
    node01.cfg et al. call common.cfg.

    The other problem I found is that even so, overriding does not work with
    all options. I can specify netcfg/hostname twice (once in each file),
    but not partman-auto/expert_recipe. Those are the only two I've tested.




    To me the documentation is somewhat misleading and does not match what
    you already found out.

    Yep. I haven't even looked to see if there's a bug report already. I
    suppose I should do that next.

    --
    Does anybody read signatures any more?

    https://charlescurley.com
    https://charlescurley.com/blog/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)