preseed.cfg ignoring hostname settingWhile using a debian preseed how to assign hostname manually?Reverse DNS lookups slowing down network operations on LANHow to force Debian to wait for DHCPHow to build a live Debian CD/USB in Windows, bootable in EFI mode?Unable to set hostname for use within networkUnstable network on integrated Debian environmentHow to add another domain (SOA) to my bind9 installation when domain has not been delegated yet. What are the delegation steps?Can ping Debian VM via IP but not via hostnameFedora 26 and fully qualified domain names?PXE boot debian-installer preseed.cfg - how to get to present only certain questions (eg. hostname)While using a debian preseed how to assign hostname manually?
Are cabin dividers used to "hide" the flex of the airplane?
Is there any use for defining additional entity types in a SOQL FROM clause?
Where else does the Shulchan Aruch quote an authority by name?
What is the command to reset a PC without deleting any files
Can the Produce Flame cantrip be used to grapple, or as an unarmed strike, in the right circumstances?
Can I find out the caloric content of bread by dehydrating it?
Is Social Media Science Fiction?
What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?
Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?
What is the meaning of "of trouble" in the following sentence?
Crop image to path created in TikZ?
I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine
Are white and non-white police officers equally likely to kill black suspects?
What do the Banks children have against barley water?
extract characters between two commas?
How could a lack of term limits lead to a "dictatorship?"
What is it called when one voice type sings a 'solo'?
"My colleague's body is amazing"
Does bootstrapped regression allow for inference?
What happens when a metallic dragon and a chromatic dragon mate?
COUNT(*) or MAX(id) - which is faster?
"listening to me about as much as you're listening to this pole here"
Is "plugging out" electronic devices an American expression?
Is every set a filtered colimit of finite sets?
preseed.cfg ignoring hostname setting
While using a debian preseed how to assign hostname manually?Reverse DNS lookups slowing down network operations on LANHow to force Debian to wait for DHCPHow to build a live Debian CD/USB in Windows, bootable in EFI mode?Unable to set hostname for use within networkUnstable network on integrated Debian environmentHow to add another domain (SOA) to my bind9 installation when domain has not been delegated yet. What are the delegation steps?Can ping Debian VM via IP but not via hostnameFedora 26 and fully qualified domain names?PXE boot debian-installer preseed.cfg - how to get to present only certain questions (eg. hostname)While using a debian preseed how to assign hostname manually?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am installing Debian Wheezy (netinstall) in VirtualBox using preseed.cfg
.
I tried both d-i netcfg/get_hostname string somehost
and d-i netcfg/get_hostname string somehost
, but in both cases the host gets set as "debian". I tried both at the same time but still the host is set as "debian".
Excerpt from Debian's guide about preconfiguration file:
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,
uncommentand adjust the following line
d-i netcfg/hostname string somehost
Is this a bug or am I just unlucky?
debian hostname netcfg preseed
add a comment |
I am installing Debian Wheezy (netinstall) in VirtualBox using preseed.cfg
.
I tried both d-i netcfg/get_hostname string somehost
and d-i netcfg/get_hostname string somehost
, but in both cases the host gets set as "debian". I tried both at the same time but still the host is set as "debian".
Excerpt from Debian's guide about preconfiguration file:
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,
uncommentand adjust the following line
d-i netcfg/hostname string somehost
Is this a bug or am I just unlucky?
debian hostname netcfg preseed
add a comment |
I am installing Debian Wheezy (netinstall) in VirtualBox using preseed.cfg
.
I tried both d-i netcfg/get_hostname string somehost
and d-i netcfg/get_hostname string somehost
, but in both cases the host gets set as "debian". I tried both at the same time but still the host is set as "debian".
Excerpt from Debian's guide about preconfiguration file:
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,
uncommentand adjust the following line
d-i netcfg/hostname string somehost
Is this a bug or am I just unlucky?
debian hostname netcfg preseed
I am installing Debian Wheezy (netinstall) in VirtualBox using preseed.cfg
.
I tried both d-i netcfg/get_hostname string somehost
and d-i netcfg/get_hostname string somehost
, but in both cases the host gets set as "debian". I tried both at the same time but still the host is set as "debian".
Excerpt from Debian's guide about preconfiguration file:
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,
uncommentand adjust the following line
d-i netcfg/hostname string somehost
Is this a bug or am I just unlucky?
debian hostname netcfg preseed
debian hostname netcfg preseed
edited Feb 6 '17 at 23:13
Tshepang
26.5k72187265
26.5k72187265
asked Dec 25 '13 at 21:00
ToddMToddM
6613
6613
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
Not a solution but a workaround
I too have faced a similar issue and I worked around it by setting the host name after installation via the following lines added at the end of my pressed.cfg
:
d-i pressed/late_command string
in-target /bin/bash -c 'echo desired_name > /etc/hostname'
The in-target
is necessary so that the /
refers to the target filesystem (that will eventually become your root filesystem) that usually appears as /target
during installation.
1
I've also used this but with a slight modification so that the hostname is automatically set from a DNS lookup:d-i pressed/late_command string in-target /bin/bash -c 'echo $(dig +short -x $(facter ipaddress)) | sed -e 's/.$//' > /etc/hostname'
. This uses "facter" from puppetlabs to get the IP address but you could do something similar usingip addr
andsed
.
– David Gardner
May 27 '15 at 13:58
add a comment |
If you are netbooting (with PXE and friends), the hostname is set up before fetching the preseed file, so the hostname should be set on the kernel command-line like this :
hostname=myhostname domain=mydomain
From the introduction of the appendix B (on preseeding) of the debian-installer manual :
An important difference between the preseeding methods is the point at which the preconfiguration file is loaded and processed. For initrd preseeding this is right at the start of the installation, before the first question is even asked. For file preseeding this is after the CD or CD image has been loaded. For network preseeding it is only after the network has been configured.
add a comment |
I found that this problem went away when I removed priority=critical
from the arguments I was passing-in to the kernel at the net install command line (via the pxelinux.cfg directory entries).
I assume this means that the question which asks the hostname has been given a priority which is lower than 'critical', and so gets populated with the default answer.
If you do make this change, you may find that you have to preseed some other lower-than-critical answers for other questions later on in the install process...
add a comment |
It's debian-installer limitation. By the time you fetch your preseed config file from network, netcfg
has already done it's job and is gone, so it won't refetch values.
somewhat offical kludge is to use in your preseed.cfg
line:
d-i preseed/run string http://example.net/d-i/jessie/preseed.sh
and in that preseed.sh
then specify:
#!/bin/sh
kill-all-dhcp; netcfg
That way, when network is established and preseed.cfg
is fetched, preseed.sh
will also be fetch and run, so it will restart netcfg
which will then read all preseed values for netcfg/*
and configure them correctly (/etc/hostsname
, /etc/hosts
, /etc/network/interfaces
if you're setting static IP configuration via preseed etc)
You can do this without a separate file:d-i preseed/early_command string kill-all-dhcp; netcfg
in your preseed file is enough. Tested with Stretch in an automated netinstall.
– scy
Dec 17 '17 at 19:57
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f106614%2fpreseed-cfg-ignoring-hostname-setting%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Not a solution but a workaround
I too have faced a similar issue and I worked around it by setting the host name after installation via the following lines added at the end of my pressed.cfg
:
d-i pressed/late_command string
in-target /bin/bash -c 'echo desired_name > /etc/hostname'
The in-target
is necessary so that the /
refers to the target filesystem (that will eventually become your root filesystem) that usually appears as /target
during installation.
1
I've also used this but with a slight modification so that the hostname is automatically set from a DNS lookup:d-i pressed/late_command string in-target /bin/bash -c 'echo $(dig +short -x $(facter ipaddress)) | sed -e 's/.$//' > /etc/hostname'
. This uses "facter" from puppetlabs to get the IP address but you could do something similar usingip addr
andsed
.
– David Gardner
May 27 '15 at 13:58
add a comment |
Not a solution but a workaround
I too have faced a similar issue and I worked around it by setting the host name after installation via the following lines added at the end of my pressed.cfg
:
d-i pressed/late_command string
in-target /bin/bash -c 'echo desired_name > /etc/hostname'
The in-target
is necessary so that the /
refers to the target filesystem (that will eventually become your root filesystem) that usually appears as /target
during installation.
1
I've also used this but with a slight modification so that the hostname is automatically set from a DNS lookup:d-i pressed/late_command string in-target /bin/bash -c 'echo $(dig +short -x $(facter ipaddress)) | sed -e 's/.$//' > /etc/hostname'
. This uses "facter" from puppetlabs to get the IP address but you could do something similar usingip addr
andsed
.
– David Gardner
May 27 '15 at 13:58
add a comment |
Not a solution but a workaround
I too have faced a similar issue and I worked around it by setting the host name after installation via the following lines added at the end of my pressed.cfg
:
d-i pressed/late_command string
in-target /bin/bash -c 'echo desired_name > /etc/hostname'
The in-target
is necessary so that the /
refers to the target filesystem (that will eventually become your root filesystem) that usually appears as /target
during installation.
Not a solution but a workaround
I too have faced a similar issue and I worked around it by setting the host name after installation via the following lines added at the end of my pressed.cfg
:
d-i pressed/late_command string
in-target /bin/bash -c 'echo desired_name > /etc/hostname'
The in-target
is necessary so that the /
refers to the target filesystem (that will eventually become your root filesystem) that usually appears as /target
during installation.
edited Dec 25 '13 at 21:28
answered Dec 25 '13 at 21:22
Joseph R.Joseph R.
28.9k377117
28.9k377117
1
I've also used this but with a slight modification so that the hostname is automatically set from a DNS lookup:d-i pressed/late_command string in-target /bin/bash -c 'echo $(dig +short -x $(facter ipaddress)) | sed -e 's/.$//' > /etc/hostname'
. This uses "facter" from puppetlabs to get the IP address but you could do something similar usingip addr
andsed
.
– David Gardner
May 27 '15 at 13:58
add a comment |
1
I've also used this but with a slight modification so that the hostname is automatically set from a DNS lookup:d-i pressed/late_command string in-target /bin/bash -c 'echo $(dig +short -x $(facter ipaddress)) | sed -e 's/.$//' > /etc/hostname'
. This uses "facter" from puppetlabs to get the IP address but you could do something similar usingip addr
andsed
.
– David Gardner
May 27 '15 at 13:58
1
1
I've also used this but with a slight modification so that the hostname is automatically set from a DNS lookup:
d-i pressed/late_command string in-target /bin/bash -c 'echo $(dig +short -x $(facter ipaddress)) | sed -e 's/.$//' > /etc/hostname'
. This uses "facter" from puppetlabs to get the IP address but you could do something similar using ip addr
and sed
.– David Gardner
May 27 '15 at 13:58
I've also used this but with a slight modification so that the hostname is automatically set from a DNS lookup:
d-i pressed/late_command string in-target /bin/bash -c 'echo $(dig +short -x $(facter ipaddress)) | sed -e 's/.$//' > /etc/hostname'
. This uses "facter" from puppetlabs to get the IP address but you could do something similar using ip addr
and sed
.– David Gardner
May 27 '15 at 13:58
add a comment |
If you are netbooting (with PXE and friends), the hostname is set up before fetching the preseed file, so the hostname should be set on the kernel command-line like this :
hostname=myhostname domain=mydomain
From the introduction of the appendix B (on preseeding) of the debian-installer manual :
An important difference between the preseeding methods is the point at which the preconfiguration file is loaded and processed. For initrd preseeding this is right at the start of the installation, before the first question is even asked. For file preseeding this is after the CD or CD image has been loaded. For network preseeding it is only after the network has been configured.
add a comment |
If you are netbooting (with PXE and friends), the hostname is set up before fetching the preseed file, so the hostname should be set on the kernel command-line like this :
hostname=myhostname domain=mydomain
From the introduction of the appendix B (on preseeding) of the debian-installer manual :
An important difference between the preseeding methods is the point at which the preconfiguration file is loaded and processed. For initrd preseeding this is right at the start of the installation, before the first question is even asked. For file preseeding this is after the CD or CD image has been loaded. For network preseeding it is only after the network has been configured.
add a comment |
If you are netbooting (with PXE and friends), the hostname is set up before fetching the preseed file, so the hostname should be set on the kernel command-line like this :
hostname=myhostname domain=mydomain
From the introduction of the appendix B (on preseeding) of the debian-installer manual :
An important difference between the preseeding methods is the point at which the preconfiguration file is loaded and processed. For initrd preseeding this is right at the start of the installation, before the first question is even asked. For file preseeding this is after the CD or CD image has been loaded. For network preseeding it is only after the network has been configured.
If you are netbooting (with PXE and friends), the hostname is set up before fetching the preseed file, so the hostname should be set on the kernel command-line like this :
hostname=myhostname domain=mydomain
From the introduction of the appendix B (on preseeding) of the debian-installer manual :
An important difference between the preseeding methods is the point at which the preconfiguration file is loaded and processed. For initrd preseeding this is right at the start of the installation, before the first question is even asked. For file preseeding this is after the CD or CD image has been loaded. For network preseeding it is only after the network has been configured.
answered Jul 30 '14 at 14:11
pseudorandompseudorandom
30123
30123
add a comment |
add a comment |
I found that this problem went away when I removed priority=critical
from the arguments I was passing-in to the kernel at the net install command line (via the pxelinux.cfg directory entries).
I assume this means that the question which asks the hostname has been given a priority which is lower than 'critical', and so gets populated with the default answer.
If you do make this change, you may find that you have to preseed some other lower-than-critical answers for other questions later on in the install process...
add a comment |
I found that this problem went away when I removed priority=critical
from the arguments I was passing-in to the kernel at the net install command line (via the pxelinux.cfg directory entries).
I assume this means that the question which asks the hostname has been given a priority which is lower than 'critical', and so gets populated with the default answer.
If you do make this change, you may find that you have to preseed some other lower-than-critical answers for other questions later on in the install process...
add a comment |
I found that this problem went away when I removed priority=critical
from the arguments I was passing-in to the kernel at the net install command line (via the pxelinux.cfg directory entries).
I assume this means that the question which asks the hostname has been given a priority which is lower than 'critical', and so gets populated with the default answer.
If you do make this change, you may find that you have to preseed some other lower-than-critical answers for other questions later on in the install process...
I found that this problem went away when I removed priority=critical
from the arguments I was passing-in to the kernel at the net install command line (via the pxelinux.cfg directory entries).
I assume this means that the question which asks the hostname has been given a priority which is lower than 'critical', and so gets populated with the default answer.
If you do make this change, you may find that you have to preseed some other lower-than-critical answers for other questions later on in the install process...
edited Mar 28 at 14:22
GAD3R
28.1k1958114
28.1k1958114
answered Jan 24 '14 at 11:12
Tim SmallTim Small
613
613
add a comment |
add a comment |
It's debian-installer limitation. By the time you fetch your preseed config file from network, netcfg
has already done it's job and is gone, so it won't refetch values.
somewhat offical kludge is to use in your preseed.cfg
line:
d-i preseed/run string http://example.net/d-i/jessie/preseed.sh
and in that preseed.sh
then specify:
#!/bin/sh
kill-all-dhcp; netcfg
That way, when network is established and preseed.cfg
is fetched, preseed.sh
will also be fetch and run, so it will restart netcfg
which will then read all preseed values for netcfg/*
and configure them correctly (/etc/hostsname
, /etc/hosts
, /etc/network/interfaces
if you're setting static IP configuration via preseed etc)
You can do this without a separate file:d-i preseed/early_command string kill-all-dhcp; netcfg
in your preseed file is enough. Tested with Stretch in an automated netinstall.
– scy
Dec 17 '17 at 19:57
add a comment |
It's debian-installer limitation. By the time you fetch your preseed config file from network, netcfg
has already done it's job and is gone, so it won't refetch values.
somewhat offical kludge is to use in your preseed.cfg
line:
d-i preseed/run string http://example.net/d-i/jessie/preseed.sh
and in that preseed.sh
then specify:
#!/bin/sh
kill-all-dhcp; netcfg
That way, when network is established and preseed.cfg
is fetched, preseed.sh
will also be fetch and run, so it will restart netcfg
which will then read all preseed values for netcfg/*
and configure them correctly (/etc/hostsname
, /etc/hosts
, /etc/network/interfaces
if you're setting static IP configuration via preseed etc)
You can do this without a separate file:d-i preseed/early_command string kill-all-dhcp; netcfg
in your preseed file is enough. Tested with Stretch in an automated netinstall.
– scy
Dec 17 '17 at 19:57
add a comment |
It's debian-installer limitation. By the time you fetch your preseed config file from network, netcfg
has already done it's job and is gone, so it won't refetch values.
somewhat offical kludge is to use in your preseed.cfg
line:
d-i preseed/run string http://example.net/d-i/jessie/preseed.sh
and in that preseed.sh
then specify:
#!/bin/sh
kill-all-dhcp; netcfg
That way, when network is established and preseed.cfg
is fetched, preseed.sh
will also be fetch and run, so it will restart netcfg
which will then read all preseed values for netcfg/*
and configure them correctly (/etc/hostsname
, /etc/hosts
, /etc/network/interfaces
if you're setting static IP configuration via preseed etc)
It's debian-installer limitation. By the time you fetch your preseed config file from network, netcfg
has already done it's job and is gone, so it won't refetch values.
somewhat offical kludge is to use in your preseed.cfg
line:
d-i preseed/run string http://example.net/d-i/jessie/preseed.sh
and in that preseed.sh
then specify:
#!/bin/sh
kill-all-dhcp; netcfg
That way, when network is established and preseed.cfg
is fetched, preseed.sh
will also be fetch and run, so it will restart netcfg
which will then read all preseed values for netcfg/*
and configure them correctly (/etc/hostsname
, /etc/hosts
, /etc/network/interfaces
if you're setting static IP configuration via preseed etc)
edited Mar 28 at 13:41
GAD3R
28.1k1958114
28.1k1958114
answered Feb 3 '17 at 5:10
Matija NalisMatija Nalis
2,342818
2,342818
You can do this without a separate file:d-i preseed/early_command string kill-all-dhcp; netcfg
in your preseed file is enough. Tested with Stretch in an automated netinstall.
– scy
Dec 17 '17 at 19:57
add a comment |
You can do this without a separate file:d-i preseed/early_command string kill-all-dhcp; netcfg
in your preseed file is enough. Tested with Stretch in an automated netinstall.
– scy
Dec 17 '17 at 19:57
You can do this without a separate file:
d-i preseed/early_command string kill-all-dhcp; netcfg
in your preseed file is enough. Tested with Stretch in an automated netinstall.– scy
Dec 17 '17 at 19:57
You can do this without a separate file:
d-i preseed/early_command string kill-all-dhcp; netcfg
in your preseed file is enough. Tested with Stretch in an automated netinstall.– scy
Dec 17 '17 at 19:57
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f106614%2fpreseed-cfg-ignoring-hostname-setting%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
-debian, hostname, netcfg, preseed