[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dd effect on cloning of iso file to usb stick

From: Bob Proulx
Subject: Re: dd effect on cloning of iso file to usb stick
Date: Fri, 3 Oct 2014 11:03:24 -0600
User-agent: Mutt/1.5.23 (2014-03-12)

jb wrote:
> It looks like fdisk, cfdisk, etc are confused about identifying those 
> partitions and their start/end sectors. Is there a partition table at all ?
> If so, where is it located, sectorwise ?

If fdisk and cfdisk are confused then it is probably because the
partition table used in the image is one of the newer formats.  Newer
formats have expanded capabilities.  But the older fdisk and cfdisk
tools haven't been updated yet to deal with those partitions.

Basically seeing fdisk confused about a partition table is normal if
the partition table is a newer format than it knows how to deal with.
You might try using parted to print the partition table.  It has been
updated for the newer formats.

  parted /dev/sdb print

> What if I wanted to retain the standard bit-by-bit cloning ability,
> that is, to clone file.iso to file.iso on a usb stick, without that
> on-the-fly iso transformation to multiple partitions ?  How would I
> go about making a classic backup/cloning of file.iso with dd ?

There is no "on-the-fly iso transformation".  That is simply confusion.

As Eric has explained the /dev/sdb device is the entire raw disk
device.  When you read or write to it you are not reading and writing
to a file system.  You are reading and writing to the raw bits.  By
copying an ISO image to the raw disk you are copying the ISO to the
raw disk.  Since the ISO image has a file system on it that file
system is cloned to the /dev/sdb device.

Any time you see "/dev" in a path then know that you are using the raw
device files and not a file system.  If you were using wanting to
simply copy the file as a file from one place to another then don't
use don't use /dev but use the mounted location such as "/mnt" or
"/media" would would be the file system location.

To copy the file as a file it is simplest to use cp.

  cp Downloads/archlinux-2014.10.01-dual.iso /media/usbdisk/

Note that the above assumes that the usb has been prepared as a
storage device with a file system on it.  It either came pre-formatted
or you formatted it yourself.  Either way.  Then it was mounted either
manually by you or automatically by your desktop session manager to
the /media/usbdisk location.  A typical place.  Then if you want to
simply copy the file as a file then just simply copy the file as a

Often dd is used to create bootable media.  If the iso image is
bootable then copying it to the entire raw usb device will make the
usb device bootable too.  Copying to the raw device will destroy
anything that was previously there and will replace it with the
contents of what you are copying onto it.  Using dd is good for that
type of task of creating bootable devices.  This is very used to
create bootable media that can then be used to boot off of to install
new operating systems such as Arch in your example iso above.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]