From owner-freebsd-questions@freebsd.org Tue Oct 18 16:44:35 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 98B22C17322 for ; Tue, 18 Oct 2016 16:44:35 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14BDF27A for ; Tue, 18 Oct 2016 16:44:34 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id u9IGiJ3q005992; Wed, 19 Oct 2016 03:44:20 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Wed, 19 Oct 2016 03:44:19 +1100 (EST) From: Ian Smith To: doug cc: freebsd-questions@freebsd.org Subject: Re: Can not mount USB device In-Reply-To: Message-ID: <20161019032445.K6806@sola.nimnet.asn.au> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 16:44:35 -0000 In freebsd-questions Digest, Vol 646, Issue 2, Message: 14 On Mon, 17 Oct 2016 16:25:36 -0400 (EDT) doug wrote: > 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) Looks like it either has a write-protect switch, as some do, or it came write protected, ie is designed to be read-only, as apparently some are. > 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. So try mounting it read-only. As root, you don't need to mess with the permissions either, so just this should work: # mount -t msdosfs -r /dev/da0s1 /mnt # alternatively '-o ro' cheers, Ian