[Bug 1165366] New: dracut has trouble with /etc/services and /etc/protocols
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366 Bug ID: 1165366 Summary: dracut has trouble with /etc/services and /etc/protocols Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Installation Assignee: yast2-maintainers@suse.de Reporter: per@computer.org QA Contact: jsrain@suse.com Found By: --- Blocker: --- I'm setting up some hardware for burn-in and wanted to install Tumbleweed on an NFS root. When trying to rebuild the initrd: https://files.jessen.ch/mm29-dracut-output.txt dracut-install: ERROR: installing '/etc/services' dracut-install: ERROR: installing '/etc/protocols' dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.Lm1PZh/initramfs -a /etc/services /etc/nsswitch.conf /etc/rpc /etc/protocols /etc/idmapd.conf Command line is not complete. Try option "help" sed: can't read /etc/sysconfig/network/ifcfg-: No such file or directory I thought someone might want to know. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366#c1
--- Comment #1 from Per Jessen
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366#c2
--- Comment #2 from Per Jessen
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366#c3
--- Comment #3 from Per Jessen
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366#c6
Per Jessen
Which tool are you using to manage the network?
Wicked. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366#c7
Daniel Molkentin
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366#c8
Marius Tomaschewski
Wicked maintainers: Does wicked create the ifcfg- files, or just read from them as legacy source of information? If so, any guidance on how the code should work to determine a DHCP vs static IP boot?
Wicked never creates any ifcfg files or another kind of interface configuration. This is done by yast2-network or the user. Wicked reads the following configurations by default: - ibft firmware config from sysfs - ifcfg-* files from /etc/sysconfig/network/ - *.xml files from /etc/wicked/ifconfig/ the last source is kind of experimental / not (yet) really supported because 99.9% of the system does not have any clue about. The BOOTPROTO can be set to "dhcp", "dhcp4", "dhcp6" + combinations with e.g. "+autoip" behind, ... So I'd use: case $BOOTPROTO in static) printf 'ip=%s:static ' ${ifname} ;; *dhcp*) printf 'ip=%s:%s ' ${ifname} ${bootproto} ;; esac There is a BOOTPROTO=6to4 artifact which is basically also BOOTPROTO=static. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366#c9
Daniel Molkentin
(In reply to Daniel Molkentin from comment #7)
Wicked maintainers: Does wicked create the ifcfg- files, or just read from them as legacy source of information? If so, any guidance on how the code should work to determine a DHCP vs static IP boot?
Wicked never creates any ifcfg files or another kind of interface configuration. This is done by yast2-network or the user.
Ok, as expected
case $BOOTPROTO in static) printf 'ip=%s:static ' ${ifname} ;; *dhcp*) printf 'ip=%s:%s ' ${ifname} ${bootproto} ;; esac
There is a BOOTPROTO=6to4 artifact which is basically also BOOTPROTO=static.
I just realized that this is actually caused by a patch from Thomas (9cc1b76087c3ff17609a28f2142c2c62cd6cc97b) which is now also part of 050. I didn't realize it at the time but we created a circular dependency between the nfs and the network-legacy module this way. This will break for the network-manager module and for the upcoming network-wicked one. Honestly: I think the network storage modules has no business setting up the network (i.e. it was wrong before, but not bad, because there was only one network backend). However, the reverse might be true, e.g. for iBPF, the network module needs to know a bit about the storage part and set things up. The only thing I think we _should_ do is ensure that the network module (and hence one of its backends) is loaded. That is already happening in depends(). -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366#c10
Thomas Blume
(In reply to Marius Tomaschewski from comment #8)
(In reply to Daniel Molkentin from comment #7)
Wicked maintainers: Does wicked create the ifcfg- files, or just read from them as legacy source of information? If so, any guidance on how the code should work to determine a DHCP vs static IP boot?
Wicked never creates any ifcfg files or another kind of interface configuration. This is done by yast2-network or the user.
Ok, as expected
case $BOOTPROTO in static) printf 'ip=%s:static ' ${ifname} ;; *dhcp*) printf 'ip=%s:%s ' ${ifname} ${bootproto} ;; esac
There is a BOOTPROTO=6to4 artifact which is basically also BOOTPROTO=static.
I just realized that this is actually caused by a patch from Thomas (9cc1b76087c3ff17609a28f2142c2c62cd6cc97b) which is now also part of 050. I didn't realize it at the time but we created a circular dependency between the nfs and the network-legacy module this way.
Hm, the error: sed: can't read /etc/sysconfig/network/ifcfg-: No such file or directory indicates that $ifname is empty. That should normally get filled via: ifname=$(ip -o route get to $nfs_address | sed -n 's/.*dev \([^ ]*\).*/\1/p') Per could you paste the output of the command: ip -o route get to $YOUR_NSFSSERVERIP | sed -n 's/.*dev \([^ ]*\).*/\1/p' where $YOUR_NSFSSERVERIP is the ip of your nfsserver? on your nfsroot machine? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366#c11
--- Comment #11 from Thomas Blume
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366#c12
Per Jessen
btw. this is a static ip setup, but the ip= parameter doesn't contain the static ip:
dracut: root=nfs4:rootserver:/srv/nfsroot/mm29:rw,relatime,vers=4.1,rsize=131072, wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys, clientaddr=192.168.6.232,local_lock=none,addr=192.168.2.128 ip=:static
that looks quite broken.
Hi Thomas yes, I think that is due to an issue with constructing a working resolv.conf - that way 'rootserver' does not get resolved. May be related to bug#1165547. During installation, the setup is dynamic, but later I switch to a static ditto. When I reported this, we were still mostly pre-corona, I don't remember where I left it. I think I might just start from scratch. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366#c13
--- Comment #13 from Per Jessen
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366#c14
--- Comment #14 from Per Jessen
btw. this is a static ip setup, but the ip= parameter doesn't contain the static ip:
dracut: root=nfs4:rootserver:/srv/nfsroot/mm29:rw,relatime,vers=4.1,rsize=131072, wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys, clientaddr=192.168.6.232,local_lock=none,addr=192.168.2.128 ip=:static
that looks quite broken.
The above is caused by building the initrd without a proper /etc/resolv.conf. I think that is what the installer does. Every time I install on NFS I always have to rebuild the initrd to make it work. With a working /etc/resolv.conf: (on a new 15.2 install) dracut: root=nfs4:rootserver:/srv/nfsroot/mole28:rw,relatime,vers=4.1,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp6,timeo=600,retrans=2,sec=sys,clientaddr=2a03:7520:4c68:1:ff99:ffff:0:49fc,local_lock=none,addr=2a03:7520:4c68:1::128 ifname=eth0:00:30:48:d3:75:74 ip=eth0:dhcp -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366#c16
Per Jessen
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366
http://bugzilla.opensuse.org/show_bug.cgi?id=1165366#c18
Per Jessen
participants (1)
-
bugzilla_noreply@novell.com