coreutils
[Top][All Lists]
Advanced

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

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


From: Eric Blake
Subject: Re: dd effect on cloning of iso file to usb stick
Date: Thu, 02 Oct 2014 17:37:42 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

On 10/02/2014 04:33 PM, jb wrote:
> Hi,
> 
> could you please explain what happened to the iso cloning ?
> 
> $ ls -al Downloads/
> -rw-r--r--  1 jb jb 599785472 Oct  2 22:39 archlinux-2014.10.01-dual.iso

If you install libguestfs-tools, you can run 'virt-inspector -a
archlinux-2014.10.01-dual.iso' to see exactly what is in that iso.


>     
> # dd bs=4M if=Downloads/archlinux-2014.10.01-dual.iso of=/dev/sdb && sync

This says to copy the exact iso over (as much as possible of) the entire
usb stick.  If the iso itself contains partitions, then your stick will
now contain those same partitions.

> # fdisk -l /dev/sdb
> 
> Disk /dev/sdb: 3.8 GiB, 4051697152 bytes, 7913471 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disklabel type: dos
> Disk identifier: 0x574a1394
> 
> Device     Boot Start     End Sectors  Size Id Type
> /dev/sdb1  *        0 1171455 1171456  572M  0 Empty
> /dev/sdb2         252   63739   63488   31M ef EFI (FAT-12/16/32)

In fact, it looks like the iso image intentionally contains two
partitions, with the /dev/sdb2 partition existing to make it possible to
boot your USB stick on a UEFI system.


> Question:
> I dd-ed an iso file (it is a bit-for-bit copy/cloning), which resulted in
> sdb1.
> What is this sdb2 about, where did it come from ?

It was put in the iso by the person that created it.  This is not a bug
in dd, which faithfully copied the entire iso contents to your disk.
There's nothing wrong here.

> 
> I see the above happen with Arch Linux iso, but not with Fedora iso:

That's because the particular Fedora iso you chose to play with does not
contain multiple partitions, perhaps because it was designed for BIOS
booting rather than UEFI booting.  But still off-topic for coreutils.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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