Thanks for the information, Guilhem.

I got myself a solution/workaround by implementing an initramfs hook that dynamically sets the hostname without the need of setting the kernel cmd line:
/etc/initramfs-tools/hooks/set_separate_ip_parameter.sh (attached)

The reason that it was working with my other VMs is that several years ago I implemented a workaround on my DHCP server to assign the host name via DHCP for some machines. With the initramfs hook there is no need to have an DHCP workaround as the hook will work on any Debian machine - even tested with Debian 4 :)

The bug can be closed.

Sorry for the inconvenience
Maddes

#!/bin/sh

#
# This InitRAMFS hook provides:
# Simple script to set IP parameter in InitRAMFS with current hostname,
# instead of manually maintaining /etc/initramfs-tools/initramfs.conf or
# a file in /etc/initramfs-tools/conf.d.
# Intended for static DHCP via host name.
#
# This will override any IP setting of /etc/initramfs-tools/initramfs.conf
# or a file in /etc/initramfs-tools/conf.d that comes before the generated
# config file.
# 
# Still a kernel ip parameter will override any initramfs-tools config
# setting (see script /usr/share/initramfs-tools/init).
#
# Copyright: Matthias Bücher, see http://www.maddes.net/
# License: GNU GPL v2 or later, see http://www.gnu.org/licenses/gpl.html
#
# Additional information:
# * https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt
#   In Debian as kernel command via /etc/default/grub
#
# Tested:
# * Debian 4.x
# * Debian 8.x
# * Debian 9.x
#
# History:
# v1.0 - 2017-07-01
#  initial release
#

PREREQ=""

prereqs()
{
	echo "${PREREQ}"
}

case "${1}" in
 prereqs)
	prereqs
	exit 0
	;;
esac

. /usr/share/initramfs-tools/hook-functions

#
# Begin real processing
#
cat > "${DESTDIR}/conf/conf.d/00_separate_ip_parameter" << __EOF
IP=::::$(hostname)
__EOF
chmod u=rw,go=r "${DESTDIR}/conf/conf.d/00_separate_ip_parameter"

Reply via email to