Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 07 Jan 2018 02:30:35 +0000
From:      Ben Woods <woodsb02@gmail.com>
To:        Per Gunnarsson <p.gunnarsson@yahoo.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: mount -a problem with /etc/fstab
Message-ID:  <CAOc73CAz4SVTXFUV3crs5%2Bpisbe4RoiC2Z6ON=TuwV3KJKTQbw@mail.gmail.com>
In-Reply-To: <35571809-560c-1bbd-376f-45e59789e6cc@yahoo.com>
References:  <35571809-560c-1bbd-376f-45e59789e6cc@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 6 Jan 2018 at 3:50 am, Per Gunnarsson via freebsd-questions <
freebsd-questions@freebsd.org> wrote:

> When I try mount -a I get:
>
> fstab: /etc/fstab:9: Inappropriate file type or format
> fstab: /etc/fstab:10: Inappropriate file type or format
>
> My fstab below:
>
>
> /dev/ada0p2     /               ufs     rw      1       1
> /dev/ada0p3     none            swap    sw      0       0
> /dev/ada0p4     /tmp            ufs     rw      2       2
> /dev/ada0p5     /var            ufs     rw      2       2
> /dev/ada0p6     /usr            ufs     rw      2       2
> /dev/ada0p7     /home           ufs     rw      2       2
>
> /dev/linux_lvm/konjak-vg-root   /debian/root ext4
> mountprog=3D/usr/local/bin/ext4fuse allow_other,ro 0 0
>
> /dev/linux_lvm/konjak-vg-home   /debian/home ext4
> mountprog=3D/usr/local/bin/ext4fuse allow_other,ro 0 0
>

Whilst I am not sure about the legitimacy of these lines in general, I
believe you should have a comma instead of a space between the end of the
mountprog option and the allow_other option.

See the fstab(5) manpage:

https://man.freebsd.org/fstab

=E2=80=9Dfields on each line are separated by tabs or spaces.=E2=80=9D


=E2=80=9CThe fourth field, (*fs*_*mntops*), describes the mount options ass=
ociated with
the file system. It is formatted as a comma separated list of options. It
contains at least the type of mount (see *fs*_*type* below) plus any
additional options appropriate to the file system type. See the options
flag (*-o*) in the mount(8)
<https://www.freebsd.org/cgi/man.cgi?query=3Dmount&sektion=3D8&apropos=3D0&=
manpath=3DFreeBSD+11.1-RELEASE+and+Ports>
page and the file system specific page, such as mount_nfs(8)
<https://www.freebsd.org/cgi/man.cgi?query=3Dmount_nfs&sektion=3D8&apropos=
=3D0&manpath=3DFreeBSD+11.1-RELEASE+and+Ports>,
for additional options that may be specified. All options that can be given
to the file system specific mount commands can be used in *fstab* as well.
They just need to be formatted a bit differently. The arguments of the *-o*
option can be used without the preceding *-o* flag. Other options need both
the file system specific flag and its argument, separated by an equal sign.


For example, mounting an msdosfs(5)
<https://www.freebsd.org/cgi/man.cgi?query=3Dmsdosfs&sektion=3D5&apropos=3D=
0&manpath=3DFreeBSD+11.1-RELEASE+and+Ports>
filesystem, the options

    -o sync -o noatime -m 644 -M 755 -u foo -g bar

should be written as

    sync,noatime,-m=3D644,-M=3D755,-u=3Dfoo,-g=3Dbar

in the option field of *fstab*.=E2=80=9D

Regards,
Ben
--=20

--
From: Benjamin Woods
woodsb02@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOc73CAz4SVTXFUV3crs5%2Bpisbe4RoiC2Z6ON=TuwV3KJKTQbw>