FS#18370 - [mkinitcpio] PXE nfs boot fail with busybox

Attached to Project: Arch Linux
Opened by Cedric Bellegarde (gnumdk) - Wednesday, 17 February 2010, 12:32 GMT
Last edited by Thomas Bächler (brain0) - Friday, 19 February 2010, 17:30 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Aaron Griffin (phrakture)
Thomas Bächler (brain0)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Since migration to busybox, i can't get arch to boot with nfs root.

The conf is the same that klibc one.

Here logs:

connect: Network is unreachable
connect: Network is unreachable
NFS over TCP no available from 194.254.144.4
BusyBox v1.15.3 (2010-02-11 ...) ...
Usage: switch_root [-c /dev/console] NEW_ROOT NEW_INIT [ARGS]
Kernel panic - not syncing: Attempt to kill init!
This task depends upon

Closed by  Thomas Bächler (brain0)
Friday, 19 February 2010, 17:30 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in upcoming 0.6.3.
Comment by Thomas Bächler (brain0) - Wednesday, 17 February 2010, 13:23 GMT
Please give your HOOKS line from mkinitcpio.conf.
Comment by Cedric Bellegarde (gnumdk) - Wednesday, 17 February 2010, 13:32 GMT
MODULES="nfs"
HOOKS="base net udev autodetect pata scsi sata filesystems"

This works if i downgrade mkinitcpio (klibc) and fail with current package.
Comment by Tobias Powalowski (tpowa) - Wednesday, 17 February 2010, 13:34 GMT
hrm is adding net in front of udev a good idea? try adding it later.
Comment by Thomas Bächler (brain0) - Wednesday, 17 February 2010, 13:37 GMT
In the old initramfs, the "net" hook had no runtime hook. In the new initramfs, the network setup happens inside the "net" runtime hook. Thus, it must be added after the udev hook so that the network interface will be properly initialized. In that sense, this is not a bug but misconfiguration.

This incompatibility to the old versions is a minor problem, but should probably be documented somewhere, suggestions?
Comment by Cedric Bellegarde (gnumdk) - Wednesday, 17 February 2010, 15:29 GMT
Same with net after udev...

But i can now see some others errors ;)

ipconfig: dhcp: SIOCGIFINDEX: No such device
ipconfig: no devices to configure
Ip-Config: /
Ip-Config: gw: dns0: dns1:
NFS-Mount: 194.254.144.4:/var/lib/tftpboot/clone
Comment by Thomas Bächler (brain0) - Wednesday, 17 February 2010, 16:06 GMT
That is weird. I definitely have seen this before and moving the net hook after udev fixed it all, it basically worked exactly as before the change. Can you boot with break=y, look what ifconfig says and run 'ipconfig "$ip"' manually there?
Comment by Cedric Bellegarde (gnumdk) - Thursday, 18 February 2010, 08:31 GMT
In ramfs, i've got this:

$ ipconfig 192.168.0.133
ipconfig: 192.168.0.133: SIOCGIFINDEX: No such device

I fix the problem editing net hooks and replace ipconfig {$ip} with:

ipconfig -c dhcp eth0

So, net hooks should:
- detect available network interface
- configuration type (dhcp, static, bootp)

and run ipconfig -c $proto $interface for dhcp
or run ipconfig $interface $ip for static

Comment by Thomas Bächler (brain0) - Thursday, 18 February 2010, 08:39 GMT
Can you give me your complete command line? If I understand this correctly, the ip= option should contain all info needed, including interface name and whether to use dhcp, and furthermore, the options should be compatible with the standard kernel options as well as the old klibc options.
Comment by Cedric Bellegarde (gnumdk) - Thursday, 18 February 2010, 08:55 GMT
append initrd=clone/boot/kernel26.img rootfstype=nfs root=/dev/nfs nfsroot=194.254.144.4:/var/lib/tftpboot/clone,v3,rsize=16384,wsize=16384 ip=dhcp

Comment by Thomas Bächler (brain0) - Thursday, 18 February 2010, 09:27 GMT
I see. The "ip=dhcp" syntax was probably supported by kinit, but never documented in mkinitcpio -H net. I looked into this earlier, and this should work with
ipconfig "ip=$ip"
instead of
ipconfig "$ip"
Can you test this?

However, the way it is documented is: ip=:::::eth0:dhcp
Comment by Cedric Bellegarde (gnumdk) - Thursday, 18 February 2010, 10:44 GMT
ipconfig ip=${ip} fix the bug.
Comment by Thomas Bächler (brain0) - Thursday, 18 February 2010, 12:24 GMT
If I see read the source code right, this should also work for the other cases.
Comment by Thomas Bächler (brain0) - Thursday, 18 February 2010, 19:24 GMT

Loading...