Kernel command line does not correctly parse ip field if nfsroot

Bug #1251274 reported by Jason Morgan
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
initramfs-tools
New
Undecided
Unassigned
klibc
New
Undecided
Unassigned
linux (Ubuntu)
Incomplete
Medium
Unassigned

Bug Description

Kernel image linux-image-3.8.0.31-generic
Ubuntu 12.04.3 LTS

I'm setting up machines with nfsroot.
dhcp works fine, but a static address fails to set resolvconf.

The document https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt
states that there are between one and nine fields in the kernel command line option 'ip=' separated by colons.

The last two are dns0 and dns1
e.g.
APPEND root=/dev/nfs nfsroot=10.0.0.1:/exports/nfsroot initrd=boot/initrd.img ip=10.0.0.200:10.0.0.1:10.0.0.1:255.0.0.0:itx1c:eth0:off:10.0.0.1:0.0.0.0 rootwait=1 nfsdebug=1 nfsrootdebug=1 rw

I find that if I supply one or both dns addresses, then the boot fails with the message

ipconfig: too many options for eth0
and then when configure_networking (from scripts/functions in /usr/share/initramsfs-tools/) runs (called by scripts/nfs) says it can't create it's temp file
/tmp/net-eth0:off:10.0.0.1:0.0.0.0
After that we get a kernel panic as init completes badly.

Clearly the command line parsing does not meet the spec in the above reference.

I'm sure I can work round this by not supplying dns addresses in the command line and re-writing /etc/resolv.conf elsewhere, but this needs fixing properly.

I'm not sure if the ip= line is parsed elsewhere so I don't have enough information to offer a proper fix.

Revision history for this message
Jason Morgan (jason-morgan-0) wrote :

More info:

I've found the current git for ipconfig (part of klibc) in
http://git.kernel.org/cgit/libs/klibc/klibc.git/tree/usr/kinit/ipconfig/README.ipconfig?id=HEAD
simply does not support the dns parameters that are specified.

It looks like initramfs-tools assumes it does, rather than pruning the dns entries (if supplied) and passing them to resolvconf.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1251274/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
John Kim (kotux) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal:
apport-collect BUGNUMBER
When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

affects: ubuntu → linux (Ubuntu)
Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu):
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.