# mount is segfaulting on boot

## Nullsleep

after an "emerge -av @world" mount has been segfaulting on boot and only on boot as once the system is up i can type mount -a and it mounts every thing in fstab fine... i have rebuild until-linux and that hasnt fixed it, any one got any ideas what it could be? if you need any more info just say and i will post.

thats what i get in /var/log/messages

```
mount[4056]: segfault at 0 ip 00007fe7477bd972 sp 00007fff25130b48 error 4 in libc-2.11.2.so[7fe747741000+150000]
```

FSTAB:

```
# /etc/fstab: static file system information.

#

# The root filesystem should have a pass number of either 0 or 1.

# All other filesystems should have a pass number of 0 or greater than 1.

#

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

#

# See the manpage fstab(5) for more information.

#

# <fs>         <mountpoint>   <type>      <opts>      <dump/pass>

/dev/sda7      none      swap      sw       0 0

/dev/sda2      /boot      ext2      noauto,noatime    0 3

/dev/sda5      /      ext4      noatime       0 1

/dev/sda8      /home      ext4      noatime       0 2

/dev/sda6      /usr/portage   btrfs      noatime,compress 0 4

tmpfs         /home/user/RAM tmpfs   uid=user,size=1024m

#qemu to work

binfmt_misc       /proc/sys/fs/binfmt_misc/ binfmt_misc
```

----------

## Nullsleep

just rebooted so i can take note of what comes up and here are the errors:

```
/etc/init.d/localmount: line 16: 3907 Segmantation fault mount -at "$types" $no_netdev
```

```
/etc/init.d/netmount: line 42: 4197 Segmantation fault mount -a -O _netdev
```

localmount from line 15:

```
start()

{

        # Mount local filesystems in /etc/fstab.

        local types="noproc" x= no_netdev=

        for x in $net_fs_list; do

                types="${types},${x}"

        done

        if [ "$RC_UNAME" = Linux ]; then

                no_netdev="-O no_netdev"

        fi

        ebegin "Mounting local filesystems"

        mount -at "$types" $no_netdev

        eend $? "Some local filesystem failed to mount"

        # Always return 0 - some local mounts may not be critical for boot

        return 0

}
```

this is netmount from line 41

```
start()

{

        local myneed= myuse= pmap="portmap" nfsmounts=

        [ -x /etc/init.d/rpcbind ] && pmap="rpcbind"

        local x= fs= rc=

        for x in $net_fs_list; do

                case "$x" in

                        nfs|nfs4)

                        # If the nfsmount script took care of the nfs

                        # filesystems, then there's no point in trying

                        # them twice

                        service_started nfsmount && continue

                        # Only try to mount NFS filesystems if portmap was

                        # started. This is to fix "hang" problems for new

                        # users who do not add portmap to the default runlevel.

                        if need_portmap && ! service_started "$pmap"; then

                                continue

                        fi

                        ;;

                esac

                fs="$fs${fs:+,}$x"

        done

        ebegin "Mounting network filesystems"

        mount -at $fs

        rc=$?

        if [ "$RC_UNAME" = Linux ]; then

                mount -a -O _netdev

                rc=$?

        fi

        ewend $rc "Could not mount all network filesystems"

        return 0

}
```

----------

## Nullsleep

removing tmpfs and binfmt_misc has stopped it segfaulting

----------

## Hu

Perhaps it reacted badly to your malformed fstab entry for binfmt_misc.

----------

## Nullsleep

 *Hu wrote:*   

> Perhaps it reacted badly to your malformed fstab entry for binfmt_misc.

 

its been working find with it like that, how is it ment to be?

----------

## Hu

 *Nullsleep wrote:*   

> its been working find with it like that, how is it ment to be?

 

```
# <fs>         <mountpoint>   <type>      <opts>      <dump/pass>
```

You are missing both opts and dump/pass.  Your tmpfs also misses the dump/pass, so if missing fields are a problem, it is probably the missing opts.  If this fixes it, please file a bug to have the fstab parsing code improved.

----------

