Schwemmlandebene Posted March 10, 2016 Posted March 10, 2016 There's a typo in nfs-boot.cmd.template, line 9. s/nfsroot={nfs_root}/nfsroot=${nfs_root}/ Nevertheless thanks for the template. Regards, Steve
Schwemmlandebene Posted March 13, 2016 Author Posted March 13, 2016 There are two more typos/errors. U-Boot struggles about the if statement in line 12. syntax error Unknown command '' [two single quotes] - try 'help' U-Boot boots after commenting out the 3 lines beginning with 'if', 'else' and 'fi'. The 2nd typo came with the latest commit, line 6. /s/tty1/ttyS1/ PS: Debian Jessie next Edit: 'line 12' added.
zador.blood.stained Posted March 13, 2016 Posted March 13, 2016 The 2nd typo came with the latest commit, line 6. /s/tty1/ttyS1/ That's not a typo, tty1 is display, ttyS0 is serial port U-Boot struggles about the if statement in line 12. syntax error Unknown command '' [two single quotes] - try 'help' U-Boot boots after commenting out the 3 lines beginning with 'if', 'else' and 'fi'. This template was made for mainline u-boot 2016.01 and syntax was tested with cubietruck config (I'll re-check it again later). It may not work for other (older) u-boot versions, but in any case NFS boot support is in early development stage, so suggestions and feedback are welcome.
Schwemmlandebene Posted March 14, 2016 Author Posted March 14, 2016 That's not a typo, tty1 is display, ttyS0 is serial port Ok, you're right, sorry. This template was made for mainline u-boot 2016.01 and syntax was tested with cubietruck config (I'll re-check it again later). It may not work for other (older) u-boot versions, but in any case NFS boot support is in early development stage, so suggestions and feedback are welcome. A missing 'then' fixes the syntax error for my Banana Pi M2, u-boot 2016.01. if ext4load mmc 0 0x00000000 .next || fatload mmc 0 0x00000000 .next then ext4load mmc 0 ${fdt_addr_r} /dtb/${fdtfile} || fatload mmc 0 ${fdt_addr_r} /dtb/${fdtfile} ext4load mmc 0 ${kernel_addr_r} zImage || fatload mmc 0 ${kernel_addr_r} zImage setenv fdt_high ffffffff bootz ${kernel_addr_r} - ${fdt_addr_r} else ... Could you log in or ssh into your cubietruck? On the BPi-M2 it's not possible. Debian GNU/Linux 8 bananapim2 ttyS0 bananapim2 login: root Debian GNU/Linux 8 bananapim2 ttyS0 bananapim2 login: fakeuser Password: The password request is missing. With a fake user name a password is requested, but of course without success.
zador.blood.stained Posted March 14, 2016 Posted March 14, 2016 A missing 'then' fixes the syntax error for my Banana Pi M2, u-boot 2016.01. Ah, yes. Thanks, will fix this. Could you log in or ssh into your cubietruck? On the BPi-M2 it's not possible. Debian GNU/Linux 8 bananapim2 ttyS0 bananapim2 login: root Debian GNU/Linux 8 bananapim2 ttyS0 bananapim2 login: fakeuser Password: The password request is missing. With a fake user name a password is requested, but of course without success. Tested yesterday with Ubuntu Xenial desktop target on cubietruck, worked like a charm. I believe @tkaiser tested some OS releases with an Orange Pi PC too. Please check syslog on your build host for NFS related errors or warnings, because this error might indicate wrong network configuration or NFS errors. BTW, did you use mainline or legacy kernel? Edit: sorry, was distracted by that thread and thought that you tested FEL boot too. Please try commenting out or removing eth0 related entries from /etc/network/interfaces on your NFS rootfs (this will be fixed in new build script versions, but you'll need to tweak already created rootfs anyway). And check that your NFS export options look like this: rw,async,no_subtree_check,no_root_squash
Schwemmlandebene Posted March 14, 2016 Author Posted March 14, 2016 zador, thanks again for your great help. Following your advice solves the problem. The missing no_root_squash parameter has caused a lot of trouble. Now I'm investigating if NFS Root implies infinite dhcp leases and if it's mandatory to not use dhcp in /etc/network/interfaces or if it is allowed to use dhclient to renew the leases.
zador.blood.stained Posted March 14, 2016 Posted March 14, 2016 Now I'm investigating if NFS Root implies infinite dhcp leases and if it's mandatory to not use dhcp in /etc/network/interfaces or if it is allowed to use dhclient to renew the leases. The problem is - network configuration is done by kernel at early boot (kernel built-in DHCP client in this case), so leaving userspace network configuration for this interface enabled may lead to a conflict, especially on shutdown. I think it (kernel) should deal with lease time correctly. If you need (or DHCP doesn't work as intended), you can use manual network configuration.
Schwemmlandebene Posted March 14, 2016 Author Posted March 14, 2016 The problem is - network configuration is done by kernel at early boot (kernel built-in DHCP client in this case) Yes, dhcpd logs the appropriate messages. so leaving userspace network configuration for this interface enabled may lead to a conflict, especially on shutdown. Sounds reasonable. ifdown eth0, etc. shoud not be run during shutdown. I think it (kernel) should deal with lease time correctly. Seems to me that it doesn't. The lease time has already ended, but the client is still reachable and ssh works AFAIK the DHCP protocol demands a client must not use an ip address after the lease period has ended. A client should delete the address and should begin broadcasting DHCPDISCOVER messages. (To avoid this it requests its address from time to time.) If you need (or DHCP doesn't work as intended), you can use manual network configuration. I must and want use DHCP. I will have a look at this topic later on.
zador.blood.stained Posted March 14, 2016 Posted March 14, 2016 I searched through documentation again, it seems that there should be an entry like this in /etc/network/interfaces iface eth0 inet manual
Schwemmlandebene Posted March 14, 2016 Author Posted March 14, 2016 https://help.ubuntu.com/community/DisklessUbuntuHowtorecommends this too. In which documentation did you search? Do you have an "official" link or is it distro related like the link above?
zador.blood.stained Posted March 16, 2016 Posted March 16, 2016 I found different links with different instructions, though not all of them are applicable in our case (we don't use TFTP or initrd). I'll check if "manual" entry is enough to launch userspace DHCP server and if it's not - what else is needed to achieve this.
Recommended Posts