Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jul 2017 21:24:32 +0200
From:      Polytropon <freebsd@edvax.de>
To:        byrnejb@harte-lyne.ca
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Unable to mount USB Flash memory created on CentOS
Message-ID:  <20170728212432.7be758bc.freebsd@edvax.de>
In-Reply-To: <4a5c3fd942ff8566eefaaf9c990abba0.squirrel@webmail.harte-lyne.ca>
References:  <aa1eadff2a815bacb69dc015b4aa1f4f.squirrel@webmail.harte-lyne.ca> <20170728205144.c1fc18df.freebsd@edvax.de> <4a5c3fd942ff8566eefaaf9c990abba0.squirrel@webmail.harte-lyne.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 28 Jul 2017 15:14:21 -0400, James B. Byrne wrote:
> 
> On Fri, July 28, 2017 14:51, Polytropon wrote:
> > On Fri, 28 Jul 2017 13:22:06 -0400, James B. Byrne via
> > freebsd-questions wrote:
> >> On my new FreeBSD workstation I am trying to read data off of a USB
> >> 'key' flash memory stick recorded using rsync on a CentOS-6 system.
> >> I was able to do this successfully up until the point that I inserted
> >> another usb stick.  Now I cannot mount or read either.
> >
> > Did you unmount the previous stick correctly?
> 
> Yes.

Okay, so no general problem with file systems; I assume you
are using FUSE here.



> > When you say it was "recorded" with CentOS, which file system
> > has been used? Or is it a "raw" file (no file system at all,
> > output written directly to the device)?
> >
> 
> ext2fs.  I was formerly able to read these usb sticks on the new
> FreeBSD based workstation.  The problem only surfaced when I inserted
> a second usb flash drive.

That shouldn't interfere with already mounted extfs volumes,
except the DE's automounter going crazy...



> >> I probably made things worse by first removing both keys from the
> >> host and then deleting the contents of /media.  However, that is
> >> done.
> >
> > That should not be a big problem, as /media is usually populated
> > automatically by a desktop environment's automounter, or manually
> > by the system administrator (which implies that you can easily
> > recreate required mountpoints under /media if you use /etc/fstab
> > as a template).
> 
> This is what I have in /etc/fstab
> 
> # Device           Mountpoint     FStype        Options        Dump  
> Pass#
> /dev/ada0p2.eli    none           swap          sw             0      0
> /dev/ada1p2.eli    none           swap          sw             0      0
> fdesc              /dev/fd        fdescfs       rw             0      0
> proc               /proc          procfs        rw             0      0

So no entry for da0 - it's valid to conclude that the automounter
you are using will create the appropriate mountpoint in /media
according to the device name, for example /media/da0 or /media/da0s1
or /media/da0p1, depending on partitioning.



> >> At the moment what happens is that upon insertion the 'computer'
> >> browser pane will display a filesystem labelled 'USB Drive' but I
> >> cannot open it for viewing.
> >
> > Is it empty? When you say it's being opened, I assume this is a
> > file browser - but from which desktop? They are quite different!
> 
> I am using the Mate desktop and the file browser application shown as
> 'Computer' on the desktop.

Ah, okay. I've had problems with Gnome 2 and Mate automounter
in the past (permission things), so maybe this is where to
have a closer look.



> > Check things easily: Open a terminal and check the outpuf of
> >
> > 	% mount -v
> >
> # mount -v
> zroot/ROOT/default on / (zfs, local, noatime, nfsv4acls, fsid
> 3356d1ddde69c9ae)
> devfs on /dev (devfs, local, multilabel, fsid 00ff007171000000)
> fdescfs on /dev/fd (fdescfs, fsid 01ff005959000000)
> procfs on /proc (procfs, local, fsid 02ff000202000000)
> zroot/tmp on /tmp (zfs, local, noatime, nosuid, nfsv4acls, fsid
> 44b2b23bdea4cfa8)
> zroot/usr/home on /usr/home (zfs, local, noatime, nfsv4acls, fsid
> b8bec644de6cc50d)
> zroot/usr/ports on /usr/ports (zfs, local, noatime, nosuid, nfsv4acls,
> fsid c3353930de6b28f5)
> zroot/usr/src on /usr/src (zfs, local, noatime, nfsv4acls, fsid
> 9cf37fdcde6acc4c)
> zroot/var/audit on /var/audit (zfs, local, noatime, noexec, nosuid,
> nfsv4acls, fsid 0dde5904de17aec3)
> zroot/var/crash on /var/crash (zfs, local, noatime, noexec, nosuid,
> nfsv4acls, fsid bd542313de5b6740)
> zroot/var/log on /var/log (zfs, local, noatime, noexec, nosuid,
> nfsv4acls, fsid cc095ee9de26f4fd)
> zroot/var/mail on /var/mail (zfs, local, nfsv4acls, fsid
> 43ce3675dedf12d5)
> zroot/var/tmp on /var/tmp (zfs, local, noatime, nosuid, nfsv4acls,
> fsid 1c322eeade9a7a06)
> zroot on /zroot (zfs, local, noatime, nfsv4acls, fsid 521cbba2def75276)

It does not show an entry for /dev/da0<something>, so you can
state that it is _not_ mounted, and the file browser window is
just showing the empty mountpoint directory.



> > Is the USB stick (usually /dev/da0 or /dev/da0s1 or something
> > like that) _really_ mounted?
> 
> Not that I can see. That appears to be the essence of the problem.

Can you _manually_ mount the USB stick? For example, with
something like

	% mount -t ext2fs -o ro /dev/da0 /media/da0

No matter if the file browser will automatically open a window for
/media/da0 (in this example), you can check again the output of

	% mount -v | grep da0

and of course

	% ls /media/da0

to see if the files you are expecting are really there.



> > Check what's on the USB stick, using
> >
> > 	% gpart show da0
> >
> # gpart show da0
> =>       63  122915265  da0  MBR  (59G)
>          63       8001       - free -  (3.9M)
>        8064  122907264    1  !12  [active]  (59G)

Hmmm... that looks really strange... check with "old-fashioned"
fdisk again:

	% fdisk da0

Is there an ext2 partition? The output you presented looks like
a situation where there's nothing the system can automatically
detect and mount.

(I don't have an ext2 USB stick at hand so I cannot check how
the gpart and fdisk output should look like for a valid TOC with
an ext2 partition.)

Can you re-initialize the USB stick on the Linux system? Just in
case partitioning data has been damaged...



> dmesg shows this:
> 
> ugen3.2: <Kingston> at usbus3
> umass0: <Kingston DataTraveler 2.0, class 0/0, rev 2.00/1.00, addr 2>
> on usbus3
> umass0:  SCSI over Bulk-Only; quirks = 0x8100
> umass0:5:0: Attached to scbus5
> da0 at umass-sim0 bus 0 scbus5 target 0 lun 0
> da0: <Kingston DataTraveler 2.0 PMAP> Removable Direct Access SPC-2
> SCSI device
> da0: Serial Number 50E549C20210BF10A9BC4174
> da0: 40.000MB/s transfers
> da0: 60017MB (122915328 512 byte sectors)
> da0: quirks=0x3<NO_SYNC_CACHE,NO_6_BYTE>

Okay, da0 is confirmed, and there are no errors so far.



> >> Neither does a mount command show in the
> >> right-click popup menu.
> >
> > So it probably _is_ mounted. Does the menu show a "detach",
> > "unoumt" or "eject" entry or symbol?
> 
> No

Because it isn't actually mounted, as we can now say for sure.





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170728212432.7be758bc.freebsd>