We all know how to create a bootable USB drive from an ISO. We can create bootable USB devices using dd command, Ventoy, Etcher, Popsicle, Bootiso, MultiCD and Mkusb. Now, we are going to do it reverse. Yes, in this brief tutorial, we will see how to create an ISO from a bootable USB drive in Linux that we created already. This will be very helpful when you lost your actual ISO image and wanted to create an additional bootable drive.
There are two ways to create an ISO from a bootable USB drive - the command line way using
dd command and the graphical way using Gnome Disks. First, we will see the GUI way, which is very easy for newbies!
Download - Free Guide: "Advanced Bash-Scripting Guide"
Table of Contents
1. Create An ISO From A Bootable USB Drive Using GNOME Disks
We can easily create an ISO from an existing bootable USB drive with GNOME Disks. As you might already know, Gnome Disks is a graphical utility to manage disk drives and media.
Gnome Diska provides the necessary utilities and applications to deal with your storage devices. GNOME Disks comes pre-installed with all GNOME desktop Linux editions by default. If it is not installed by any chance, install it as shown below.
On Arch Linux and its derivatives:
$ sudo pacman -S gnome-disk-utility
On Debian, Ubuntu:
$ sudo apt install gnome-disk-utility
On Fedora, RHEL, CentOS, AlmaLinux, Rocky Linux:
$ sudo dnf install gnome-disk-utility
$ sudo zypper in gnome-disk-utility
Once installed, plug your USB drive in your system. Then open GNOME Disks utility either from the Dash or Menu.
The default interface of GNOME Disks will look like below.
I already have Ubuntu 18.04 bootable USB drive in hand. If you don't have one, use any one of the USB bootable creation tools mentioned in the first paragraph.
Select the bootable USB drive from the list. Choose the partition that contains the ISO (It is mentioned as ISO 9660). And then click on the Cogs icon. It will look like two gear boxes below the partition. See the arrow mark.
Choose Create Partition Image option from the drop-down list.
Enter the name and choose the location to save the ISO image. I am going to save it in Documents folder. Finally, click "Start creating" icon.
Now, GNOME Disks utility will start to create an ISO image from the bootable USB drive.
Once bootable USB creation progress is done, go to the location where you saved it and verify if the ISO has been created.
That's it. We have successfully created the ISO image from a bootable USB drive. Boot your system with the newly created system to check if the ISO image really works or not.
I tested the ISO on VirtualBox and it worked!!
1.1. Create Entire Drive Image
The above method will create the partition's image that contains the ISO. You can also create the entire USB disk's image.
To do so, choose the USB drive from the NOME Disks interface and click the three horizontal lines at the top right corner.
From the drop down box, choose "Create disk image" option, choose the name and location to save the disk image.
The entire disk image will be saved in .img format. You may need to find a suitable application to convert it to ISO format to boot your system.
2. Create An ISO From A Bootable USB Drive Using dd Command
Alternatively, use "dd" command to create ISO image of the USB drive using the following command:
$ sudo dd if=/dev/sdc of=bootableusb.iso
Replace the USB drive letter (i.e.
/dev/sdc) with your own.
30464000+0 records in 30464000+0 records out 15597568000 bytes (16 GB, 15 GiB) copied, 482.085 s, 32.4 MB/s
This command will create an ISO image of the contents of the entire USB drive and save it in a file named "bootableusb.iso" in the current working directory. This image is owned by only the root user. Set proper user permission to the newly created ISO file using:
$ sudo chown $USER:$USER bootableusb.iso
These are the two ways to create an ISO from a bootable USB drive in LInux. Now you have your actual ISO image back. Like I said, this will be helpful in a situation when you lost your ISO image. Just plug your bootable drive, open GNOME Disks utility and create ISO in minutes.
Please note that if you already lost the bootable USB drive, then you have no choice, but download the ISO from Internet.