From owner-freebsd-questions@freebsd.org Mon Aug 3 23:42:02 2015 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 CAA299B2E7E for ; Mon, 3 Aug 2015 23:42:02 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (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 941EC16CE for ; Mon, 3 Aug 2015 23:42:02 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-150-34.dynamic.qsc.de [92.195.150.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id F0D7D3CC07; Tue, 4 Aug 2015 01:41:59 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id t73Nfxwr002504; Tue, 4 Aug 2015 01:41:59 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Tue, 4 Aug 2015 01:41:59 +0200 From: Polytropon To: jd1008 Cc: freebsd-questions@freebsd.org Subject: Re: USB stick and some help with it. Message-Id: <20150804014159.33ed75f0.freebsd@edvax.de> In-Reply-To: <55BFF992.6010309@gmail.com> References: <55BF6AA0.2030802@bananmonarki.se> <20150804003056.094ffc57.freebsd@edvax.de> <55BFF992.6010309@gmail.com> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2015 23:42:02 -0000 On Mon, 03 Aug 2015 17:30:26 -0600, jd1008 wrote: > Since a CD or DVD iso was dd'ed to this stick, > OS thinks it IS an optical ROM device - and thus > not writable. Nah... that sounds stupid... :-) To the OS, the USB stick is represented as a direct access ("da") media without "implicit" write protection. That's why it should be possible to write to the _device_ - keep in mind the device is agnostic of the file system (which is something happening at a "higher level"). Optical devices are usually controlled by the "cd" driver which also doesn't have an "implicit" understanding of write protection. The fact that a media cannot be written to can originate from (basically) two reasons: a) The media (CD, DVD) cannot be written to, because it physically does not allow it. b) The drive cannot write, because it doesn't have that capability. The same applies to "da" type media, but is much less common due to the nature of the _actual_ media in use in such devices. However, in today's USB sticks, there's much more "firmware magic" than in a CD/DVD writer. In fact, there's a whole computer inside, and it _might_ be possible that the controller is somehow "clever" and refuses writing as it has "learned" that it holds a CD image. Additionally, the firmware can be programmed, and it can be programmed to represent to the system not as a "da" device as you would assume, but as a "cd" device instead. You sometimes find this behaviour in USB sticks that need "drivers" to operate (usually found in "Windows" land): If inserted, it poses as a CD drive, urging you to install the drivers that _then_ tell the PC to turn the USB stick into its "normal" mode. There are also WLAN or UMTS dongles that use a similar mechanism to offer its drivers "per USB CD" to the PC, but those usually don't have the ability to be used as a normal USB stick (for storage). > Same issue happened to me and fixed the stick > by using a linux pc to dd /dev/zero into the stick. That should work - except, of course, the USB stick has been "bricked" and cannot be written to anymore. This may sound stupid as well, but it's possible, as explained. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...