[ipxe-devel] Debian installer doesn't load preseed

Geert Stappers stappers at stappers.nl
Sat Mar 30 18:43:15 UTC 2019


On Sat, Mar 30, 2019 at 06:58:36PM +0100, Christian Nilsson wrote:
> On Sat, 30 Mar 2019 at 17:58, Ghassan Elrayah wrote:
> >
> > Hi,
> >
> > I am facing a problem loading the preseed file for Debian installation.
> > The unattended installation stops always at the mirror country option
> > which is defined in my preseed. The preseed file is in the new server
> > either in /tmp or under / depending on the path I specified. But the
> > installer just ignores it. I don't know if its a Debian bug or an ipxe
> > issue.

Hold on    ;-)


> >
> > Here is my menu.ipxe
> >
> > :d10-dc-node
> > set base-url https://d-i.debian.org/daily-images/amd64/daily/netboot/debian-installer/amd64
> > kernel ${base-url}/linux auto=true preseed/url=tftp://my.ipxe.server/preseed/debian_buster_node.seed
> > initrd ${base-url}/initrd.gz
> > initrd tftp://my.ipxe.server/preseed/debian_buster_node.seed
> > /tmp/debian_buster_node.seed
> > imgargs linux netcfg/choose_interface=eno1 auto-install/enable=true fb=false debconf/frontend=noninteractive debian-installer=en_US.UTF-8 auto locale=en_US.UTF-8 console-setup/ask_detect=false kbd-chooser/method=us keyboard-configuration/xkb-keymap=us keyboard-configuration/modelcode=pc105 keyboard-configuration/layout=USA keyboard-configuration/variant=USA BOOT_DEBUG=2 --
> > boot
> >
> > I also tried it this way:
> >
> >  ....
> >
> > and this way:
> >
> >  ....
> >
> > But the result is always the same, after configuring the language, the
> > locales and keyboard, I have to choose the interface, because the server
> > has four of them and I cannot preseed the correct one. Then I enter the
> > hostname manually which is desired, since the preseed is for hardware
> > server installation as Ganeti node, but then the mirror defined in the
> > preseed is not picked neither the further steps of the installation process.
> >
> > Here is the relvant part of the preseed:
> >
> > ### Keyboard
> >  ...
> > ### Locales
> >  ...
> > ### Time zone
> >  ...
> > ### Network
> > d-i netcfg/choose_interface select                  eno1
> > d-i netcfg/wireless_wep                             string
> >
> > ### Mirror settings
> >  ...
> >
> > Thank you for your support
> >
> 
> First of I know nothing about Debian.
> As I understand it some of your choices in your pressed file is detected?
> If so this is entirely an Debian issue and not iPXE related?
> 
> Can you check that your pressed file is downloaded and restored into
> the running linux system?
> Also check that /proc/cmdline contains what you expect it to.
> 
> (if you where using EFI then the file would never exist in /tmp/ but
> that is due to the fact that cpio is not created when starting efi
> binaries, also the extra initrd= lines would be needed as kernel
> options)
> 
> One thing that I do note...
> if you have kernel line with arguments and then use imgargs - then the
> arguments on the kernel line is gone,
> My preferred way here is to put everything on the kernel line to avoid
> the confusion.

Debian-installer does support booting from USB-storage, CD-ROM, harddisk
and network boot.  All methods do use the method for user input ( "debconf" )
The answers on user input can be preseed. Hey, we known that.   :-)

The installer doesn't start with reading a preseed file. That is because
it can't be told what the default location is. ( The boot methods differ )
That is why kernel boot parameters are used.  Hey, original poster did
know that.

There are two corner cases that o.p. is struggling with:
* hostname
* network device

I have 'hostname' work-a-rounded with this in my preseed file
---8<----8<----8<---
# 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 prd.example.com

# We want to force a hostname, regardless of what either the DHCP server
# returns
# or what the reverse DNS entry for the IP is.
d-i netcfg/hostname string minerva-db-3

# NOTE FIXME TODO   DNS content

---8<----8<----8<---

For the 'network device' I haven't yet a solution. Perhaps I do,
but I'm not sure. (Last hardware install was a server that got
an additional NIC )

My preseed file does have
---8<----8<----8<---
# netcfg will choose an interface that has link if possible. This makes it
# skip displaying a list if there is more than one interface.
d-i netcfg/choose_interface select eno49

# configure the network manually
d-i netcfg/disable_autoconfig boolean true

d-i netcfg/dhcp_failed note
d-i netcfg/dhcp_options select Configure network manually

#  but it does NOT work
#  we set static IP address after the install with other tooling
#  the server reboots as DHCP client

d-i netcfg/get_ipaddress string 10.717.248.333
d-i netcfg/get_netmask string 255.255.255.192
d-i netcfg/get_gateway string 10.717.248.65
d-i netcfg/get_nameservers string 172.906.507.11
d-i netcfg/confirm_static boolean true

# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
---8<----8<----8<---
However with valid IP addresses.

Reason for posting it here is that it has entries that I have not seen
in "copy and paste" from the original poster.


Groeten
Geert Stappers
-- 
Leven en laten leven



More information about the ipxe-devel mailing list