Re: Mounting a USB device

2020-11-03 Thread David Wright
On Tue 03 Nov 2020 at 23:33:33 (+), Joe wrote:
> On Tue, 3 Nov 2020 14:45:41 -0600 David Wright wrote:
> > On Tue 03 Nov 2020 at 17:34:48 (+), Joe wrote:
> > 
> > > Those of us who use NTFS do so deliberately to provide compatibility
> > > with Windows. It's not that long ago that Linux NTFS support was a
> > > bit flaky, so we don't do it solely by our own choice. 
> > > 
> > > I have a 4GB VeraCrypt file which I open in either Linux or Windows
> > > on my dual-boot netbook. NTFS is the only possible choice.
> > > 
> > > And no, don't suggest an ext4 implementation on Windows. I want
> > > something solid.  
> > 
> > Do you have any recommendations on instructions for installing
> > the veracrypt software (as Debian doesn't support it).
> 
> I got it from the veracrypt.fr website as a .deb for stretch.

Thanks for that information. I'll take a good look at the windows
side as that's what my other half would be using, were we to go
that way.

Cheers,
David.



Re: Mounting a USB device

2020-11-03 Thread Keith Bainbridge

On 4/11/20 4:09 am, Charles Curley wrote:

On Tue, 3 Nov 2020 16:12:27 +
Mick Ab  wrote:


Thanks for the suggestion re rsync, but using tar has been successful
with a NTFS drive many times.


Another possibility is to get rid of NTFS, and replace it with an
encrypted ext4 partition. Then you can use something like rsnapshot to
automate the backup process entirely. This gives you backups in depth:
several months of back versions of files, with deduplication.

Create a partition:
https://charlescurley.com/blog/posts/2019/Nov/29/encrypting-an-external-partition/

Scripts to mount and umount the partition:
https://charlescurley.com/blog/posts/2020/Jan/01/mounting-an-encrypted-external-partition/

Some more general thoughts on backups:
https://charlescurley.com/blog/posts/2019/Nov/02/backups-on-linux/



Thanks for these links, Charles.

The partition creation went well.

The scripts look interesting, but I haven't tried them yet.


The thoughts about when/why back up are more food for thought.

Thanks for your efforts

--
Keith Bainbridge

ke1thozgro...@gmx.com



Re: Mounting a USB device

2020-11-03 Thread Joe
On Tue, 3 Nov 2020 14:45:41 -0600
David Wright  wrote:

> On Tue 03 Nov 2020 at 17:34:48 (+), Joe wrote:
> 
> > Those of us who use NTFS do so deliberately to provide compatibility
> > with Windows. It's not that long ago that Linux NTFS support was a
> > bit flaky, so we don't do it solely by our own choice. 
> > 
> > I have a 4GB VeraCrypt file which I open in either Linux or Windows
> > on my dual-boot netbook. NTFS is the only possible choice.
> > 
> > And no, don't suggest an ext4 implementation on Windows. I want
> > something solid.  
> 
> Do you have any recommendations on instructions for installing
> the veracrypt software (as Debian doesn't support it).

I got it from the veracrypt.fr website as a .deb for stretch.

> 
> Do you run the GUI version or plain?

GUI. It doesn't really make sense to use different interfaces for
Windows and Linux, just because I can.
> 
> Have you run it on an encrypted partition rather than just a file?

No, I specifically wanted a container in a file, and only TrueCrypt and
later VeraCrypt seemed to do that. Other encryption systems were for
partitions, which was not my application. 

I wanted a subset of data on my laptop and netbook to be encrypted in
case of loss or theft, but in a block that could be written to DVD,
therefore a file of around 4GB. Yes, some of us still use them. They're
very cheap and it's a simple backup method. Depending on how I'm
working, I might burn a disk every couple of days (syncing daily to my
server) or once a month. My netbook doesn't have a drive but that's not
a problem. It has taken me a couple of years to fill 4GB (I'm not into
multimedia), at which point I just started another one.

> If so, would you recommend creating the partition container in
> linux and then letting windows create the NTFS filesystem?
> (Or else what; can windows do both?)

No, it's just a file within a Windows NTFS filesystem. I trust the
current Linux NTFS implementation for writing (it wasn't that long ago
it was recommended as read-only) but as a matter of policy, I would
format an NTFS device under Windows. A few of my USB sticks have NTFS
partitions, again for compatibility. As it happened, the VC container
was made under Windows.

-- 
Joe




Re: Mounting a USB device

2020-11-03 Thread David Wright
On Tue 03 Nov 2020 at 17:34:48 (+), Joe wrote:

> Those of us who use NTFS do so deliberately to provide compatibility
> with Windows. It's not that long ago that Linux NTFS support was a bit
> flaky, so we don't do it solely by our own choice. 
> 
> I have a 4GB VeraCrypt file which I open in either Linux or Windows on
> my dual-boot netbook. NTFS is the only possible choice.
> 
> And no, don't suggest an ext4 implementation on Windows. I want
> something solid.

Do you have any recommendations on instructions for installing
the veracrypt software (as Debian doesn't support it).

Do you run the GUI version or plain?

Have you run it on an encrypted partition rather than just a file?
If so, would you recommend creating the partition container in
linux and then letting windows create the NTFS filesystem?
(Or else what; can windows do both?)

Cheers,
David.



Re: Mounting a USB device

2020-11-03 Thread Joe
On Tue, 3 Nov 2020 10:09:02 -0700
Charles Curley  wrote:

> On Tue, 3 Nov 2020 16:12:27 +
> Mick Ab  wrote:
> 
> > Thanks for the suggestion re rsync, but using tar has been
> > successful with a NTFS drive many times.  
> 
> Another possibility is to get rid of NTFS, and replace it with an
> encrypted ext4 partition. 

Those of us who use NTFS do so deliberately to provide compatibility
with Windows. It's not that long ago that Linux NTFS support was a bit
flaky, so we don't do it solely by our own choice. 

I have a 4GB VeraCrypt file which I open in either Linux or Windows on
my dual-boot netbook. NTFS is the only possible choice.

And no, don't suggest an ext4 implementation on Windows. I want
something solid.

-- 
Joe



Re: Mounting a USB device

2020-11-03 Thread Charles Curley
On Tue, 3 Nov 2020 16:12:27 +
Mick Ab  wrote:

> Thanks for the suggestion re rsync, but using tar has been successful
> with a NTFS drive many times.

Another possibility is to get rid of NTFS, and replace it with an
encrypted ext4 partition. Then you can use something like rsnapshot to
automate the backup process entirely. This gives you backups in depth:
several months of back versions of files, with deduplication.

Create a partition:
https://charlescurley.com/blog/posts/2019/Nov/29/encrypting-an-external-partition/

Scripts to mount and umount the partition:
https://charlescurley.com/blog/posts/2020/Jan/01/mounting-an-encrypted-external-partition/

Some more general thoughts on backups:
https://charlescurley.com/blog/posts/2019/Nov/02/backups-on-linux/

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: Mounting a USB device

2020-11-03 Thread Mick Ab
Thanks for the suggestion re rsync, but using tar has been successful with
a NTFS drive many times.
On 3 Nov 2020 14:11, "The Wanderer"  wrote:

> On 2020-11-03 at 09:03, ellanios82 wrote:
>
> > On 11/3/20 2:28 PM, Mick Ab wrote:
> >
> >> The backup itself is performed using a 'tar  -cvpf' type of command
> >
> >   - maybe "rsync" is worth a look
>
> All else being equal I'd agree, but this is backing up to a NTFS
> filesystem, which doesn't support the type of ownership and permissions
> information that's likely to be available on the source filesystem; in
> that scenario, backing up file-to-file (as with rsync) will lose that
> metadata, whereas a tarball will preserve it.
>
> --
>The Wanderer
>
> The reasonable man adapts himself to the world; the unreasonable one
> persists in trying to adapt the world to himself. Therefore all
> progress depends on the unreasonable man. -- George Bernard Shaw
>
>


Re: Mounting a USB device

2020-11-03 Thread The Wanderer
On 2020-11-03 at 09:03, ellanios82 wrote:

> On 11/3/20 2:28 PM, Mick Ab wrote:
>
>> The backup itself is performed using a 'tar  -cvpf' type of command
> 
>   - maybe "rsync" is worth a look

All else being equal I'd agree, but this is backing up to a NTFS
filesystem, which doesn't support the type of ownership and permissions
information that's likely to be available on the source filesystem; in
that scenario, backing up file-to-file (as with rsync) will lose that
metadata, whereas a tarball will preserve it.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw



signature.asc
Description: OpenPGP digital signature


Re: Mounting a USB device

2020-11-03 Thread ellanios82

On 11/3/20 2:28 PM, Mick Ab wrote:

The backup itself is performed using a 'tar  -cvpf' type of command



 - maybe "rsync" is worth a look


.

 rgds




Re: Mounting a USB device

2020-11-03 Thread Mick Ab
I have a straightforward need to backup the current system to a portable
drive before getting an up to date Debian distribution installed
on a new machine.

As previously mentioned, system backups have been successfully carried out
on a regular basis for years to an NTFS portable drive in a USB 3 port.

Recently there was a problem with the USB 3 port and it was also found that
the portable drive had become corrupted.

Hence a new NTFS portable drive was bought to do the backups. A backup was
attempted using the new drive in another USB port.
However the manual mount command failed :-

# mount /media/backup
Failed to write lock '/dev/sde1': Resource temporarily unavailable
Error opening '/dev/sde1': Resource temporarily unavailable
Failed to mount '/dev/sde1': Resource temporarily unavailable

The drive was unplugged from the port without a manual unmount being
performed as it was assumed the drive had not been mounted.

Maybe, however, the new drive was automatically mounted by the usbmount
system (to /media/usb0 ?) when it was plugged in.

In any case the drive should have been manually unmounted before it was
unplugged.

The above mount command is exactly the same as the mount command used
whenever the old drive was mounted. The old drive has an entry in
/etc/fstab so the system knew about the mount parameters for the old drive.
However the new drive does not have an entry in /etc/fstab and the system
would surely be confused by the above mount command.

Furthermore, a card reader was then plugged into the port vacated by the
new drive. An SD card was then inserted into the card reader. Normally the
system would then automatically mount the SD card, but
it didn't.

Some days later, another card reader was plugged into that port and the SD
card inserted into the card reader. This time the card was automatically
mounted.

So there are several happenings above which I do not really understand.
This makes me concerned about how to perform
the vital backup needed before a new system can be set up.

The backup itself is performed using a 'tar  -cvpf' type of command.


Re: Mounting a USB device

2020-11-02 Thread David
Hi Mick

Please make sure to send all your replies to the mailing list
so that others can add to the conversation.

On Mon, 2 Nov 2020 at 21:25, Mick Ab  wrote:
>
> Thanks very much, David, for your suggestions. I appreciate that very much. 
> My knowledge of Linux is gleaned from various online articles and Linux 
> forums I have seen over the past few years. I know very little,
> if anything, about the internal workings of Linux. Most of the debian-user 
> posts that I see are way above my head.
>
> I just need to know sufficient Linux/Debian to enable a desktop to run okay 
> on a Debian system. If any problem arises beyond my knowledge/
> experience I seek online help from various Linux or general computer forums.
>
> Backups of the current system to a portable NTFS drive in a USB 3 port have 
> been done on a regular basis for many months.
>
> Problems started when a mount of the drive failed. After a lot of 
> investigation, it is now considered that the failure was due to a loose
> connection in the USB 3 port. Also, the drive was corrupted.
>
> So a backup was attempted using a new NTFS portable drive in another port. 
> This caused further problems because the automatic mounting system in use 
> (usbmount) was not understood.
>
> I think i understand the workings of usbmount better now and have a plan to 
> ensure a backup of the system goes well.
>
> The usbmount system automatically mounts NTFS and FAT32 devices at boot up. 
> These devices are already plugged in at boot up and have entries in 
> /etc/fstab. It appears that usbmount does not check
> /etc/fstab for the noauto option.

On Mon, 2 Nov 2020 at 21:25, Mick Ab  wrote:

> Backups of the current system to a portable NTFS drive in a
> USB 3 port have been done on a regular basis for many months.

Ok, well I certainly don't want to break what's working for you.
But it seems you have been having some reliability issues, so
it seems reasonable to have a conversation about those ...

Can you describe for us how you do these backups?
What tools or commands are you running?

> Problems started when a mount of the drive failed.
> After a lot of investigation, it is now considered that the failure
> was due to a loose connection in the USB 3 port.
> Also, the drive was corrupted.

> So a backup was attempted using a new NTFS portable
> drive in another port. This caused further problems because
> the automatic mounting system in use (usbmount) was
> not understood.

FAT* and NTFS are second-class citizens on Linux.
They should only be used where necessary for compatibility
with other computer systems.
They will lack features and performance.
Their drivers will be slower, less reliable and more prone to
errors.

I would use the ext4 filesystem for what I imagine you are doing,
that you haven't fully explained yet :) How do you do your backups?



Re: Mounting a USB device

2020-11-02 Thread David
On Sun, 1 Nov 2020 at 22:55, Mick Ab  wrote:

> My plan is to update my distribution very soon, but first I need to do
> a backup of the system to a USB portable hard drive (which uses NTFS).

Hi Mick,

Forgive me if I am wrong, but it seems possible that there could be some
"XY Problem" occurring here.
  https://en.wikipedia.org/wiki/XY_problem

I'm unable to know from your message history what you know already, or not,
what your knowledge level is, so I am writing this on the chance that
it might be
useful to you. If that's not correct, then please ignore.

Are you aware that NTFS is not an optimal filesystem to use on Linux
systems? If I had a USB portable hard drive that I was going to use only
with Linux systems, then I would get rid of its NTFS filesystem at the
earliest opportunity, unless it was already being used for other purposes.

If the drive is blank, you don't have to use the factory-format NTFS,
you can change it to something better before using it. I only use NTFS
in situations where another non-Linux system needs to be able to read
the same files.

What triggered me to write this message is that it seems unlikely that a
non-Linux system would need to be able to read the system backup you
mentioned above.

If your goal is system backup and that is something that you have
never done before, then I suggest that if you state the big-picture goal
of your situation:
- what resources you have.
- what your goal is.
- what research you have already done.
- what you know and what you don't know.
then you might receive more useful advice from us, if you want that.

There's many different ways to do a system backup. But none that I can
think of that involve NTFS, unless there's a good reason or factors that
you haven't yet shared with us :)

But if you don't need to be told this, that's fine too.



Re: Mounting a USB device

2020-11-01 Thread Mick Ab
Many thanks for your email, David.

Apologies for any contradictory messages i have posted. My understanding of
the automatic mount of USB devices has been rapidly evolving.

I have now seen that people have had various problems with usbmount over
the years, so I can quite understand why it might not be in the  most
recent Debian distributions.

My plan is to update my distribution very soon, but first I need to do a
backup of the system to a USB portable hard drive (which uses NTFS).

I would like this backup to go as smoothly as possible.
On 31 Oct 2020 22:41, "David Wright"  wrote:

> On Thu 29 Oct 2020 at 18:40:53 (+), Mick Ab wrote:
> > 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.
>
> Call that paragraph ¶ 2.
>
> > 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).
>
> As I thought, this observation contradicts the first thought expressed
> in your Tue, 27 Oct 2020 20:43:52 + post (the last paragraph of
> quote below). I presume that although mounting is disallowed for   mount -a
> (by noauto), your automounter is not constrained in this way.
>
> > 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 ?
>
> Isn't that just what you answered in ¶ 2 above?
>
> > 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.
>
> I guess your answer lies there then. AFAICT usbmount hasn't been
> included in the last two stable distributions (stretch and buster).
> I've never used it. I assume there are others here for which this
> all works. (I've left it a day before replying.) I can't work out
> where your questions are leading, and whether you have a problem
> to solve (besides having flaky hardware).
>
> > On 29 Oct 2020 17:33, "David Wright"  wrote:
> > > On Tue 27 Oct 2020 at 20:43:52 (+), Mick Ab wrote:
> > > >
> > > > 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.
> > > >
>
> Cheers,
> David.
>
>


Re: Mounting a USB device

2020-10-31 Thread David Wright
On Thu 29 Oct 2020 at 18:40:53 (+), Mick Ab wrote:
> 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.

Call that paragraph ¶ 2.

> 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).

As I thought, this observation contradicts the first thought expressed
in your Tue, 27 Oct 2020 20:43:52 + post (the last paragraph of
quote below). I presume that although mounting is disallowed for   mount -a
(by noauto), your automounter is not constrained in this way.

> 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 ?

Isn't that just what you answered in ¶ 2 above?

> 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.

I guess your answer lies there then. AFAICT usbmount hasn't been
included in the last two stable distributions (stretch and buster).
I've never used it. I assume there are others here for which this
all works. (I've left it a day before replying.) I can't work out
where your questions are leading, and whether you have a problem
to solve (besides having flaky hardware).

> On 29 Oct 2020 17:33, "David Wright"  wrote:
> > On Tue 27 Oct 2020 at 20:43:52 (+), Mick Ab wrote:
> > >
> > > 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.
> > >

Cheers,
David.



Re: Mounting a USB device

2020-10-29 Thread Mick Ab
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"  wrote:

> On Tue 27 Oct 2020 at 20:43:52 (+), Mick Ab wrote:
> > On 27 Oct 2020 18:20, "Kenneth Parker"  wrote:
> > > On Tue, Oct 27, 2020, 11:51 AM Mick Ab 
> 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.
>
>


Re: Mounting a USB device

2020-10-29 Thread Mick Ab
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"  wrote:

> On Tue 27 Oct 2020 at 20:43:52 (+), Mick Ab wrote:
> > On 27 Oct 2020 18:20, "Kenneth Parker"  wrote:
> > > On Tue, Oct 27, 2020, 11:51 AM Mick Ab 
> 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.
>
>


Re: Mounting a USB device

2020-10-29 Thread David Wright
On Tue 27 Oct 2020 at 20:43:52 (+), Mick Ab wrote:
> On 27 Oct 2020 18:20, "Kenneth Parker"  wrote:
> > On Tue, Oct 27, 2020, 11:51 AM Mick Ab  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.



Re: Mounting a USB device

2020-10-29 Thread Dominique Dumont
Hi

On Tuesday, 27 October 2020 16:51:06 CET Mick Ab 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 ?

I wrote a blog on that topic a few years ago:

https://ddumont.wordpress.com/2016/04/24/automount-usb-devices-with-systemd/

All the best

Dod 






Re: Mounting a USB device

2020-10-27 Thread Mick Ab
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.

On 27 Oct 2020 18:20, "Kenneth Parker"  wrote:

>
>
> On Tue, Oct 27, 2020, 11:51 AM Mick Ab 
> 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?
>
> Kenneth Parker
>
>>


Re: Mounting a USB device

2020-10-27 Thread tomas
On Tue, Oct 27, 2020 at 02:20:14PM -0400, Kenneth Parker wrote:
> On Tue, Oct 27, 2020, 11:51 AM Mick Ab  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?

Not a Gnome expert, but I play one on TV (well, my favourite search
engine [1] does that, actually ;-)

It seems that Nautilus, the file manager is the one doing it [2] (or,
controlling it, actually). It can be disabled, it seems.

Cheers

[1] No, not that one with the G.
[2] 
https://askubuntu.com/questions/18926/how-to-control-gnomes-auto-mounting-capabilities

 - t


signature.asc
Description: Digital signature


Re: Mounting a USB device

2020-10-27 Thread Nicolas George
ghe2001 (12020-10-27):
> > dme is faster.
> 
> What's a dme?  It's not on my system, and aptitude claims it doesn't exist.

It's not dme, it's dme

ssecem ~ $ apt-file search '/bin/dme'
herbstluftwm: /usr/bin/dmenu_run_hlwm 
klibc-utils: /usr/lib/klibc/bin/dmesg
suckless-tools: /usr/bin/dmenu
suckless-tools: /usr/bin/dmenu_path
suckless-tools: /usr/bin/dmenu_run
util-linux: /bin/dmesg

Take your pick.

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature


Re: Mounting a USB device

2020-10-27 Thread Reco
Hi.

On Tue, Oct 27, 2020 at 07:06:20PM +, ghe2001 wrote:
> ‐‐‐ Original Message ‐‐‐
> On Tuesday, October 27, 2020 12:58 PM, Nicolas George  wrote:
> 
> > dme is faster.
> 
> What's a dme?  It's not on my system, and aptitude claims it doesn't exist.

/bin/dmesg, probably. A part of util-linux package.

Reco



Re: Mounting a USB device

2020-10-27 Thread Cindy Sue Causey
On 10/27/20, Mick Ab  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.


Is there a "sub" anything on that filesystem that would be... sorry,
words are failing.. that would be quietly "sub-mounted"? I've had a
partition be mounted when a directory was "mount -B" mounted
*somehow*, but I can't come up with a scenario. I looked at past
/etc/fstab entries (still saved as comments), but they're not
triggering any related memories.

It has only happened once that I noticed. A full partition was mounted
to my great shock. At some point not long after, I realized that a
directory within that partition was some form of "mount --bind". I
just figured that was surely how it happened because the partition had
to be mounted first to reach that directory.

Yes, I know. Everything I look at for my usage case, it shouldn't have
happened backwards. The directory mount should have failed and exited
as e.g. "can't find" the way mount did just now.

Thought it was a handy shortcut then forgot about it. It was kind of
like using "-p" flag when manually "mkdir" creating embedded
parent-child directories.

But, again, am now not able to duplicate where it had happened for me.
ONCE (that I know of).

Cindy :)
-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with birdseed *



Re: Mounting a USB device

2020-10-27 Thread Nicolas George
ghe2001 (12020-10-27):
> On my system (Buster) USB things are called /dev/sd.  From
> the CLI, I type "sudo mount /dev/sd" to see what's already there,
> then plug in the USB device, and  hit  again to see what's new. 

dme is faster.

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature


Re: Mounting a USB device

2020-10-27 Thread Brian
On Tue 27 Oct 2020 at 15:51:06 +, Mick Ab 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 too used usbmount in the distant past; it is now consigned to the
refuse bin of history. In my /etc/fstab I have

LABEL=ARCHIVE-10 /media/ARCHIVE-10 vfat 
ro,gid=1000,fmask=0117,dmask=0007,noatime,noauto,user,x-systemd.automount,x-systemd.idle-timeout=5,x-systemd.device-timeout=1
 0 0

The USB stick is mounted when it is accessed and unmounted after 5
seconds of non-use. Works brilliantly.

-- 
Brian.



Re: Mounting a USB device

2020-10-27 Thread Kenneth Parker
On Tue, Oct 27, 2020, 11:51 AM Mick Ab  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?

Kenneth Parker

>


Re: Mounting a USB device

2020-10-27 Thread David Wright
On Tue 27 Oct 2020 at 15:51:06 (+), Mick Ab 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.

According to   man fstab   noauto protects against automatic mounting
by   mount -a   which is what's done at boot time. Your automounter
can't be using   mount -a   as that could mount totally unrelated
filesystems, so there's every likelihood that noauto is ignored.

Cheers,
David.



Mounting a USB device

2020-10-27 Thread Mick Ab
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.