Skip to content

fix: explicitly configure dhcp in ip= kernel command line - #245

Merged
skatsaounis merged 1 commit into
canonical:masterfrom
enr0n:fix-ip-kernel-opt
Jul 30, 2026
Merged

fix: explicitly configure dhcp in ip= kernel command line#245
skatsaounis merged 1 commit into
canonical:masterfrom
enr0n:fix-ip-kernel-opt

Conversation

@enr0n

@enr0n enr0n commented May 12, 2026

Copy link
Copy Markdown
Contributor

The ip= kernel command line option is implemented slightly differently across dracut, initramfs-tools, systemd-network-generator, etc.

Dracut now lets systemd-network-generator handle ip= parsing, and systemd-network-generator requires that the DHCP type is set when the interface name is. E.g.,

ip=::::bibarel:BOOTIF:dhcp BOOTIF=01-ec:b1:d7:7f:2a:6c

is valid but

ip=::::bibarel:BOOTIF BOOTIF=01-ec:b1:d7:7f:2a:6c

is not. Ubuntu currently carries a downstream patch to allow for easier migration from initramfs-tools, but going forward the DHCP type should be set explicitly. Hence, set it to "dhcp", which is the behavior when unspecified in initramfs-tools.

Resolves: LP#2141588

@enr0n
enr0n requested a review from a team May 12, 2026 08:27
@enr0n

enr0n commented May 12, 2026

Copy link
Copy Markdown
Contributor Author

/cc @bdrung for awareness

@r00ta r00ta left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@enr0n is this backwards compatible? What if the user is deploying another previous version of Ubuntu?

@enr0n

enr0n commented May 14, 2026

Copy link
Copy Markdown
Contributor Author

@enr0n is this backwards compatible? What if the user is deploying another previous version of Ubuntu?

I believe so, but it has been a little while since I checked (and I sometimes confuse the various implementations), so I will double check.

@enr0n

enr0n commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

@enr0n is this backwards compatible? What if the user is deploying another previous version of Ubuntu?

Sorry for the delay, I was OOO for a bit. Yes, this is backwards compatible. See e.g. this test case for initramfs-tools: https://git.launchpad.net/ubuntu/+source/initramfs-tools/tree/debian/tests/qemu-net#n81.

I.e. it is supported to explicitly configure "dhcp" or so in that field.

@enr0n
enr0n force-pushed the fix-ip-kernel-opt branch from e58f2c7 to ad08319 Compare June 10, 2026 15:28
@enr0n
enr0n force-pushed the fix-ip-kernel-opt branch from ad08319 to ea4f250 Compare July 1, 2026 19:56
The ip= kernel command line option is implemented slightly differently
across dracut, initramfs-tools, systemd-network-generator, etc.

Dracut now lets systemd-network-generator handle ip= parsing, and
systemd-network-generator requires that the DHCP type is set when
the interface name is. E.g.,

 ip=::::bibarel:BOOTIF:dhcp BOOTIF=01-ec:b1:d7:7f:2a:6c

is valid but

 ip=::::bibarel:BOOTIF BOOTIF=01-ec:b1:d7:7f:2a:6c

is not. Ubuntu currently carries a downstream patch to allow for easier
migration from initramfs-tools, but going forward the DHCP type should
be set explicitly. Hence, set it to "dhcp", which is the behavior when
unspecified in initramfs-tools.

Related: LP: #2141588
@enr0n
enr0n force-pushed the fix-ip-kernel-opt branch from ea4f250 to 15a960a Compare July 1, 2026 19:58
@enr0n

enr0n commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@r00ta gentle ping. I pushed with my canonical email to fix the CLA check.

@r00ta r00ta left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@r00ta
r00ta added this pull request to the merge queue Jul 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 23, 2026
@r00ta
r00ta added this pull request to the merge queue Jul 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 23, 2026
@skatsaounis
skatsaounis added this pull request to the merge queue Jul 30, 2026
Merged via the queue into canonical:master with commit 005dc69 Jul 30, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants