Skip to contentSkip to conversation

Buildroot root fs over NFS bug

Buildroot Jigar SOLANKI 2 participants 3 messages Jun 28, 2011 – Jun 29, 2011 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi all,

I'm trying to build a full Linux environment on a Virtex4 FPGA board. I'm actually using a sparc's clone (LEON).
I've successfully built and run the system using grmon grmon> load image.ram
grmon> run

But when it comes to mount the root filesystem over NFS, i get the following error :

...
IP-Config: Complete:

     device=eth0, addr=10.10.10.1, mask=255.255.255.0, gw=10.10.10.254,
     host=houat, domain=, nis-domain=(none),
     bootserver=10.10.10.254, rootserver=10.10.10.254, rootpath=

Freeing unused kernel memory: 5060k freed
Initializing random number generator... done.
Starting network...
ip: RTNETLINK answers: File exists
Starting NFS statd: touch: /var/lock/subsys/nfslock: No such file or directory
done
Starting NFS services: *** invalid open64 call: O_CREAT without mode ***: /usr/sbin/exportfs terminated
======= Backtrace: ========= /lib/libc.so.6(__open64_2+0x28)[0x50133790] /usr/sbin/exportfs[0x15ca8]
/usr/sbin/exportfs[0x13d90]
/usr/sbin/exportfs[0x11f3c] /lib/libc.so.6(__libc_start_main+0x10c)[0x50079674] /usr/sbin/exportfs[0x11154]
======= Memory map: ========
00010000-00019000 r-xp 000000
Welcome to Buildroot
buildroot login:

I have checked my NFS server : it works fine, i can mount after boot without any problems :
mount -o nolock -t nfs ip:path mountpoint

Any ideas please ?
Thanks a lot for your help

Signature · 10 lines
Jigar SOLANKI


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110628/7d494168/attachment.asc>
#1 lore raw

Hello,

Le Tue, 28 Jun 2011 14:27:12 +0200,
Jigar SOLANKI <[email protected]> a ?crit :

Quoted 8 lines

I'm trying to build a full Linux environment on a Virtex4 FPGA board. I'm actually using a sparc's clone (LEON).
I've successfully built and run the system using grmon grmon> load image.ram
grmon> run

But when it comes to mount the root filesystem over NFS, i get the following error :

According to the following log, you are not mounting your root filesystem over NFS.

Quoted 6 lines

...
IP-Config: Complete:

     device=eth0, addr=10.10.10.1, mask=255.255.255.0,
gw=10.10.10.254, host=houat, domain=, nis-domain=(none),
     bootserver=10.10.10.254, rootserver=10.10.10.254, rootpath=

Freeing unused kernel memory: 5060k freed

This is the last line from the kernel.

Quoted 1 line

Initializing random number generator... done.

This is the first line from the userspace initialization scripts. So I guess your root filesystem is in an initramfs.

Quoted 4 lines

Starting network...
ip: RTNETLINK answers: File exists
Starting NFS statd: touch: /var/lock/subsys/nfslock: No such file or directory

presumably the nfs-utils init script forgets to create this subsys directory.

Quoted 4 lines

done
Starting NFS services: *** invalid open64 call: O_CREAT without mode ***: /usr/sbin/exportfs terminated
======= Backtrace: =========

Quoted 8 lines

/lib/libc.so.6(__open64_2+0x28)[0x50133790] /usr/sbin/exportfs[0x15ca8] /usr/sbin/exportfs[0x13d90] /usr/sbin/exportfs[0x11f3c] /lib/libc.so.6(__libc_start_main+0x10c)[0x50079674] /usr/sbin/exportfs[0x11154]
======= Memory map: ======== 00010000-00019000 r-xp 000000

Looks like a bug in exportfs.

But if your goal is to mount a root filesystem over NFS, then the nfs-utils package is useless. The kernel contains all the necessary bits to mount a NFS filesystem as the root filesystem.

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Hello,

Please don't reply to me directly, but to the Buildroot list instead.

Le Wed, 29 Jun 2011 15:15:14 +0200,
Jigar SOLANKI <[email protected]> a ?crit :

Quoted 10 lines

Thanks a lot for the reply.
You were absolutely right, my bad, I wasnt mounting my root filesystem over NFS, it was just an initramfs.

I deactivated the initramfs support in the kernel config and it mounts just fine.

My question, just to be sure, is : why the kernel wasnt mounting it before, even if it had everything in his command line (and even if the initramfs support was activated ?) It should have mounted it, right ?

If you have an initramfs, then the kernel uncompresses it at boot time, and executes the /init script/application in this initramfs. And that's all the kernel does when an initramfs is present: it's the job of the initramfs initialization procedure to mount the real root filesystem and switch to it.

So if you have an initramfs, it's normal not to see the typical:

VFS: Mounted root (nfs filesystem) on device 0:14.

message in your boot log.

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com