# localmount errors mounting /home & usbfs [SOLVED]

## Arlo

I just upraded to gnome 2.12 by adding the needed packages to the /etc/portage/package.keywords file with the ~x86 argument, and emerging gnome.

All seams to have gone well, however after the install etc-update wanted to upgrade many of the startup scripts in /etc/init.d/ (I allowed the upgrades).

When I rebooted localmount runs:

```
Mounting local filesystems

mount: /dev/sda4 already mounted or /home busy

mount: /dev/sdb1 already mounted or /media/secondhd busy

...

mount: usbfs already mounted or /proc/bus/usb busy

mount: acording to mtab, usbfs is already mounted on /proc/bus/usb
```

However when I get into gnome /home, /media/secondhd (my second harddisk) and my usb keychain all seem to work fine.

What is causing this? I tried changing various setting in /etc/conf.d/rc. 

I don't have coldplug installed is that an issue? 

Thanks much.

-Arlo-Last edited by Arlo on Sat Jan 14, 2006 10:32 pm; edited 1 time in total

----------

## mmbrothers

Show us /etc/fstab

----------

## Arlo

my fstab looks like this"

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

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

/dev/sda1               /boot           reiserfs        noauto,noatime,notail   1 2

/dev/sda3               /               reiserfs        noatime                 0 1

/dev/sda4               /home           reiserfs        noatime                 0 1

/dev/sda2               none            swap            sw                      0 0

/dev/sdb1               /media/secondhd reiserfs        noatime,ro                      0 1

# NOTE: The next line is critical for boot!

none                    /proc           proc            defaults                0 0

none                    /dev/shm        tmpfs           defaults                0 0

/dev/hdb                /media/cdrecorder       auto    user,exec,noauto,managed 0 0

/dev/hda                /media/cdrom            auto    user,exec,noauto,managed 0 0

```

Thanks again for any help.

-Arlo-

----------

## mmbrothers

Did etc-update merge any changes to /etc/init.d/localmount?

----------

## Arlo

Yes, I think so.. I added alot of stuff to /etc/init.d/ the version of localmount I have does not have a vesion number, but that access time is yesterday (when I did the upgrade).

----------

## mmbrothers

Could you post /etc/init.d/localmount

----------

## Arlo

Below is my local mount file. I did not change any setting or remove fam/famd when I went to gnome 2.12. Should I have? does dbus and famd get along, need oneanother or conflict?

thanks.

```
#!/sbin/runscript

# Copyright 1999-2005 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

depend() {

        need checkfs

}

