Mount NFS under Haiku

I have a Linux host, NFS has been configured as

/root *(rw,sync,no_subtree_check,insecure)

Local self-mount works, also it works under a VirtualBox guest Solaris.
However in - also VBox guest - Haiku, when i give the command:

mount_nfs /mnt/nfs 100 1000

i get:

mount failed (General system error)

in the console and

KERN: nfs: mount(9, <NULL>, 00000000)
KERN: nfs: nfs_params: nfs:,uid=100,gid=1000,hostname=shredder
KERN: nfs:ip!
KERN: nfs:hn!
KERN: nfs:uid!
KERN: nfs:gid!
KERN: nfs: ip:c0a80a64 server:'' export:'/root' hostname:'shredder' uid=100 gid=1000 
KERN: nfs: mountd at 640aa8c0:41059
KERN: nfs: nfsd at 640aa8c0:2049
KERN: nfs: RPC_PROG_MISMATCH (3,4)nfs: error in nfs_mount: General system error

in /var/log/syslog. It’s Haiku Beta 2.

1 Like

Please put bug reports on the bug tracker under

Okay, but is it a bug? I don’t want to fill your tracker with bogus entries. Maybe i just configured something erroneously or something.

even if you misconfigure something, generall system error is too unspecific to figure out (as a user) what went wrong, so this can likely be improved anyhow.

If it is a user error the ticket can just be closed, which is fine too, but bug reports on the forum usually tend to get lost.

I don’t usually use the mount_nfs command. Maybe you should try NFS4 with the regular mount command, like mount -t nfs4 server:/share /mntpnt

1 Like

I always get a “no such file or directory” message when I try mount. And I never know what it’s talking about because the directories (remote and local) do, in fact, exist.

I never got NFS mount to work, no matter if v3, v4 and whatever server. NFS just doesn’t work under Haiku. Gave up on it.

I tried to

mount -t nfs4 /mnt/nfs

and all i got is

mount: No such file or directory

Exactly as it happened to MrEntropy. I tried to use -t nfs3 too.

I’ve created a ticket.

mount_nfs is for nfs v2. mount -t nfs4 is what you want, however it has a few bugs still.
Also checkł_dziepak/2013-03-15_nfsv4_client_finally_merged/


So, the correct method was to use the -p flag.

mount -t nfs4 -p /mnt/nfs

That worked and the NFS device has been mounted. This is why i did not wanted to create a bug ticket.

However, it is really buggy. It can create and delete files, but i delete a file from the other side and then try to echo into it, then it crashes the entire system:


Check if it has been already reported!closed&component=File+Systems%2FNFS4

Does not seem so. I’ve changed the bugreport, except for the title. By the way, thank you for the manual page, that helped.

1 Like

I tried the command with the -p flag, as
mount -t nfs4 -p /boot/home/Desktop/partilha_casa/

but get mount: Invalid Argument

Is there anything missing after the -p that should be there?

1 Like

I don’t see any missing part…

Try putting quotes around the -p value: -p ""

Below are the scripts that I use to access to my NFS. Edit the MOUNT_POINT, NFS_SERVER, and NFS_PATH to suit your needs. Hope it helps.




if [ ! -d "$MOUNT_POINT" ]
	mkdir "$MOUNT_POINT"
	unmount "$MOUNT_POINT" 2> /dev/null

mount -t nfs4 -p "$NFS" "$MOUNT_POINT"





unmount "$MOUNT_POINT"

if [ -d "$MOUNT_POINT" ]
	rm -rf "$MOUNT_POINT"


The command

mount_nfs /boot/home/nfs_music 500 1000

works for my NAS.
It would be nice to use the command

mount -ro -t nfs4 -p “” /boot/home/nfs_music

to use the read-only option. But I receive the “Invalid Argument” Error too.

~> mount -ro -t nfs4 -p “” /boot/home/nfs_music
mount: Invalid Argument

Any ideas which argument is invalid?

Ugh, I hate errors like that…we might do that a bit too often in our command-line tools.

I think all your command-line arguments are supported but this error comes up when the actual fs_mount_volume is called. One nice thing about Haiku is that it isn’t too hard to find the source for things:

I don’t personally know a lot about this function but I would suspect that it either doesn’t like nfs4 as the file system type or it doesn’t like the parameters “”. You aren’t actually using smart quotes in the command are you?

I don’t see a bug related to this but NFS4 does seem to cause a lot of KDLs :frowning:

I do not have a system to test this right now, but does that mount version supports the “-ro” command written that way ?

At work, all the *nix and linuxes seem to require “-o ro” , so much that it has become something on auto-pilot to type mount -o ro -t ntfs …

You should check /var/log/syslog for messages. The nfs4 addon does log some things there. I have no problem mounting shares as read-only using the same syntax you have used.

1 Like