Bug 389672

Summary: inconsistencies in hostname resolving when installing onto nfsroot
Product: [openSUSE] openSUSE 11.0 Reporter: Olaf Hering <ohering>
Component: InstallationAssignee: Hannes Reinecke <hare>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: agraf, hannsj_uhl, lmuelle, marko.veelma
Version: Beta 2Flags: coolo: SHIP_STOPPER-
Target Milestone: ---   
Hardware: PowerPC   
OS: Linux   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: run_all.sh
ignore-args-after-init=
mkinitrd.nfsroot.patch

Description Olaf Hering 2008-05-13 07:27:00 UTC
11.0beta2, installation onto nfsroot

mkinitrd is unable to resolve the name of the nfsserver because it has no resolv.conf

The attached install.inf shows 'dist.suse.de' as install source. This means that a valid resolv.conf is availabe during first stage. 

mkinitrd put a hardcoded 'boettger.suse.de' as nfsserver into the initrd.

But for some reason, mkinitrd did fall back to static interface configuration. As a result, name resolving fails because the target directory has no /etc/resolv.conf during first stage.

I think the used cmdline during install was:
"sysrq=1 start_shell nosshkey quiet install=nfs://dist.suse.de/dist/install/openSUSE-11.0-Beta2/openSUSE-11.0-Beta2-DVD-ppc.iso linuxrcstderr=/dev/console lxrcdbg=4 "

The used cmdline for booting into nfsroot is "quiet panic=12 sysrq=1 "

logs can be found in bug #384420
Comment 1 Olaf Hering 2008-05-13 07:30:22 UTC
Created attachment 214607 [details]
run_all.sh

resulting run_all.sh
Comment 3 Steffen Winterfeldt 2008-05-13 10:14:49 UTC
Maybe YaST fell into the trap of the changed dhcpcd-<if>.info file format?
Comment 4 Michal Zugec 2008-05-13 11:00:15 UTC
This is issue for Steffen:
>> mkinitrd is unable ...
>> ... has no /etc/resolv.conf during first stage

yast2-network comes later ;-)
Comment 5 Michal Zugec 2008-05-13 11:01:46 UTC
re comment #3: YaST don't read that file directly
Comment 6 Steffen Winterfeldt 2008-05-13 11:48:20 UTC
I hoped so, but grep showed a few matches.

Olaf, can you check if linuxrc leaves a resolv.conf? I see no problem on
my test machine.
Comment 7 Olaf Hering 2008-05-13 11:54:51 UTC
I said that name resolving works on in inst-sys.

But the target directory has no resolv.conf.
So I assume its currently not well defined how name resolving should be done inside the target chroot when mkinitrd creates the initrd with nfsroot support.
install.inf states that dhcp was used, but mkinitrd falls back to static ip for some reason.
Comment 8 Steffen Winterfeldt 2008-05-13 13:08:24 UTC
then it's not linuxrc
Comment 9 Michal Zugec 2008-05-13 13:19:16 UTC
>> But for some reason, mkinitrd did fall back to static interface configuration.

then reassigned to mkinitrd maintainer
Comment 10 Olaf Hering 2008-05-15 07:12:55 UTC
f200 is currently at the end of first stage, 11.0beta3-i386.

I havent verified if mkinitrd did the right thing.
booted from dvd with netsetup=1, nfsroot is boettger.suse.de:/data/inst/nfs/110b3-i386
Comment 11 Olaf Hering 2008-05-15 10:57:23 UTC
tested with beta3 on snowberry, js20:




...

preping 03-storage.sh
running 03-storage.sh
preping 04-udev.sh
running 04-udev.sh
Creating device nodes with udev
tg3.c:v3.91 (April 18, 2008)
PCI: Enabling device 0000:11:01.0 (0140 -> 0142)
eth0: Tigon3 [partno(none) rev 2003 PHY(serdes)] (PCIX:133MHz:64-bit) 1000Base-SX Ethernet 00:0d:60:1e:cc:f4
eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] WireSpeed[0] TSOcap[0]
eth0: dma_rwctrl[769f4000] dma_mask[64-bit]
PCI: Enabling device 0000:11:01.1 (0140 -> 0142)
eth1: Tigon3 [partno(none) rev 2003 PHY(serdes)] (PCIX:133MHz:64-bit) 1000Base-SX Ethernet 00:0d:60:1e:cc:f5
eth1: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[0] TSOcap[1]
eth1: dma_rwctrl[769f4000] dma_mask[64-bit]
preping 05-blogd.sh
running 05-blogd.sh
blogd: can not open pty/tty pair: No such file or directory
preping 11-network.sh
running 11-network.sh
FATAL: Module af_packet not found.
[NETWORK] using interface eth1
[NETWORK] using static config based on ip=10.10.2.220::10.10.0.8:255.255.0.0:snowberry:eth1:none
Ignoring mode none, using static configuration
preping 11-usb.sh
running 11-usb.sh
preping 21-devinit_done.sh
running 21-devinit_done.sh
preping 21-nfs.sh
running 21-nfs.sh
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
preping 81-kdump.sh
running 81-kdump.sh
preping 82-resume.userspace.sh
running 82-resume.userspace.sh
preping 83-resume.kernel.sh
running 83-resume.kernel.sh
preping 84-mount.sh
running 84-mount.sh
Mounting root whortleberry.suse.de:/nfsroot/110b3-ppc
mount.nfs: can't get address for whortleberry.suse.de

could not mount root filesystem -- exiting to /bin/sh
$ tg3: eth1: Link is up at 1000 Mbps, full duplex.
tg3: eth1: Flow control is off for TX and off for RX.
Comment 12 Olaf Hering 2008-05-15 10:58:56 UTC
and before that:

...Freeing unused kernel memory: 324k freed
doing fast boot
mount used greatest stack depth: 11792 bytes left
mknod used greatest stack depth: 11088 bytes left
boot/02-start.sh: line 70: cmd_--login=--login: command not found
SCSI subsystem initialized
libata version 3.00 loaded.
pata_amd 0000:00:04.1: version 0.3.10
scsi0 : pata_amd
scsi1 : pata_amd
ata1: PATA max UDMA/133 cmd 0x17400 ctl 0x16c00 bmdma 0x17c00 irq 17
ata2: PATA max UDMA/133 cmd 0x17800 ctl 0x17000 bmdma 0x17c08 irq 17
ata1.00: ATA-6: TOSHIBA MK6026GAXB, PB204E, max UDMA/100
ata1.00: 117210240 sectors, multi 16: LBA
ata1.00: limited to UDMA/33 due to 40-wire cable
ata1.00: configured for UDMA/33
RTAS: event: 44, Type: Unknown, Severity: 2
scsi 0:0:0:0: Direct-Access     ATA      TOSHIBA MK6026GA PB20 PQ: 0 ANSI: 5
modprobe used greatest stack depth: 8976 bytes left
....

$ cat /proc/cmdline 
debug panic=12 sysrq=1 init=/bin/bash --login  
$ 

nothing past init= can be a kernel cmdline option. 
everything past init= is passed as option to init
Comment 13 Hannes Reinecke 2008-05-21 13:05:47 UTC
Created attachment 217251 [details]
ignore-args-after-init=

Ignore all commandline arguments after 'init='.
Comment 14 Hannes Reinecke 2008-05-23 07:27:23 UTC
Submitted updated mkinitrd rpm to autobuild.
Comment 15 Olaf Hering 2008-06-02 16:32:17 UTC
still not fixed with current factory.

if rootdev=boettger:/nfsroot/factory, boettger cant be resolved (appearently).
Maybe dhcpcd should be ran with the -M option
Comment 16 Olaf Hering 2008-06-02 16:40:32 UTC
I see that mount.nfs is missing, and also /etc/resolv.conf is not created during boot.

boettger:/data/inst/nfs/factory/tmp/x # cat ../../var/log/YaST2/y2logmkinitrd 

Kernel image:   /boot/vmlinuz-2.6.25.4-8-pae
Initrd image:   /boot/initrd-2.6.25.4-8-pae
Kernel Modules: processor thermal dock scsi_mod libata ata_piix fan edd af_packet tg3 usbcore ohci-hcd uhci-hcd ehci-hcd ff-memless hid usbhid sunrpc nfs_acl lockd nfs 
Features:       network usb nfs resume.userspace resume.kernel
21880 blocks
boettger:/data/inst/nfs/factory/tmp/x # find . -name "*mount*"
./bin/mount
./bin/umount
./boot/85-remount.sh
./boot/84-mount.sh
./sbin/mount.nfs
./config/mount.sh
boettger:/data/inst/nfs/factory/tmp/x # find . -name "*resolv*"
./lib/libresolv.so.2
./lib/libresolv-2.8.so
boettger:/data/inst/nfs/factory/tmp/x # 
Comment 17 Olaf Hering 2008-06-05 09:27:45 UTC
dhcpcd was called with wrong options, -p is missing for example
resolv.conf creation fails because the dhcpcd info fileformat changed, IFS should be a space instead of a comma.
There may be more bugs to resolv to get nfsroot finally working.
Comment 18 Stephan Kulow 2008-06-05 10:07:01 UTC
no idea when nfsroot became ship stopper for openSUSE. Possibly for sle11
Comment 19 Olaf Hering 2008-06-05 13:57:35 UTC
Created attachment 220455 [details]
mkinitrd.nfsroot.patch

nss files missing, dhcpcd info file format changed, dhcpcd path never taken, dhcp timeout too short (not configureable)
Comment 20 Hannes Reinecke 2008-06-06 11:41:19 UTC
Updated mkinitrd rpm submitted to STABLE.
Comment 21 Hannes Reinecke 2008-06-11 08:31:58 UTC
*** Bug 398558 has been marked as a duplicate of this bug. ***
Comment 22 Hannes Reinecke 2008-06-26 06:49:30 UTC
Actually, init= does _not_ terminate the argument parsing. At least not for the normal kernel. So introducing that in our initrd would be incompatible behaviour.
Thus reverting the change.
Comment 23 Hannes Reinecke 2008-06-26 06:56:02 UTC
The init= issue will be tracked in bug #403995.
Comment 24 Hannes Reinecke 2008-07-14 08:45:59 UTC
*** Bug 406493 has been marked as a duplicate of this bug. ***