start() {

        # Mount local filesystems in /etc/fstab.

        ebegin "Mounting local filesystems"

        mount -at noproc,noshm,no${NET_FS_LIST// /,no} >/dev/null

        eend $? "Some local filesystem failed to mount"

        # Make sure we insert usbcore if its a module

        if [[ -f /proc/modules && ! -d /proc/bus/usb ]] ; then

                # >/dev/null to hide errors from non-USB users

                modprobe usbcore &> /dev/null

        fi

        # Check what USB fs the kernel support.  Currently

        # 2.5+ kernels, and later 2.4 kernels have 'usbfs',

        # while older kernels have 'usbdevfs'.

        local usbfs=$(grep -Fow usbfs /proc/filesystems ||

                grep -Fow usbdevfs /proc/filesystems)

        if [[ -n ${usbfs} ]] && \

           [[ -e /proc/bus/usb && ! -e /proc/bus/usb/devices ]]

        then

                ebegin "Mounting USB device filesystem (${usbfs})"

                usbgid=$(echo $(getent group usb) | awk -F: '{print $3}')

                mount -t ${usbfs} usbfs /proc/bus/usb \

                        ${usbgid:+-o devmode=0664,devgid=${usbgid}}

                eend $? "Failed to mount USB device filesystem"

        fi

        # Swap on loopback devices, and other weirdnesses

        ebegin "Activating (possibly) more swap"

        /sbin/swapon -a

        eend $?

        # Start dm-crypt mappings, if any

        start_addon dm-crypt

}

# vim:ts=4
```

----------

## Lomaxx

I am having exactly the same issues. Upgraded the same way. I have the feeling the fstab is processed twice, because of those "already mounted or ... busy"-messages and the fact, that i end up with 2 ramdisks instead of 1 which is configured in my fstab.

I think the problem is connected to the version 0.5.5.1-r2 of hal (hardware abstraction layer). Although i am a bit confused and my memory is not the best, i believe to remember, that while trying to get things straight using rev-dep-rebuild, an older version of hal was installed and with it i did not get these messages. The older hal-version i am refering to is probably the 0.4.8-version. However Gnome-2.12 needs the newer hal-version and so i decided to stick with it and get rid of the problem on some other way. There must be a way to configure the system properly.

Any hints?

----------

## Arlo

I tried removing (one by one) the lines:

```
none                    /dev/shm        tmpfs           defaults                0 0 

/dev/sda4               /home           reiserfs        noatime                 0 1 

dev/sdb1               /media/secondhd reiserfs        noatime,ro                      0 1 

```

from fstab and the partitions did not get mounted. So I am quessing that it is not mounting them twice.

Could this have to do with a kernel option, like automount?

Is hal even running at that point in the boot process?

----------

## Lomaxx

Regarding my observations: I tried downgrading to two older versions of hal. Udev has been downgraded by this each time as well. However it did not bring any change. So i guess i either remembered wrong or did something (downgraded something) else in addition. Better forget about udev and hal here. I actually was surprised myself, that hal has to do with the problem.  :Wink: 

Arlo: I still think that fstab-entries are mounted twice. If you remove an entry from fstab of course that entry is not mounted, because 0x2 (nothing mounted twice) ist still 0 (nothing).  :Wink:  I tried to remove my ramdisk-entry from fstab and was left with no ramdisk at all. After inserting the line again i had 2 ramdisks (instead of one, which would be correct) as before.Last edited by Lomaxx on Thu Dec 29, 2005 11:47 pm; edited 2 times in total

----------

## scereze

I'm having the same problem as well.

I have update my system lately using the "~x86" parameter.

I have now baselayout 1.12.0_pre12:

[ebuild     UD] sys-apps/baselayout-1.11.13-r1 [1.12.0_pre12]

Could be a possibility for this problem ?

----------

## groover

Same here.

Interesting is, that 

```
/etc/init.d/localmount restart
```

 runs well, without the error messages.

The exact errors I have:

```
 * mounting local filesystems ...

mount: /dev/hda2 already mounted or /home busy

mount: /dev/hda1 already mounted or /mnt/groo busy

 * some local filesystems failed to mount
```

 All other mountings from localmount work well.

My /etc/fstab:

```
/dev/hda2               /home           reiserfs        defaults                        0 1

/dev/hda1               /mnt/groo       reiserfs        defaults                        0 2
```

My /etc/init.d/localmount (baselayout-1.12.0_pre12):

```
ebegin "Mounting local filesystems"

mount -at noproc,noshm,no${NET_FS_LIST// /,no} >/dev/null

eend $? "Some local filesystem failed to mount"
```

// I am not sure, if I had this issue with other versions of baselayout.

Just tested another recent version of baselayout, 1.12.0_pre10-r1, did etc-update with -5, but have the same problems.

On my workstation I don't have this problem. Same baselayout. 

There is S-ATA, SCSI, on my notebook is IDE.

Hm. Any ideas?

This is not evil but really annoying. Thanks,

groover

----------

## verbbis

I'm having the same problem (using baselayout-1.12.0_pre13-r1). I tried debugging the scripts, but gave up after a while. Couldn't really find out why it was happening either. For me the behavior isn't consistent, sometimes the mounts are ok and no errors in boot-up either. Just today, however, had shm mounted twice. But as said, it doesn't affect anything. It's just annoying.

----------

## bdz

Same problem here with one hard drive partition and usbfs.

I'm using ~x86 and my baselayout is 1.12.0_pre13-r1

Anybody found a solution to this problem? Or are you just living with it?

----------

## Arlo

I posted the original post and have still not found a solution. 

However since then I have switched from using /etc/portage/package.keywords to unmask 40-50 packages to using ~x86. The problems started when I started unmasking packages for Gnome 2.12, which included baselayout.

Sometimes my machine reboots at the same time it would normally start mounting the filesystems, oddly after the reboot I don't get the error. other times I get the error. I don't think I've had the usbfs error since I switched to ~x86.

I'm running: 

2 SATA Seagate Barracuda harddrives.

Nvidia n7a8x motherboard (with onboard SATA controller)

Baselayout version: 1.12.0_pre13-r1

the gentoo-kernel 2.6.15

anything else that would be helpful?

I would file a bug report but I'm not even sure which package is to blame, Baselayout I guess.

----------

## billfrith

Hi

Just to say I'm having the same problem, sometimes though the boot hangs during localmount and I have to reset.

I think a bug has already been filed on this, see

[url]https://bugs.gentoo.org/show_bug.cgi?id=116443[/url]

Seems to be the same thing, if so the problem lies in udev or hotplug

Bill

----------

## billfrith

Hi

I think I may have found the solution, but I'm not sure why it works.

I just did another update, which brought me up to baselayout-1.12.0_pre14, and on doing etc-update I noticed this in /etc/modules.autoload.d/kernel-2.6:

 *Quote:*   

> 
> 
> #
> 
> # This file should only be used to load modules that are essential to the
> ...

 

so I deleted all my modules from this file (i.e. allowed the update) and rebooted, and hey presto no more errors!

(naturally I already had Coldplug installed)

It's possible that this message had been in the updates for some time. I normally don't allow etc-update to touch /etc/modules.autoload.d/kernel-2.6, as that's where I thought the modules got loaded!

Hope this helps

Bill

----------

## Arlo

I just upgraded, installed coldplug and removed all the lines from /etc/modules.autoload.d/kernel-2.6, and the problem is fixed..

Thanks everyone.

----------

