From owner-freebsd-questions@freebsd.org Tue Oct 18 15:53:08 2016 Return-Path: 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 1A023C17F9E for ; Tue, 18 Oct 2016 15:53:08 +0000 (UTC) (envelope-from doug@fledge.watson.org) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id D208EAE1 for ; Tue, 18 Oct 2016 15:53:07 +0000 (UTC) (envelope-from doug@fledge.watson.org) Received: from fledge.watson.org (fledge.watson.org [198.74.231.63]) by cyrus.watson.org (Postfix) with ESMTPS id 301E946B0D for ; Tue, 18 Oct 2016 11:53:07 -0400 (EDT) Received: from fledge.watson.org (doug@localhost.watson.org [127.0.0.1]) by fledge.watson.org (8.15.2/8.15.2) with ESMTP id u9IFr6Q0056591 for ; Tue, 18 Oct 2016 11:53:06 -0400 (EDT) (envelope-from doug@fledge.watson.org) Received: from localhost (doug@localhost) by fledge.watson.org (8.15.2/8.15.2/Submit) with ESMTP id u9IFr6jL056588 for ; Tue, 18 Oct 2016 11:53:06 -0400 (EDT) (envelope-from doug@fledge.watson.org) Date: Tue, 18 Oct 2016 11:53:06 -0400 (EDT) From: doug Reply-To: doug@safeport.com To: freebsd-questions@freebsd.org Subject: Re: Can not mount USB device In-Reply-To: <5c038e43-820d-4cf8-69d7-c9e7cfde2c39@passap.ru> Message-ID: References: <5c038e43-820d-4cf8-69d7-c9e7cfde2c39@passap.ru> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (fledge.watson.org [127.0.0.1]); Tue, 18 Oct 2016 11:53:07 -0400 (EDT) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2016 15:53:08 -0000 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: at usbus1 Oct 18 11:44:27 hermes kernel: umass0: 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: 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 -----------mount -t msdosfs -o -m=444,-M=444 /dev/da0s1 /mnt/ ---------- 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.