User Tools

Site Tools


ubuntu:iso:create_iso_from_a_bootable_usb_drive:using_dd

Ubuntu - ISO - Create ISO from a Bootable USB Drive - Using dd

dd is a powerful Linux tool for a wide range of disk-related tasks:

* creating disk images * copying data between devices * performing low-level operations on data

dd makes a bit-for-bit copy of the USB drive’s contents into a single ISO file.


Make a Copy

Create a copy from the bootable USB to a file:

sudo dd if=/dev/sdb1 of=myisofile bs=4M status=progress

NOTE: This creates a raw binary copy of the USB in the current directory.

These are optional parameters, but do help:

  • bs=4M: Read and write up to 4M at a time; to make I/O faster.
  • status=progress: Provide a progress report while dd runs.

Convert the raw binary file to an ISO format

Install genisoimage:

sudo apt install genisoimage

Convert the raw file to an ISO format

sudo genisoimage -o converted.iso -input-charset utf-8 -R -J myisofile

NOTE:

  • -o: converted.iso specifies the name of the output ISO file in proper ISO 9660 format.
  • -input-charset utf-8: sets the character encoding for the ISO image.
  • -R: generates the Rock Ridge extension for UNIX file attributes.
  • -J: generates the Joliet extension for Windows file systems.

The output converted.iso will be in a standard ISO format and can be used for various purposes, including burning to optical media or distributing bootable images.


Verify the ISO Format

Perform a simple check to examine the ISO’s structure and extract information about its content.

sudo isoinfo -d -i converted.iso 

returns:

CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: CDROM
...
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 123456
Joliet with UCS level 3 found
Rock Ridge signatures version 1 found

NOTE: isoinfo is a part of the genisoimage package:

The resulting output confirms that the converted.iso file is in the ISO format.

It provides details about its volume and file system attributes and support for extended file names and attributes.

ubuntu/iso/create_iso_from_a_bootable_usb_drive/using_dd.txt · Last modified: 2024/07/30 15:24 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki