I'm trying to get an automatic install of 11.2 working using a preseed file: (https://gist.github.com/jby/7c3010e7157286166acee617ef47da30)
hosted on a server running nginx.
According to the nginx logs the file is read.
What I'd like to accomplish is to have the install be as fully automated as possible, but I *want* the question about what hostname to give the client.
I was told that setting these settings would make it ask me for the hostname: d-i netcfg/get_hostname seen false
d-i netcfg/get_domain seen false
and/or maybe this:
d-i netcfg/hostname seen false
However, no matter how I do it it always sets the hostname to the default 'debian'.
How do I get it to ask me for the hostname? Are the order of the commands in the preseed file significant?
Another thing:
When I use the above linked preseed file on a (VMWare-) VM it correctly picks up the partitioning set in the preseed file,
'd-i partman-auto/method string crypto' in my case.
However, when using it on physical hardware (Dell laptops) it seems to ignore that and give me the dialog asking how to do it.
Can someone please help me figure this out?
Do you mean at the end of the file, or is it enough to have it at the end of the section?
I now have this in my preseed file, at the place where it’s in the example file, since I’ve based my config on that:
# Any hostname and domain names assigned from dhcp take precedence over
# values set here. However, setting the values still prevents the questions
# from being shown, even if values come from dhcp.
#d-i netcfg/get_hostname seen false
#d-i netcfg/get_domain seen false
#d-i netcfg/get_hostname string unassigned-hostname
#d-i netcfg/get_domain string unassigned-domain
d-i netcfg/get_hostname unassigned-hostname^^^
d-i netcfg/get_domain unassigned-domain^^^^
d-i netcfg/get_hostname seen true^^^^^^^^^^^
d-i netcfg/get_domain seen true
On 20 Jan 2022, at 17:00, Daniel Leidert <dleidert@debian.org> wrote:
Am Donnerstag, dem 20.01.2022 um 16:41 +0100 schrieb Jonas Bygdén:
[..]
Do you mean at the end of the file, or is it enough to have it at the end of >> the section?
I usually put the "seen false" statements at the end of the file. But it shouldn't be any problem to put them at the end of the section.
I now have this in my preseed file, at the place where it’s in the example >> file, since I’ve based my config on that:
# Any hostname and domain names assigned from dhcp take precedence over
# values set here. However, setting the values still prevents the questions >> # from being shown, even if values come from dhcp.
#d-i netcfg/get_hostname seen false
#d-i netcfg/get_domain seen false
#d-i netcfg/get_hostname string unassigned-hostname
#d-i netcfg/get_domain string unassigned-domain
It wouldn't work in that order. The pre-seeding will set the dialog to "seen true". So any "seen false" statement must come *after* pre-seeding a value.
d-i netcfg/get_hostname unassigned-hostname^^^
There is a "string" missing.
d-i netcfg/get_domain unassigned-domain^^^^
Ditto.
d-i netcfg/get_hostname seen true^^^^^^^^^^^
d-i netcfg/get_domain seen true
You have set everything to "seen true", not "false". Maybe you want to check that again?
Regards, Daniel
--
Regards,
Daniel Leidert <dleidert@debian.org> | https://www.wgdd.de/
GPG-Key RSA4096 / BEED4DED5544A4C03E283DC74BCD0567C296D05D
GPG-Key ED25519 / BD3C132D8B3805D1808123AB7ACE00941E338C78
https://www.fiverr.com/dleidert
https://www.patreon.com/join/dleidert
Ok, now it looks like this:
# Any hostname and domain names assigned from dhcp take precedence over
# values set here. However, setting the values still prevents the questions
# from being shown, even if values come from dhcp.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/get_hostname seen false
d-i netcfg/get_domain seen false
# If you want to force a hostname, regardless of what either the DHCP
# server returns or what the reverse DNS entry for the IP is, uncomment
# and adjust the following line.
#d-i netcfg/hostname string somehost
#d-i netcfg/hostname seen false
# Disable that annoying WEP key dialog.
#d-i netcfg/wireless_wep string
# The wacky dhcp hostname that some ISPs use as a password of sorts.
d-i netcfg/dhcp_hostname string debian
d-i netcfg/get_hostname seen false
d-i netcfg/get_domain seen false
But still - it goes directly to the partitioning after choosing keyboard layout, without any hostname question.
On 20 Jan 2022, at 19:46, john doe <johndoe65534@mail.com> wrote:
On 1/20/2022 5:11 PM, Jonas Bygdén wrote:
Ok, now it looks like this:
# Any hostname and domain names assigned from dhcp take precedence over
# values set here. However, setting the values still prevents the questions >> # from being shown, even if values come from dhcp.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/get_hostname seen false
d-i netcfg/get_domain seen false
# If you want to force a hostname, regardless of what either the DHCP
# server returns or what the reverse DNS entry for the IP is, uncomment
# and adjust the following line.
#d-i netcfg/hostname string somehost
#d-i netcfg/hostname seen false
# Disable that annoying WEP key dialog.
#d-i netcfg/wireless_wep string
# The wacky dhcp hostname that some ISPs use as a password of sorts.
d-i netcfg/dhcp_hostname string debian
d-i netcfg/get_hostname seen false
d-i netcfg/get_domain seen false
But still - it goes directly to the partitioning after choosing keyboard layout, without any hostname question.
Maybey setting the 'priority' to 'high' instead of 'critical'.
--
John Doe
On 20 Jan 2022, at 20:56, Jonas Bygdén <jbygden@gmail.com> wrote:
After setting priority to ‘high’ instead of ‘critical’ I don’t even get the question about where to find the preseed file...
On 20 Jan 2022, at 19:46, john doe <johndoe65534@mail.com <mailto:johndoe65534@mail.com>> wrote:
On 1/20/2022 5:11 PM, Jonas Bygdén wrote:
Ok, now it looks like this:
# Any hostname and domain names assigned from dhcp take precedence over
# values set here. However, setting the values still prevents the questions >>> # from being shown, even if values come from dhcp.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/get_hostname seen false
d-i netcfg/get_domain seen false
# If you want to force a hostname, regardless of what either the DHCP
# server returns or what the reverse DNS entry for the IP is, uncomment
# and adjust the following line.
#d-i netcfg/hostname string somehost
#d-i netcfg/hostname seen false
# Disable that annoying WEP key dialog.
#d-i netcfg/wireless_wep string
# The wacky dhcp hostname that some ISPs use as a password of sorts.
d-i netcfg/dhcp_hostname string debian
d-i netcfg/get_hostname seen false
d-i netcfg/get_domain seen false
But still - it goes directly to the partitioning after choosing keyboard layout, without any hostname question.
Maybey setting the 'priority' to 'high' instead of 'critical'.
--
John Doe
</blockquote></div><br class=""></div></div></blockquote></div><br class=""></body></html>
I'm trying to get an automatic install of 11.2 working using a preseed
file:
(https://gist.github.com/jby/7c3010e7157286166acee617ef47da30)
hosted on a server running nginx.
According to the nginx logs the file is read.
What I'd like to accomplish is to have the install be as fully automated
as possible, but I *want* the question about what hostname to give the client.
I was told that setting these settings would make it ask me for the
hostname:
d-i netcfg/get_hostname seen false
d-i netcfg/get_domain seen false
and/or maybe this:
d-i netcfg/hostname seen false
However, no matter how I do it it always sets the hostname to the default 'debian'.
How do I get it to ask me for the hostname? Are the order of the commands
in the preseed file significant?
Where do I put the commands to get the hostname question in that case?
Update:
Found this <https://serverfault.com/questions/1077958/preseeding-debian-11-fully-unattended-get-rid-of-questions>
post, where the guy is annoyed about getting the question that I'm
*trying* to get.
Tried his settings in hope that it would give me the same behaviour as
he's seeing:
d-i netcfg/get_hostname unassigned-hostname
d-i netcfg/get_domain unassigned-domain
d-i netcfg/get_hostname seen true
d-i netcfg/get_domain seen true
But that didn't help me either...
/Update
Another thing:
When I use the above linked preseed file on a (VMWare-) VM it correctly
picks up the partitioning set in the preseed file,
'd-i partman-auto/method string crypto' in my case.
However, when using it on physical hardware (Dell laptops) it seems to
ignore that and give me the dialog asking how to do it.
Can someone please help me figure this out?
--
*Jonas Bygdén* <jbygden@gmail.com>
However (albeit strange after reading the docs) if I remove the priority boot-parameter completely I DO get the hostname/domainname question and THEN I get the question about where to find the preseed file. Looking promising so far.
On 20 Jan 2022, at 20:56, Jonas Bygdén <jbygden@gmail.com> wrote:
After setting priority to ‘high’ instead of ‘critical’ I don’t even get the question about where to find the preseed file...
On 20 Jan 2022, at 19:46, john doe <johndoe65534@mail.com <mailto:johndoe65534@mail.com>> wrote:
On 1/20/2022 5:11 PM, Jonas Bygdén wrote:
Ok, now it looks like this:
# Any hostname and domain names assigned from dhcp take precedence over >>> # values set here. However, setting the values still prevents the questions
# from being shown, even if values come from dhcp.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/get_hostname seen false
d-i netcfg/get_domain seen false
# If you want to force a hostname, regardless of what either the DHCP
# server returns or what the reverse DNS entry for the IP is, uncomment >>> # and adjust the following line.
#d-i netcfg/hostname string somehost
#d-i netcfg/hostname seen false
# Disable that annoying WEP key dialog.
#d-i netcfg/wireless_wep string
# The wacky dhcp hostname that some ISPs use as a password of sorts.
d-i netcfg/dhcp_hostname string debian
d-i netcfg/get_hostname seen false
d-i netcfg/get_domain seen false
But still - it goes directly to the partitioning after choosing keyboard layout, without any hostname question.
Maybey setting the 'priority' to 'high' instead of 'critical'.
--
John Doe
On 29 Jan 2022, at 20:14, Holger Wansing <hwansing@mailbox.org> wrote:
Hi,
Jonas Bygdén <jbygden@gmail.com <mailto:jbygden@gmail.com>> wrote (Thu, 20 Jan 2022 22:40:12 +0100):
However (albeit strange after reading the docs) if I remove the priority boot-parameter completely I DO get the hostname/domainname question and THEN I get the question about where to find the preseed file. Looking promising so far.
That's correct so far.
It works like it was designed:
with the priority parameter you can control, if you want to see only the most important questions or all (new-user installation vs. expert installation). That only makes sense for interactive installations.
When doing automated installations via preseeding, that's a complete different story.
In that case, the control of which question you see and which not is
lying in your preseed file: if you answer a question via your preseed file, the installer does not need to ask that anymore, because it's already answered.
Holger
On 20 Jan 2022, at 20:56, Jonas Bygdén <jbygden@gmail.com <mailto:jbygden@gmail.com>> wrote:
After setting priority to ‘high’ instead of ‘critical’ I don’t even get the question about where to find the preseed file...
On 20 Jan 2022, at 19:46, john doe <johndoe65534@mail.com <mailto:johndoe65534@mail.com> <mailto:johndoe65534@mail.com <mailto:johndoe65534@mail.com>>> wrote:
On 1/20/2022 5:11 PM, Jonas Bygdén wrote:
Ok, now it looks like this:
# Any hostname and domain names assigned from dhcp take precedence over >>>>> # values set here. However, setting the values still prevents the questions
# from being shown, even if values come from dhcp.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/get_hostname seen false
d-i netcfg/get_domain seen false
# If you want to force a hostname, regardless of what either the DHCP >>>>> # server returns or what the reverse DNS entry for the IP is, uncomment >>>>> # and adjust the following line.
#d-i netcfg/hostname string somehost
#d-i netcfg/hostname seen false
# Disable that annoying WEP key dialog.
#d-i netcfg/wireless_wep string
# The wacky dhcp hostname that some ISPs use as a password of sorts. >>>>> d-i netcfg/dhcp_hostname string debian
d-i netcfg/get_hostname seen false
d-i netcfg/get_domain seen false
But still - it goes directly to the partitioning after choosing keyboard layout, without any hostname question.
Maybey setting the 'priority' to 'high' instead of 'critical'.
--
John Doe
--
Holger Wansing <hwansing@mailbox.org <mailto:hwansing@mailbox.org>> PGP-Fingerprint: 496A C6E8 1442 4B34 8508 3529 59F1 87CA 156E B076
<div class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-
Yes, I understand that - having extensive experience with both Solaris Jumpstart and RHEL kickstart.
What I found perplexing was that regardless of setting in the preseed I still HAVE to unset the priority parameter to force the question about hostname.
Hi,
Jonas Bygdén <jbygden@gmail.com> wrote (Sat, 29 Jan 2022 20:24:41 +0100):
Yes, I understand that - having extensive experience with both Solaris Jumpstart and RHEL kickstart.
What I found perplexing was that regardless of setting in the preseed I still HAVE to unset the priority parameter to force the question about hostname.
Ok, I see:
when using the "Automated install" entry from the installer menu, the "priority=critical" parameter is automatically used.
Maybe we should change that.
Will ask other people involved about their opinion here...
On 3 Feb 2022, at 14:04, Philip Hands <phil@hands.com> wrote:
Holger Wansing <hwansing@mailbox.org <mailto:hwansing@mailbox.org>> writes:
Hi,
Jonas Bygdén <jbygden@gmail.com> wrote (Sat, 29 Jan 2022 20:24:41 +0100): >>> Yes, I understand that - having extensive experience with both Solaris Jumpstart and RHEL kickstart.
What I found perplexing was that regardless of setting in the preseed I still HAVE to unset the priority parameter to force the question about hostname.
Ok, I see:
when using the "Automated install" entry from the installer menu, the
"priority=critical" parameter is automatically used.
Maybe we should change that.
Will ask other people involved about their opinion here...
If the question isn't critical, then most people don't want it asked in
an automated install, because otherwise they'd be forced to preseed
things where the default is perfectly fine for them.
Automatic Install is just shorthand for adding:
auto=true priority=critical
to the kernel command line, so if that's not what you wanted, you could
use the standard install and only add the `auto=true`.
BTW I'me pretty sure it's possible to preseed `debconf/priority`
(although it might already be too late by the time the network preseed
lands to make it then ask the hostname question).
Having a quick glance at the code:
https://salsa.debian.org/installer-team/preseed/-/blob/master/auto-install.sh#L12 <https://salsa.debian.org/installer-team/preseed/-/blob/master/auto-install.sh#L12>
I don't really see how dropping the priority could stop that question
being asked ... well, unless there's also DHCP preseeding (to drop the priority, say), in which case it looks like it assumes you'll also be providing the url setting via DHCP as well, and therefore doesn't ask
for it.
Perhaps we need a preseed option to force the asking of the hostname question, but I have a feeling that there ought to be some combination
of preseeding, DHCP and DNS that should already ensure that it is asked.
Cheers, Phil.
--
|)| Philip Hands [+44 (0)20 8530 9560] HANDS.COM <http://hands.com/> Ltd. |-| http://www.hands.com/ <http://www.hands.com/> http://ftp.uk.debian.org/ <http://ftp.uk.debian.org/>
|(| Hugo-Klemm-Strasse 34, 21075 Hamburg, GERMANY
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 295 |
Nodes: | 16 (2 / 14) |
Uptime: | 06:23:35 |
Calls: | 6,642 |
Calls today: | 2 |
Files: | 12,190 |
Messages: | 5,325,988 |