[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mounting a USB device



I am fairly convinced that the USB 3 port previously mentioned has a loose connection.

It also seems to me that a FAT32 device such as a memory stick is automatically mounted when inserted in a USB port while the system
is running, if such a device is not referenced in /etc/fstab.

What is not clear to me is what happens to an NTFS device such as a portable drive when it is inserted in a USB port while the system is running, if the device is not referenced in /etc/fstab.

The following point is observed :-

USB devices referenced in /etc/fstab are automatically mounted when the system is rebooted, even though their entries include the noauto option (the devices are already plugged in when a reboot is performed).

What happens to a USB device that is not referenced in /etc/fstab,
when it is plugged into a USB port while the system is running :-

If the filesystem is FAT32 (e.g. a memory stick) will it always be automatically mounted or will it always have to be manually mounted ?

If the filesystem is NTFS (e.g. a portable hard drive) will it always
be automatically mounted or will it always have to be manually mounted ?

The automount system appears to be usbmount.

On 29 Oct 2020 17:33, "David Wright" <deblis@lionunicorn.co.uk> wrote:
On Tue 27 Oct 2020 at 20:43:52 (+0000), Mick Ab wrote:
> On 27 Oct 2020 18:20, "Kenneth Parker" <sea7kenp@gmail.com> wrote:
> > On Tue, Oct 27, 2020, 11:51 AM Mick Ab <recoverymail123890@gmail.com> wrote:
> >
> >> If a filesystem in /etc/fstab has a noauto entry, can that filesystem
> >> only be mounted manually using the mount command or
> >> is there any chance that it will be automatically mounted by
> >> usbmount ?
> >>
> >> The filesystem is used in a USB port.
> >
> > I have a dislike of Gnome, because it seems to mount  *every*  Filesystem
> > I have, even ones that I consider sensitive.
> >
> > But it doesn't occur until the GUI comes up.  (I set the SystemD Default
> > Target to multi-user and only type "systemctl start graphical.target" after
> > I finish my "Apt Ritual").
> >
> > Not sure what Gnome Package does this.  Any Gnome Experts here?
> >
> Thanks for the replies.
>
> It seems to me that the situation is as follows :-
>
> Filesystems in /etc/fstab which have the noauto option are not
> automatically mounted at boot time, so if these filesystems are already
> plugged into USB ports at boot time, they would subsequently have to be
> manually mounted in order to be used.
>
> Filesystems which are plugged into a port after the system has been booted
> are automatically mounted.

I have no idea whether your automounter (presumably in use) detects
and mounts sticks when booting up completes, or even before. So is
your "It seems to me that the situation is" based on a gut feeling,
or on some observations?

As I've mentioned before, I don't have sticks mounted automatically,
but I do have udev create and destroy mounts points when sticks are
inserted and removed. In the syslog, I can see my udev scripts running
on a stick (left already inserted) before, say, setting up swap.
(PIDs in the high 200s for udev, in the mid 400s for swap.)

In view of your previous thread "Problem unplugging a USB drive",
is the situation you describe above satisfactory for you, or are
you indirectly asking how to change something?

With flaky ports like those described, it sounds as if Brian's
post would be worth trying out. My own query on that would be
how to implement this approach without populating fstab with
a list of specific devices' LABELs/UUIDs.

Cheers,
David.


Reply to: