What's the correct way to write an image to a USB stick? I don't write to it while any file systems are mounted. Mounting happens automatically when I plug in the stick, and if I click "Eject" in the GNOME notification, the /dev/sdb block device assigned to the stick is still present, but dead—the open system call fails with ENOMEDIUM.
I've got a fairly default Fedora 19 installation, running GNOME in Classic Mode, still running the 3.11.6-201.fc19.x86_64 kernel.
(Right now, I overwrite the start of the stick with zeros while the system is mounted, sync, unplug, and the plug it in again, for the actual write operation, but that can't be the right thing to do.)
Quoting Florian Weimer fweimer@redhat.com:
What's the correct way to write an image to a USB stick? I don't write to it while any file systems are mounted. Mounting happens automatically when I plug in the stick, and if I click "Eject" in the GNOME notification, the /dev/sdb block device assigned to the stick is still present, but dead—the open system call fails with ENOMEDIUM.
I've got a fairly default Fedora 19 installation, running GNOME in Classic Mode, still running the 3.11.6-201.fc19.x86_64 kernel.
(Right now, I overwrite the start of the stick with zeros while the system is mounted, sync, unplug, and the plug it in again, for the actual write operation, but that can't be the right thing to do.)
i would think "dd" is the obvious solution -- any reason you wouldn't use that?
rday
On Mon, 02 Dec 2013 14:11:13 +0100 Florian Weimer fweimer@redhat.com wrote:
What's the correct way to write an image to a USB stick? I don't write to it while any file systems are mounted. Mounting happens automatically when I plug in the stick, and if I click "Eject" in the GNOME notification, the /dev/sdb block device assigned to the stick is still present, but dead—the open system call fails with ENOMEDIUM.
for Live media: yum info unetbootin
On Mon, Dec 02, 2013 at 14:11:13 +0100, Florian Weimer fweimer@redhat.com wrote:
What's the correct way to write an image to a USB stick? I don't write to it while any file systems are mounted. Mounting happens automatically when I plug in the stick, and if I click "Eject" in the GNOME notification, the /dev/sdb block device assigned to the stick is still present, but dead—the open system call fails with ENOMEDIUM.
I usually do things at the shell. You should be able to use umount to unmount the device and then you can safely overwrite the device using /dev/sdb.
You can use dd to copy over images. (If you do this you probably won't be able to write other stuff to the file system, depending on the image. If you want to do that there are tools for doing that.) You probably want to use a block size larger than the default. (I am not sure if the writes end up being combined at a lower level, but if not, writing USB devices 512 bytes at a time is very inefficient because of the erase block size in these devices is typically in the 128KiB range.)
On Mon, Dec 02, 2013 at 02:11:13PM +0100, Florian Weimer wrote:
What's the correct way to write an image to a USB stick? I don't write to it while any file systems are mounted. Mounting happens automatically when I plug in the stick, and if I click "Eject" in the GNOME notification, the /dev/sdb block device assigned to the stick is still present, but dead—the open system call fails with ENOMEDIUM.
I've got a fairly default Fedora 19 installation, running GNOME in Classic Mode, still running the 3.11.6-201.fc19.x86_64 kernel.
(Right now, I overwrite the start of the stick with zeros while the system is mounted, sync, unplug, and the plug it in again, for the actual write operation, but that can't be the right thing to do.)
You can use the GNOME Disks tool to do this, I believe. It not only supports mount/umount operations but has a Restore Disk operation available in the "tools" menu for each disk or partition.
On 12/03/2013 03:43 AM, Paul W. Frields wrote:
On Mon, Dec 02, 2013 at 02:11:13PM +0100, Florian Weimer wrote:
What's the correct way to write an image to a USB stick? I don't write to it while any file systems are mounted. Mounting happens automatically when I plug in the stick, and if I click "Eject" in the GNOME notification, the /dev/sdb block device assigned to the stick is still present, but dead—the open system call fails with ENOMEDIUM.
I've got a fairly default Fedora 19 installation, running GNOME in Classic Mode, still running the 3.11.6-201.fc19.x86_64 kernel.
(Right now, I overwrite the start of the stick with zeros while the system is mounted, sync, unplug, and the plug it in again, for the actual write operation, but that can't be the right thing to do.)
You can use the GNOME Disks tool to do this, I believe. It not only supports mount/umount operations but has a Restore Disk operation available in the "tools" menu for each disk or partition.
Gnome Disks Tool - that's how I do it, It's never failed and I've done several Fedora 19 installs from USB stick. I leave the iso on the stick and use the stick to save other apps and data but the ISO still works. Roger