Ubuntu 26.04 dracut network configuration
https://askubuntu.com/questions/1567304/ubuntu-26-04-dracut-network-configuration
I'm fighting with this for a week.
Read and searched a lot, That's why I decided to post my first question.
Initial setup :
Windows AD Network. Windows DHCP Servers automatically update DNS.
Install Ubuntu server on Hyper-V virtual machine.
This time I decide to give a shot for 26.04 LTS.
Ubuntu server is with static IP address, which I define during installation process. Let's say I gave it name svr-2604 as a host name and IP: 192.168.100.100/24 gateway: 192.168.100.1
Installation went smooth exactly as it was in 24.04 LTS that I used till that moment.
After installation I checked IP:192.168.100.100 and it was there. I get terminal SSH and everything was as expected. I create static record in DNS with name svr-2604 pointing to 192.168.100.100 (my usual action). I could ping and connect by terminal to SSh using this name (also as usual).
Restart Ubuntu server and for some reason I flush DNS cache on my computer. At that point I try to connect with terminal using the same name - without success. Check server - running. Ping name - no response but returning address completely different from DHCP range. Check DHCP and figure-out fresh address lease on name svr-2604 with address (let say): 192.168.100.36. IN DNS I have already two records about my server :
192.168.100.36 - dynamic from DHCP
192.168.100.100 - static
On request DNS returns first one and I can't connect to server by name.
On Ubuntu I checked log records :
journalctl | grep -i dhcp
get
svr-2604 systemd-networkd[420]: eth0: DHCPv4 address 192.168.100.36/24, gateway 192.168.100.1 acquired from 192.168.110.XXX (my dhcp server)
Check for configuration in /run/systemd/network and there I get :
-rw-r----- 1 root root 78 May 29 09:41 10-netplan-eth0.link
-rw-r----- 1 root systemd-network 222 May 29 09:41 10-netplan-eth0.network
-rw-r--r-- 1 root root 131 Apr 13 13:34 zzzz-dracut-default.network
First two are clear - result from my static address netplan configuration, but zzzz-dracut-default.network ??
Start digging and figure-out it was dynamic generated from dracut. It's content :
[Match]
Kind=!*
Type=!loopback
[Network]
DHCP=yes
[DHCPv4]
ClientIdentifier=mac
RequestOptions=17
[DHCPv6]
RequestOptions=59 60
In my opinion, this is where my problem comes. dracut on boot process leased address with my server name. When Ubuntu 26.04 boots - it takes configuration from netplan (the one that I wish to) but I finish with two different records in DNS.
What I try is to set dracut to use static address. I ended with idea that I have to give kernel command for this. Create following file :
/etc/dracut.conf.d/network.conf
with following content :
kernel_cmdline="ip=192.168.100.100::192.168.100.1:24::eth0:none"
after that I regenerate image with
dracut --force and reboot
Sadly no result.
At that point I gave up and decide to ask for help.
This never happens with Ubuntu 24.04 or earlier.
What is may positive move to resolve this problem ?
Any help is appreciate !
Regards