fix: explicitly configure dhcp in ip= kernel command line#245
Open
enr0n wants to merge 1 commit into
Open
Conversation
Author
|
/cc @bdrung for awareness |
Author
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. |
Author
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. |
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
Author
|
@r00ta gentle ping. I pushed with my canonical email to fix the CLA check. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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