[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re: How to get preseed to ASK me for hostname + strange partitioning behaviour



Am Donnerstag, dem 20.01.2022 um 13:16 +0100 schrieb Jonas Bygdén:
> 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

Works for me. I have a profile for simple-cdd which does exactly that.

> 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?

Yes. the "seen false" must come after any pre-seeting of the value. Maybe
you'll have to move the

d-i netcfg/get_domain seen false
d-i netcfg/get_hostname seen false

also after preseeding netcfg/hostname? I make sure that the "seen false"
entries always come after everything else.
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

# 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 true
d-i netcfg/get_domain seen true

But I still only get it set to ‘debian’ without question.
[..]
> 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?

The detection mmechanism to detect the installation drive is not perfect. It is
possible that it fails to detect the correct drive and doesn't know how to
handle it. I use scripts to make an educated guess and set partman-auto/disk
via partman/early_command.

You should check /var/log/installer/syslog and console 4 (when the above
happens) to see what happened.

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


Reply to: