Skip to contentSkip to conversation

NFS boot - could not open /.tftp_tmp_path

DISCUSSION Sam Ravnborg 3 participants 6 messages Aug 9, 2018 – Aug 10, 2018

lore
Share & tools
lore
#0 lore raw

Hi all.

I try to boot my target using NFS - but something does not work. I have a server (192.168.86.201) where I have exported an nfs mount like this:

$ sudo exportfs
/nfsboot/arm9   <world>
$ cat /etc/exports.d/nfsboot.exports
/nfsboot/arm9        *(insecure,no_subtree_check,no_root_squash,rw,nohide)

On my barebox target I can then mount the nfs like this:
barebox: mkdir /mnt
barebox: /mnt/nfs
barebox: mount -t nfs 192.168.86.201:/nfsboot/arm9

barebox: mount
none on / type ramfs
none on /dev type devfs
192.168.86.201:/nfsboot/arm9 on /mnt/nfs type nfs

barebox: ls /mnt/nfs <= shows the file I have on the server

Then when I try to boot from nfs I get the following output:

barebox: boot nfs://192.168.86.201/nfsboot/arm9/
eth0: DHCP client bound to address 192.168.86.20
T T T T T T T T T T T T T T could not open /.tftp_tmp_path/zImage-at91sam9263ek

When I grep the barebox source I can only find 'tftp_tmp_path' in some tftp code.

It looks like it somehow revert back to tftp despite I have specified nfs. I hope there is something trivial I do wrong.

Any hints?

Sam

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#1 lore raw

Hi Sam,

Quoted 18 lines · Sam Ravnborg

I try to boot my target using NFS - but something does not work. I have a server (192.168.86.201) where I have exported an nfs mount like this:

$ sudo exportfs
/nfsboot/arm9   <world>
$ cat /etc/exports.d/nfsboot.exports
/nfsboot/arm9        *(insecure,no_subtree_check,no_root_squash,rw,nohide)

On my barebox target I can then mount the nfs like this:
barebox: mkdir /mnt
barebox: /mnt/nfs
barebox: mount -t nfs 192.168.86.201:/nfsboot/arm9

barebox: mount
none on / type ramfs
none on /dev type devfs
192.168.86.201:/nfsboot/arm9 on /mnt/nfs type nfs

Quoted 5 lines

barebox: ls /mnt/nfs <= shows the file I have on the server

Then when I try to boot from nfs I get the following output:

barebox: boot nfs://192.168.86.201/nfsboot/arm9/

you already have the slash separating the host part of the URL and the path part, but you missed the slash that is needed at the beginning of the absolute path:

boot nfs://192.168.86.201//nfsboot/arm9/

(with a two slashes) should hopefully do the trick.

Best regards
Ulrich

Quoted 9 lines

eth0: DHCP client bound to address 192.168.86.20
T T T T T T T T T T T T T T could not open /.tftp_tmp_path/zImage-at91sam9263ek

When I grep the barebox source I can only find 'tftp_tmp_path' in some tftp code.

It looks like it somehow revert back to tftp despite I have specified nfs. I hope there is something trivial I do wrong.

Quoted 8 lines

Any hints?

Sam

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

--

Pengutronix e.K.                           | Ulrich Ölmann               |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#2 lore raw

Hi Ulrich

Quoted 11 lines
Quoted 3 lines

Then when I try to boot from nfs I get the following output:

barebox: boot nfs://192.168.86.201/nfsboot/arm9/

you already have the slash separating the host part of the URL and the path part, but you missed the slash that is needed at the beginning of the absolute path:

boot nfs://192.168.86.201//nfsboot/arm9/

(with a two slashes) should hopefully do the trick.

Hmm, no luck:
barebox:/ boot nfs://192.168.86.201//nfsboot/arm9/
eth0: DHCP client bound to address 192.168.86.20
T T T T T T T T T T T T T T could not open /.tftp_tmp_path/zImage-at91sam9263ekt

barebox:/ boot nfs://192.168.86.201//nfsboot/arm9
eth0: DHCP client bound to address 192.168.86.20
T T T T T T T T T T T T T T could not open /.tftp_tmp_path/zImage-at91sam9263ekt

I will try to add some debugging and see whats going on.

Sam

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#3 lore raw
Quoted 18 lines · Sam Ravnborg

Hi Ulrich

Quoted 11 lines
Quoted 3 lines

Then when I try to boot from nfs I get the following output:

barebox: boot nfs://192.168.86.201/nfsboot/arm9/

you already have the slash separating the host part of the URL and the path part, but you missed the slash that is needed at the beginning of the absolute path:

boot nfs://192.168.86.201//nfsboot/arm9/

(with a two slashes) should hopefully do the trick.

Hmm, no luck:
barebox:/ boot nfs://192.168.86.201//nfsboot/arm9/
eth0: DHCP client bound to address 192.168.86.20
T T T T T T T T T T T T T T could not open /.tftp_tmp_path/zImage-at91sam9263ekt

Quoted 5 lines

barebox:/ boot nfs://192.168.86.201//nfsboot/arm9
eth0: DHCP client bound to address 192.168.86.20
T T T T T T T T T T T T T T could not open /.tftp_tmp_path/zImage-at91sam9263ekt

I will try to add some debugging and see whats going on.

Do you see anything of interest in the server's log?

Signature · 9 lines
Pengutronix e.K.                           | Ulrich Ölmann               |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw

Hi Ulrich.

Quoted 18 lines
Quoted 18 lines

Hi Ulrich

Quoted 11 lines
Quoted 3 lines

Then when I try to boot from nfs I get the following output:

barebox: boot nfs://192.168.86.201/nfsboot/arm9/

you already have the slash separating the host part of the URL and the path part, but you missed the slash that is needed at the beginning of the absolute path:

boot nfs://192.168.86.201//nfsboot/arm9/

(with a two slashes) should hopefully do the trick.

Hmm, no luck:
barebox:/ boot nfs://192.168.86.201//nfsboot/arm9/
eth0: DHCP client bound to address 192.168.86.20
T T T T T T T T T T T T T T could not open /.tftp_tmp_path/zImage-at91sam9263ekt

Quoted 7 lines
Quoted 5 lines

barebox:/ boot nfs://192.168.86.201//nfsboot/arm9
eth0: DHCP client bound to address 192.168.86.20
T T T T T T T T T T T T T T could not open /.tftp_tmp_path/zImage-at91sam9263ekt

I will try to add some debugging and see whats going on.

Do you see anything of interest in the server's log?

I got it working, using a slighly different approach.

I now have:

barebox: cat /env/init/automount
#!/bin/sh

mkdir -p /mnt/nfs
automount -d /mnt/nfs 'ifup -a && mount -t nfs 192.168.86.201:/nfsboot/arm9 /mnt/nfs'

barebox: cat /env/boot/nfs
#!/bin/sh

nfsdir="/mnt/nfs"

global.bootm.image="${nfsdir}/boot/zImage"

nfsroot="192.168.86.201:/nfsboot/arm9"

global.linux.bootargs.base="rw rootwait init=/usr/bin/system-init.sh" global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=${nfsroot},v3,tcp"

Then I can nfsboot my kernel using "boot nfs"

The solution has my NFS server IP IP hardcoded as the NFS server IP is not the same as the DHCP IP, so no way to find it automagically.

In the linux kernel I also selected NFS + NFS boot to make it work.

With the above I have something that do what I need - good!

Thanks for the help/hints.

Sam

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#5 lore raw
Quoted 53 lines · Sam Ravnborg

Hi Ulrich.

Quoted 18 lines
Quoted 18 lines

Hi Ulrich

Quoted 11 lines
Quoted 3 lines

Then when I try to boot from nfs I get the following output:

barebox: boot nfs://192.168.86.201/nfsboot/arm9/

you already have the slash separating the host part of the URL and the path part, but you missed the slash that is needed at the beginning of the absolute path:

boot nfs://192.168.86.201//nfsboot/arm9/

(with a two slashes) should hopefully do the trick.

Hmm, no luck:
barebox:/ boot nfs://192.168.86.201//nfsboot/arm9/
eth0: DHCP client bound to address 192.168.86.20
T T T T T T T T T T T T T T could not open /.tftp_tmp_path/zImage-at91sam9263ekt

Quoted 7 lines
Quoted 5 lines

barebox:/ boot nfs://192.168.86.201//nfsboot/arm9
eth0: DHCP client bound to address 192.168.86.20
T T T T T T T T T T T T T T could not open /.tftp_tmp_path/zImage-at91sam9263ekt

I will try to add some debugging and see whats going on.

Do you see anything of interest in the server's log?

I got it working, using a slighly different approach.

I now have:

barebox: cat /env/init/automount
#!/bin/sh

mkdir -p /mnt/nfs
automount -d /mnt/nfs 'ifup -a && mount -t nfs 192.168.86.201:/nfsboot/arm9 /mnt/nfs'

barebox: cat /env/boot/nfs
#!/bin/sh

nfsdir="/mnt/nfs"

global.bootm.image="${nfsdir}/boot/zImage"

nfsroot="192.168.86.201:/nfsboot/arm9"

global.linux.bootargs.base="rw rootwait init=/usr/bin/system-init.sh" global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=${nfsroot},v3,tcp"

Then I can nfsboot my kernel using "boot nfs"

Quoted 8 lines

The solution has my NFS server IP IP hardcoded as the NFS server IP is not the same as the DHCP IP, so no way to find it automagically.

In the linux kernel I also selected NFS + NFS boot to make it work.

With the above I have something that do what I need - good!

Thanks for the help/hints.

Nevertheless I would be interested why the original approach did not work since that would be the preferred one.

Do you have bootloader spec enabled in barebox and do you also have a bootloader spec config file on the root NFS?

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox