PXE boot debian-installer preseed.cfg - how to get to present only certain questions (eg. hostname)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












2















I'm currently playing around with debian-installer at home (using Devuan Linux) over PXE boot and would like to have the installer ask for a hostname and domain with pre-set default value for the domain only and unsure if this is possible? The intention is that if I can learn how preseeding works I hope to bring this knowledge to my workplace in the hope we can make Ubuntu easier for our support teams to deploy, as it is very much manual at present.



To my understanding, in order for netboot to occur (and I'm hoping Devuan netboot works in much the same way as Debian as much of the documentation I've read has actually been Debian) netcfg must complete before it obtains its preseed file from TFTP which means in order to force the installer re-run the netcfg portion of setup I have to perform...



d-i preseed/early_command string kill-all-dhcp; netcfg


...before specifying...



d-i netcfg/hostname seen false
d-i netcfg/domain string network-name.int
d-i netcfg/domain seen false


...in order to get debian-installer to ask the question, but also provide a default value.



This page suggests this is true: https://www.debian.org/releases/stable/amd64/apbs05.html.en



...specifically: B.5.2. Using preseeding to change default values




It is possible to use preseeding to change the default answer for a
question, but still have the question asked. To do this the seen flag
must be reset to “false” after setting the value for a question.




This Reddit article suggests someone else also tried this to no avail with 'seen' set to both false and true:
https://www.reddit.com/r/debian/comments/7ak9h0/debian_preseed_installation_no_dialog_for/



I also read elsewhere that debconf priority has a role to play here also. The netboot vesamenu.c32 included with the Devuan netboot files specifies 'priority=critical' on the kernel command-line, but I understand the hostname and domain dialog boxes are high priority instead, and as a result do not appear regardless unless debconf priority is set to high. Doing so, causes the installer to ask for hostname as desired, but sadly after providing one also presents a menu asking what the next step should be. I played about with setting priority to high on the kernel command-line, then having the preseed run the above kill-all-dhcp;netcfg line to reinit networking and force it to ask for a hostname, and THEN changing priority level again to critical using:



debconf debconf/priority critical 


... (as shown in the above reddit post at the top of the preseed file given) but sadly this resulted in the installer not presenting the hostname question or the domain question, and running through fully-automated install with no questions being asked.



One blog article I read (unfortunately can't find this in my list of open tabs) suggested that order of the commands in the preseed file doesn't matter, leading me to believe I can't change priority after answering the hostname question



At the moment, priority on the kernel command-line is set to critical, in preseed.cfg I specify the following relevant section:



## Locale/Keymap configuration
d-i debian-installer/locale string en_GB
d-i keyboard-configuration/xkb-keymap select gb

## Network configuration (none, just use DHCP)
d-i netcfg/choose_interface select auto

## Hostname configuration
d-i preseed/early_command string kill-all-dhcp; netcfg

debconf debconf/priority high

d-i netcfg/hostname string CHANGETHIS
d-i netcfg/hostname seen false
d-i netcfg/domain string network-name.int
d-i netcfg/domain seen false

debconf debconf/priority string critical


I know I could resolve this by having debian-installer run a custom script at the end to change the hostname in /etc/hostname and update /etc/hosts prior to reboot, but I wanted to have the installation source untouched so any future upgrades require as little steps as possible to get working (hopefully get away with just modifying the preseed, instead of having to customise and update scripts to work with the latest OS version), plus another article I had read suggested I can only specify d-i preseed/late_command and/or d-i preseed/early_command once so I'd rather save that for a future situation where preseed really isn't able to handle something we need.










share|improve this question
























  • When you work with preseed , you must set DEBCONF_DEBUG=5 on the kernel command line . and in /var/log/syslog you will see which variable debian-installer prompt you . This can help you .

    – EchoMike444
    Jan 4 at 17:16
















2















I'm currently playing around with debian-installer at home (using Devuan Linux) over PXE boot and would like to have the installer ask for a hostname and domain with pre-set default value for the domain only and unsure if this is possible? The intention is that if I can learn how preseeding works I hope to bring this knowledge to my workplace in the hope we can make Ubuntu easier for our support teams to deploy, as it is very much manual at present.



To my understanding, in order for netboot to occur (and I'm hoping Devuan netboot works in much the same way as Debian as much of the documentation I've read has actually been Debian) netcfg must complete before it obtains its preseed file from TFTP which means in order to force the installer re-run the netcfg portion of setup I have to perform...



d-i preseed/early_command string kill-all-dhcp; netcfg


...before specifying...



d-i netcfg/hostname seen false
d-i netcfg/domain string network-name.int
d-i netcfg/domain seen false


...in order to get debian-installer to ask the question, but also provide a default value.



This page suggests this is true: https://www.debian.org/releases/stable/amd64/apbs05.html.en



...specifically: B.5.2. Using preseeding to change default values




It is possible to use preseeding to change the default answer for a
question, but still have the question asked. To do this the seen flag
must be reset to “false” after setting the value for a question.




This Reddit article suggests someone else also tried this to no avail with 'seen' set to both false and true:
https://www.reddit.com/r/debian/comments/7ak9h0/debian_preseed_installation_no_dialog_for/



I also read elsewhere that debconf priority has a role to play here also. The netboot vesamenu.c32 included with the Devuan netboot files specifies 'priority=critical' on the kernel command-line, but I understand the hostname and domain dialog boxes are high priority instead, and as a result do not appear regardless unless debconf priority is set to high. Doing so, causes the installer to ask for hostname as desired, but sadly after providing one also presents a menu asking what the next step should be. I played about with setting priority to high on the kernel command-line, then having the preseed run the above kill-all-dhcp;netcfg line to reinit networking and force it to ask for a hostname, and THEN changing priority level again to critical using:



debconf debconf/priority critical 


... (as shown in the above reddit post at the top of the preseed file given) but sadly this resulted in the installer not presenting the hostname question or the domain question, and running through fully-automated install with no questions being asked.



One blog article I read (unfortunately can't find this in my list of open tabs) suggested that order of the commands in the preseed file doesn't matter, leading me to believe I can't change priority after answering the hostname question



At the moment, priority on the kernel command-line is set to critical, in preseed.cfg I specify the following relevant section:



## Locale/Keymap configuration
d-i debian-installer/locale string en_GB
d-i keyboard-configuration/xkb-keymap select gb

## Network configuration (none, just use DHCP)
d-i netcfg/choose_interface select auto

## Hostname configuration
d-i preseed/early_command string kill-all-dhcp; netcfg

debconf debconf/priority high

d-i netcfg/hostname string CHANGETHIS
d-i netcfg/hostname seen false
d-i netcfg/domain string network-name.int
d-i netcfg/domain seen false

debconf debconf/priority string critical


I know I could resolve this by having debian-installer run a custom script at the end to change the hostname in /etc/hostname and update /etc/hosts prior to reboot, but I wanted to have the installation source untouched so any future upgrades require as little steps as possible to get working (hopefully get away with just modifying the preseed, instead of having to customise and update scripts to work with the latest OS version), plus another article I had read suggested I can only specify d-i preseed/late_command and/or d-i preseed/early_command once so I'd rather save that for a future situation where preseed really isn't able to handle something we need.










share|improve this question
























  • When you work with preseed , you must set DEBCONF_DEBUG=5 on the kernel command line . and in /var/log/syslog you will see which variable debian-installer prompt you . This can help you .

    – EchoMike444
    Jan 4 at 17:16














2












2








2








I'm currently playing around with debian-installer at home (using Devuan Linux) over PXE boot and would like to have the installer ask for a hostname and domain with pre-set default value for the domain only and unsure if this is possible? The intention is that if I can learn how preseeding works I hope to bring this knowledge to my workplace in the hope we can make Ubuntu easier for our support teams to deploy, as it is very much manual at present.



To my understanding, in order for netboot to occur (and I'm hoping Devuan netboot works in much the same way as Debian as much of the documentation I've read has actually been Debian) netcfg must complete before it obtains its preseed file from TFTP which means in order to force the installer re-run the netcfg portion of setup I have to perform...



d-i preseed/early_command string kill-all-dhcp; netcfg


...before specifying...



d-i netcfg/hostname seen false
d-i netcfg/domain string network-name.int
d-i netcfg/domain seen false


...in order to get debian-installer to ask the question, but also provide a default value.



This page suggests this is true: https://www.debian.org/releases/stable/amd64/apbs05.html.en



...specifically: B.5.2. Using preseeding to change default values




It is possible to use preseeding to change the default answer for a
question, but still have the question asked. To do this the seen flag
must be reset to “false” after setting the value for a question.




This Reddit article suggests someone else also tried this to no avail with 'seen' set to both false and true:
https://www.reddit.com/r/debian/comments/7ak9h0/debian_preseed_installation_no_dialog_for/



I also read elsewhere that debconf priority has a role to play here also. The netboot vesamenu.c32 included with the Devuan netboot files specifies 'priority=critical' on the kernel command-line, but I understand the hostname and domain dialog boxes are high priority instead, and as a result do not appear regardless unless debconf priority is set to high. Doing so, causes the installer to ask for hostname as desired, but sadly after providing one also presents a menu asking what the next step should be. I played about with setting priority to high on the kernel command-line, then having the preseed run the above kill-all-dhcp;netcfg line to reinit networking and force it to ask for a hostname, and THEN changing priority level again to critical using:



debconf debconf/priority critical 


... (as shown in the above reddit post at the top of the preseed file given) but sadly this resulted in the installer not presenting the hostname question or the domain question, and running through fully-automated install with no questions being asked.



One blog article I read (unfortunately can't find this in my list of open tabs) suggested that order of the commands in the preseed file doesn't matter, leading me to believe I can't change priority after answering the hostname question



At the moment, priority on the kernel command-line is set to critical, in preseed.cfg I specify the following relevant section:



## Locale/Keymap configuration
d-i debian-installer/locale string en_GB
d-i keyboard-configuration/xkb-keymap select gb

## Network configuration (none, just use DHCP)
d-i netcfg/choose_interface select auto

## Hostname configuration
d-i preseed/early_command string kill-all-dhcp; netcfg

debconf debconf/priority high

d-i netcfg/hostname string CHANGETHIS
d-i netcfg/hostname seen false
d-i netcfg/domain string network-name.int
d-i netcfg/domain seen false

debconf debconf/priority string critical


I know I could resolve this by having debian-installer run a custom script at the end to change the hostname in /etc/hostname and update /etc/hosts prior to reboot, but I wanted to have the installation source untouched so any future upgrades require as little steps as possible to get working (hopefully get away with just modifying the preseed, instead of having to customise and update scripts to work with the latest OS version), plus another article I had read suggested I can only specify d-i preseed/late_command and/or d-i preseed/early_command once so I'd rather save that for a future situation where preseed really isn't able to handle something we need.










share|improve this question
















I'm currently playing around with debian-installer at home (using Devuan Linux) over PXE boot and would like to have the installer ask for a hostname and domain with pre-set default value for the domain only and unsure if this is possible? The intention is that if I can learn how preseeding works I hope to bring this knowledge to my workplace in the hope we can make Ubuntu easier for our support teams to deploy, as it is very much manual at present.



To my understanding, in order for netboot to occur (and I'm hoping Devuan netboot works in much the same way as Debian as much of the documentation I've read has actually been Debian) netcfg must complete before it obtains its preseed file from TFTP which means in order to force the installer re-run the netcfg portion of setup I have to perform...



d-i preseed/early_command string kill-all-dhcp; netcfg


...before specifying...



d-i netcfg/hostname seen false
d-i netcfg/domain string network-name.int
d-i netcfg/domain seen false


...in order to get debian-installer to ask the question, but also provide a default value.



This page suggests this is true: https://www.debian.org/releases/stable/amd64/apbs05.html.en



...specifically: B.5.2. Using preseeding to change default values




It is possible to use preseeding to change the default answer for a
question, but still have the question asked. To do this the seen flag
must be reset to “false” after setting the value for a question.




This Reddit article suggests someone else also tried this to no avail with 'seen' set to both false and true:
https://www.reddit.com/r/debian/comments/7ak9h0/debian_preseed_installation_no_dialog_for/



I also read elsewhere that debconf priority has a role to play here also. The netboot vesamenu.c32 included with the Devuan netboot files specifies 'priority=critical' on the kernel command-line, but I understand the hostname and domain dialog boxes are high priority instead, and as a result do not appear regardless unless debconf priority is set to high. Doing so, causes the installer to ask for hostname as desired, but sadly after providing one also presents a menu asking what the next step should be. I played about with setting priority to high on the kernel command-line, then having the preseed run the above kill-all-dhcp;netcfg line to reinit networking and force it to ask for a hostname, and THEN changing priority level again to critical using:



debconf debconf/priority critical 


... (as shown in the above reddit post at the top of the preseed file given) but sadly this resulted in the installer not presenting the hostname question or the domain question, and running through fully-automated install with no questions being asked.



One blog article I read (unfortunately can't find this in my list of open tabs) suggested that order of the commands in the preseed file doesn't matter, leading me to believe I can't change priority after answering the hostname question



At the moment, priority on the kernel command-line is set to critical, in preseed.cfg I specify the following relevant section:



## Locale/Keymap configuration
d-i debian-installer/locale string en_GB
d-i keyboard-configuration/xkb-keymap select gb

## Network configuration (none, just use DHCP)
d-i netcfg/choose_interface select auto

## Hostname configuration
d-i preseed/early_command string kill-all-dhcp; netcfg

debconf debconf/priority high

d-i netcfg/hostname string CHANGETHIS
d-i netcfg/hostname seen false
d-i netcfg/domain string network-name.int
d-i netcfg/domain seen false

debconf debconf/priority string critical


I know I could resolve this by having debian-installer run a custom script at the end to change the hostname in /etc/hostname and update /etc/hosts prior to reboot, but I wanted to have the installation source untouched so any future upgrades require as little steps as possible to get working (hopefully get away with just modifying the preseed, instead of having to customise and update scripts to work with the latest OS version), plus another article I had read suggested I can only specify d-i preseed/late_command and/or d-i preseed/early_command once so I'd rather save that for a future situation where preseed really isn't able to handle something we need.







debian-installer pxe preseed devuan






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 3 at 14:36









Rui F Ribeiro

39.5k1479132




39.5k1479132










asked Jan 3 at 13:29









lswardlsward

112




112












  • When you work with preseed , you must set DEBCONF_DEBUG=5 on the kernel command line . and in /var/log/syslog you will see which variable debian-installer prompt you . This can help you .

    – EchoMike444
    Jan 4 at 17:16


















  • When you work with preseed , you must set DEBCONF_DEBUG=5 on the kernel command line . and in /var/log/syslog you will see which variable debian-installer prompt you . This can help you .

    – EchoMike444
    Jan 4 at 17:16

















When you work with preseed , you must set DEBCONF_DEBUG=5 on the kernel command line . and in /var/log/syslog you will see which variable debian-installer prompt you . This can help you .

– EchoMike444
Jan 4 at 17:16






When you work with preseed , you must set DEBCONF_DEBUG=5 on the kernel command line . and in /var/log/syslog you will see which variable debian-installer prompt you . This can help you .

– EchoMike444
Jan 4 at 17:16











1 Answer
1






active

oldest

votes


















0














Several hours of testing later, managed to find a working answer. Wanted to document should others come looking for an answer.



The answer is not to do any netcfg configuration in the preseed file at all, instead doing it on the kernel command line, with priority set to high and not critical.



I used the following menu.c32 / vesamenu.c32 configuration:



label customauto
menu label ^Automated install - Custom Auto
kernel debian-installer/amd64/linux
append auto=true priority=high netcfg/get_hostname?= netcfg/get_domain?=internal.domain preseed/url=tftp://<ip address to tftp server>/preseed.cfg vga=788 initrd=debian-installer/amd64/initrd.gz --- quiet


Notes from testing: Using the following on the kernel command line results in the given behaviours:



netcfg/get_hostname=hostname will set the hostname of the system to what is specified ('hosname' in this case) and no question is asked, even with priority set to 'high'.



netcfg/get_hostname?=hostname (note the ? and its position) will set a default value ('hostname' in this case), but also ask the question with your specified default value.



netcfg/get_hostname?= will pass no default value at all, and ask the question. I didn't think this was going to be valid initially, but it seems to work in my testing!



The same is for the netcfg/get_domain line, and I presume any other question, but I haven't tested other questions as this was my desired configuration.



In the preseed file, I removed all the d-i lines for netcfg, and right at the very top before anything else is specified, I set priority to critical:



d-i debconf/priority string critical


Once installation is completed, I confirmed that hostname is set correctly, /etc/hosts was also set-up correctly, and that all other settings in my preseed file were applied correctly leading me to believe this configuration is good.



This isn't entirely the answer I wanted, I wanted it all done in the preseed file as now I have to ensure that if I want to change behaviour later as needs change, I have to check two places, but I think some compromise needs to be made.






share|improve this answer






















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492246%2fpxe-boot-debian-installer-preseed-cfg-how-to-get-to-present-only-certain-quest%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Several hours of testing later, managed to find a working answer. Wanted to document should others come looking for an answer.



    The answer is not to do any netcfg configuration in the preseed file at all, instead doing it on the kernel command line, with priority set to high and not critical.



    I used the following menu.c32 / vesamenu.c32 configuration:



    label customauto
    menu label ^Automated install - Custom Auto
    kernel debian-installer/amd64/linux
    append auto=true priority=high netcfg/get_hostname?= netcfg/get_domain?=internal.domain preseed/url=tftp://<ip address to tftp server>/preseed.cfg vga=788 initrd=debian-installer/amd64/initrd.gz --- quiet


    Notes from testing: Using the following on the kernel command line results in the given behaviours:



    netcfg/get_hostname=hostname will set the hostname of the system to what is specified ('hosname' in this case) and no question is asked, even with priority set to 'high'.



    netcfg/get_hostname?=hostname (note the ? and its position) will set a default value ('hostname' in this case), but also ask the question with your specified default value.



    netcfg/get_hostname?= will pass no default value at all, and ask the question. I didn't think this was going to be valid initially, but it seems to work in my testing!



    The same is for the netcfg/get_domain line, and I presume any other question, but I haven't tested other questions as this was my desired configuration.



    In the preseed file, I removed all the d-i lines for netcfg, and right at the very top before anything else is specified, I set priority to critical:



    d-i debconf/priority string critical


    Once installation is completed, I confirmed that hostname is set correctly, /etc/hosts was also set-up correctly, and that all other settings in my preseed file were applied correctly leading me to believe this configuration is good.



    This isn't entirely the answer I wanted, I wanted it all done in the preseed file as now I have to ensure that if I want to change behaviour later as needs change, I have to check two places, but I think some compromise needs to be made.






    share|improve this answer



























      0














      Several hours of testing later, managed to find a working answer. Wanted to document should others come looking for an answer.



      The answer is not to do any netcfg configuration in the preseed file at all, instead doing it on the kernel command line, with priority set to high and not critical.



      I used the following menu.c32 / vesamenu.c32 configuration:



      label customauto
      menu label ^Automated install - Custom Auto
      kernel debian-installer/amd64/linux
      append auto=true priority=high netcfg/get_hostname?= netcfg/get_domain?=internal.domain preseed/url=tftp://<ip address to tftp server>/preseed.cfg vga=788 initrd=debian-installer/amd64/initrd.gz --- quiet


      Notes from testing: Using the following on the kernel command line results in the given behaviours:



      netcfg/get_hostname=hostname will set the hostname of the system to what is specified ('hosname' in this case) and no question is asked, even with priority set to 'high'.



      netcfg/get_hostname?=hostname (note the ? and its position) will set a default value ('hostname' in this case), but also ask the question with your specified default value.



      netcfg/get_hostname?= will pass no default value at all, and ask the question. I didn't think this was going to be valid initially, but it seems to work in my testing!



      The same is for the netcfg/get_domain line, and I presume any other question, but I haven't tested other questions as this was my desired configuration.



      In the preseed file, I removed all the d-i lines for netcfg, and right at the very top before anything else is specified, I set priority to critical:



      d-i debconf/priority string critical


      Once installation is completed, I confirmed that hostname is set correctly, /etc/hosts was also set-up correctly, and that all other settings in my preseed file were applied correctly leading me to believe this configuration is good.



      This isn't entirely the answer I wanted, I wanted it all done in the preseed file as now I have to ensure that if I want to change behaviour later as needs change, I have to check two places, but I think some compromise needs to be made.






      share|improve this answer

























        0












        0








        0







        Several hours of testing later, managed to find a working answer. Wanted to document should others come looking for an answer.



        The answer is not to do any netcfg configuration in the preseed file at all, instead doing it on the kernel command line, with priority set to high and not critical.



        I used the following menu.c32 / vesamenu.c32 configuration:



        label customauto
        menu label ^Automated install - Custom Auto
        kernel debian-installer/amd64/linux
        append auto=true priority=high netcfg/get_hostname?= netcfg/get_domain?=internal.domain preseed/url=tftp://<ip address to tftp server>/preseed.cfg vga=788 initrd=debian-installer/amd64/initrd.gz --- quiet


        Notes from testing: Using the following on the kernel command line results in the given behaviours:



        netcfg/get_hostname=hostname will set the hostname of the system to what is specified ('hosname' in this case) and no question is asked, even with priority set to 'high'.



        netcfg/get_hostname?=hostname (note the ? and its position) will set a default value ('hostname' in this case), but also ask the question with your specified default value.



        netcfg/get_hostname?= will pass no default value at all, and ask the question. I didn't think this was going to be valid initially, but it seems to work in my testing!



        The same is for the netcfg/get_domain line, and I presume any other question, but I haven't tested other questions as this was my desired configuration.



        In the preseed file, I removed all the d-i lines for netcfg, and right at the very top before anything else is specified, I set priority to critical:



        d-i debconf/priority string critical


        Once installation is completed, I confirmed that hostname is set correctly, /etc/hosts was also set-up correctly, and that all other settings in my preseed file were applied correctly leading me to believe this configuration is good.



        This isn't entirely the answer I wanted, I wanted it all done in the preseed file as now I have to ensure that if I want to change behaviour later as needs change, I have to check two places, but I think some compromise needs to be made.






        share|improve this answer













        Several hours of testing later, managed to find a working answer. Wanted to document should others come looking for an answer.



        The answer is not to do any netcfg configuration in the preseed file at all, instead doing it on the kernel command line, with priority set to high and not critical.



        I used the following menu.c32 / vesamenu.c32 configuration:



        label customauto
        menu label ^Automated install - Custom Auto
        kernel debian-installer/amd64/linux
        append auto=true priority=high netcfg/get_hostname?= netcfg/get_domain?=internal.domain preseed/url=tftp://<ip address to tftp server>/preseed.cfg vga=788 initrd=debian-installer/amd64/initrd.gz --- quiet


        Notes from testing: Using the following on the kernel command line results in the given behaviours:



        netcfg/get_hostname=hostname will set the hostname of the system to what is specified ('hosname' in this case) and no question is asked, even with priority set to 'high'.



        netcfg/get_hostname?=hostname (note the ? and its position) will set a default value ('hostname' in this case), but also ask the question with your specified default value.



        netcfg/get_hostname?= will pass no default value at all, and ask the question. I didn't think this was going to be valid initially, but it seems to work in my testing!



        The same is for the netcfg/get_domain line, and I presume any other question, but I haven't tested other questions as this was my desired configuration.



        In the preseed file, I removed all the d-i lines for netcfg, and right at the very top before anything else is specified, I set priority to critical:



        d-i debconf/priority string critical


        Once installation is completed, I confirmed that hostname is set correctly, /etc/hosts was also set-up correctly, and that all other settings in my preseed file were applied correctly leading me to believe this configuration is good.



        This isn't entirely the answer I wanted, I wanted it all done in the preseed file as now I have to ensure that if I want to change behaviour later as needs change, I have to check two places, but I think some compromise needs to be made.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 4 at 16:49









        lswardlsward

        112




        112



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492246%2fpxe-boot-debian-installer-preseed-cfg-how-to-get-to-present-only-certain-quest%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown






            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay