From owner-freebsd-questions@freebsd.org  Wed Oct 19 07:11:40 2016
Return-Path: <owner-freebsd-questions@freebsd.org>
Delivered-To: freebsd-questions@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24398C16B32
 for <freebsd-questions@mailman.ysv.freebsd.org>;
 Wed, 19 Oct 2016 07:11:40 +0000 (UTC) (envelope-from bsam@passap.ru)
Received: from forward4p.cmail.yandex.net (forward4p.cmail.yandex.net
 [77.88.31.19])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id B5B01E9C
 for <freebsd-questions@freebsd.org>; Wed, 19 Oct 2016 07:11:39 +0000 (UTC)
 (envelope-from bsam@passap.ru)
Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net
 [IPv6:2a02:6b8:0:1a2d::25])
 by forward4p.cmail.yandex.net (Yandex) with ESMTP id 6A0D220EF7
 for <freebsd-questions@freebsd.org>; Wed, 19 Oct 2016 10:11:29 +0300 (MSK)
Received: from smtp1o.mail.yandex.net (localhost.localdomain [127.0.0.1])
 by smtp1o.mail.yandex.net (Yandex) with ESMTP id 1976C1300883
 for <freebsd-questions@freebsd.org>; Wed, 19 Oct 2016 10:11:28 +0300 (MSK)
Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id
 yjuS3t5tN0-BRtSOPVD; Wed, 19 Oct 2016 10:11:27 +0300
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client certificate not present)
X-Yandex-Suid-Status: 1 0
Subject: Re: Can not mount USB device
To: freebsd-questions@freebsd.org
References: <alpine.BSF.2.20.1610161606090.78426@fledge.watson.org>
 <5c038e43-820d-4cf8-69d7-c9e7cfde2c39@passap.ru>
 <alpine.BSF.2.20.1610181128390.74981@fledge.watson.org>
From: Boris Samorodov <bsam@passap.ru>
Message-ID: <7da0b7b1-79f2-6f74-8149-d2b768a98280@passap.ru>
Date: Wed, 19 Oct 2016 10:10:54 +0300
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101
 Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <alpine.BSF.2.20.1610181128390.74981@fledge.watson.org>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/>
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 19 Oct 2016 07:11:40 -0000

18.10.2016 18:53, doug пишет:
> On Tue, 18 Oct 2016, Boris Samorodov wrote:
> 
>> 17.10.2016 23:25, doug ?????:
>>> The system is FreeBSD 10.3-RELEASE-p7 #0. All commands are execured as
>>> root.
>>>
>>> file -s /dev/da0s1
>>> /dev/da0s1: DOS/MBR boot sector, code offset 0x58+2, OEM-ID "MSDOS5.0",
>>> sectors/cluster 8, reserved sectors 38, Media descriptor 0xf8,
>>> sectors/track 63, heads 16, hidden sectors 8192, sectors 831488 (volumes
>>>> 32 MB) , FAT (32 bit), sectors/FAT 813, serial number 0x482393a9,
>>> unlabeled
>>>
>>> I ended up with the following attempts
>>>
>>> mount -t msdosfs -o -m=644 /dev/da0s1 /mnt/
>>> 5mount_msdosfs: /dev/da0s1: Permission denied
>>>
>>> dmesg:
>>> (da0:umass-sim0:0:0:0): Error 13, Unretryable error
>>> g_vfs_done():da0s1[WRITE(offset=19456, length=4096)]error = 13
>>> (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 00 20 26 00 00 08 00
>>> (da0:umass-sim0:0:0:0): CAM status: SCSI Status Error
>>> (da0:umass-sim0:0:0:0): SCSI status: Check Condition
>>> (da0:umass-sim0:0:0:0): SCSI sense: DATA PROTECT asc:27,0 (Write
>>> protected)
>>
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>>> mount -t msdosfs -o -m=644,-M=644 /dev/da0s1 /mnt/
>>> mount_msdosfs: /dev/da0s1: Permission denied
>>>
>>> dmesg:
>>> (da0:umass-sim0:0:0:0): Error 13, Unretryable error
>>> g_vfs_done():da0s1[WRITE(offset=19456, length=4096)]error = 13
>>>
>>> All other variations got the same error (Permission denied)
>>>
>>> The USB stick is readable in windows 10. I thought it was a data disk it
>>                ^^^^^^^^^^^
>>> turns out to have 2 install program files one for windows and one for
>>> mac.
>>
>> Do you try to mount read/write while it's only readable (write
>> protected)?
>>
> Good suggestion. So I tried:
> 
> ------plug in device-------
> Oct 18 11:44:27 hermes kernel: ugen1.2: <Generic> at usbus1
> Oct 18 11:44:27 hermes kernel: umass0: <Generic Mass Storage, class 0/0,
> rev 2.00/1.06, addr 2> on usbus1
> Oct 18 11:44:27 hermes kernel: umass0:  SCSI over Bulk-Only; quirks =
> 0x4101
> Oct 18 11:44:27 hermes kernel: umass0:2:0:-1: Attached to scbus2
> Oct 18 11:44:27 hermes kernel: da0 at umass-sim0 bus 0 scbus2 target 0
> lun 0
> Oct 18 11:44:27 hermes kernel: da0: <Generic Flash Disk 8.07> Removable
> Direct Access SPC-2 SCSI device
> Oct 18 11:44:27 hermes kernel: da0: Serial Number 2942AC6E
> Oct 18 11:44:27 hermes kernel: da0: 40.000MB/s transfers
> Oct 18 11:44:27 hermes kernel: da0: 425MB (870400 512 byte sectors)
> Oct 18 11:44:27 hermes kernel: da0: quirks=0x2<NO_6_BYTE>
> -----------mount -t msdosfs -o -m=444,-M=444 /dev/da0s1 /mnt/ ----------

I'd try to mount it at read-only mode (-o -m=444,-M=444,ro).

> Oct 18 11:45:08 hermes kernel: (da0:umass-sim0:0:0:0): WRITE(10). CDB:
> 2a 00 00 00 20 26 00 00 08 00
> Oct 18 11:45:08 hermes kernel: (da0:umass-sim0:0:0:0): CAM status: SCSI
> Status Error
> Oct 18 11:45:08 hermes kernel: (da0:umass-sim0:0:0:0): SCSI status:
> Check Condition
> Oct 18 11:45:08 hermes kernel: (da0:umass-sim0:0:0:0): SCSI sense: DATA
> PROTECT asc:27,0 (Write protected)
> Oct 18 11:45:08 hermes kernel: (da0:umass-sim0:0:0:0): Error 13,
> Unretryable error
> Oct 18 11:45:08 hermes kernel: g_vfs_done():da0s1[WRITE(offset=19456,
> length=4096)]error = 13
> Oct 18 11:45:08 hermes kernel: (da0:umass-sim0:0:0:0): WRITE(10). CDB:
> 2a 00 00 00 20 26 00 00 08 00
> Oct 18 11:45:08 hermes kernel: (da0:umass-sim0:0:0:0): CAM status: SCSI
> Status Error
> Oct 18 11:45:08 hermes kernel: (da0:umass-sim0:0:0:0): SCSI status:
> Check Condition
> Oct 18 11:45:08 hermes kernel: (da0:umass-sim0:0:0:0): SCSI sense: DATA
> PROTECT asc:27,0 (Write protected)
> Oct 18 11:45:08 hermes kernel: (da0:umass-sim0:0:0:0): Error 13,
> Unretryable error
> Oct 18 11:45:08 hermes kernel: g_vfs_done():da0s1[WRITE(offset=19456,
> length=4096)]error = 13
> -------------end of log---------
> 
> So either there is another way to address a read-only usb or this is a
> new wrinkle, I guess. All of this was done as root by necessity as I
> have never bothered with all the steps to allow user mounts as this is
> my laptop.

-- 
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve