59

My laptop comes with a program called "Acer Recovery Management", which allows you to make a bootable recovery USB stick, from which you can boot to recover the computer to its original state.

Now, of course (I don't know why Acer didn't think about this) I don't want to give up a perfectly usable USB stick – which BTW needs to be at least 16 GB – to be a 'recovery disk' that I will probably never use anyway. But I still want to make it, just in case.

So, is there a way to convert the data on this bootable USB to an ISO file (or format), so that I can keep it on an external hard drive somewhere instead of a USB stick, and in case of problems convert the ISO back into a bootable USB with e.g. unetbootin?

3 Answers 3

61

To create an image from a drive

sudo dd if=/dev/sdx of=/path/to/new.iso

Alternatively, to create a USB drive from an image

sudo dd if=/path/to/iso of=/dev/sdx

Replace /dev/sdx with your USB drive, e.g. /dev/sdc.

WARNING: It is imperative that you make certain you are using the correct drive. If you don't use the correct drive, you could lose your data. To check your currently mounted drives, use the command lsblk.

Note: Copying large files (1 GB or higher) can take a long time, be patient.

7
  • 2
    Have you tried it sometime?
    – user35443
    Jan 13, 2013 at 18:11
  • 5
    @user35443 I've used this method to create duplicate SD drives for my Raspberry Pi's
    – camconn
    Jan 13, 2013 at 18:34
  • 6
    I can see that the it's only half of the pen drive actually used (around 2GB in a 4GB device). How can I produce an ISO that stores only the area that is used, instead of the full 4GB one?
    – nightcod3r
    Oct 24, 2016 at 21:34
  • 2
    nightcod3r, just pipe it through gzip $> dd if=/dev/yourDevice bs=1M | gzip > /path/to/new.iso.gz
    – Wolfgang
    Dec 27, 2016 at 20:36
  • 2
    I don't think this works. VirtualBox chokes on ISO's created this way saying it's an unreadable boot medium.
    – irwinr
    Jan 16, 2019 at 18:33
24

Another option is to use gnome-disks.

You can start if from a terminal with gnome-disks or look for the application Disks in the Dash.

Once the USB stick is mounted, select it and use the more actions icon to choose Create Image.

Disks is a GUI for the same command.

3
  • 5
    Does this copy the boot record? Would it make another usb bootable if restored?
    – Harindaka
    Feb 15, 2016 at 16:36
  • 3
    It doesn't look like it does. Testing image via Vbox results in a unreadable boot medium. Jun 13, 2018 at 22:07
  • It creates .img files, not .iso
    – it3xl
    Jan 6, 2021 at 19:30
3

"USB Image Tool" is a freeware for Windows which can create images of your BOOTABLE USB flash drives and also allows you to restore them later. This free tool can be used to create backup images of almost all types of BOOTABLE USB devices such as flash drives, card readers, digicams, cell phones and mobile music players.

Its a portable tool so you don't need to install it. Just download and run the program. Using the program is very easy. You can create the backup or restore the backup in a few clicks.

It can be used in Windows XP, Vista, Windows 7 and Windows 8. Both 32-bit and 64-bit editions are supported.

You can download it using following link: http://www.alexpage.de/usb-image-tool/download/

2
  • 1
    Tried it today, works fine. Used Universal Usb Installer to create the bootable Ubuntu 16.04.1 usb. Will use this utility in Windows to create restore points of Ubuntu on another disk. Made backup, corrupted usb, restored: had a working version.
    – Martin
    Feb 2, 2017 at 15:19
  • 2
    Generates an IMG file, not ISO as requested by OP
    – K7AAY
    Aug 29, 2018 at 15:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .