Linux Create Disk Image File

$ mkdir image_mount_point # mount -o loop image.iso image_mount_point. Where image_mount_point is a directory you create specifically to mount the ISO, and image.iso is an ISO image file, say, a live CD image (Figure 3). How to Create a Disk Image from a Linux System Using Systemback Author Info wikiHow is a wiki similar to Wikipedia, which means that many of our articles are written collaboratively.

Creating an ISO file from any disc is pretty easy with the right free tool and is a fantastic way to back up important DVDs, BDs, or CDs to your hard drive.

Creating and storing ISO backups of your important software installation discs, and even operating system setup discs, is a smart plan. Complement that with an unlimited online backup service and you have a near bulletproof disc backup strategy.

ISO images are great because they're self-contained, perfect representations of the data on a disc. Being single files, they're easier to store and organize than outright copies of the folders and files on a disc would be.

Image

Windows doesn't have a built-in way of creating ISO image files, so you'll need to download a program to do it for you. Fortunately, there are several freeware tools available that make creating ISO images a really easy task.

Time Required: Creating an ISO image file from a DVD, CD, or BD disc is easy but could take anywhere from a few minutes to over an hour, depending on the size of the disc and the speed of your computer.

Make an ISO From a DVD, BD, or CD Disc

  1. Download BurnAware Free, a completely free program that, among other tasks, can create an ISO image from all types of CD, DVD, and BD discs.

    BurnAware Free works in Windows 10, Windows 8, Windows 7, Windows Vista, and Windows XP. Both 32-bit and 64-bit versions of those operating systems are supported.

    There are also 'Premium' and 'Professional' versions of BurnAware that are not free. However, the 'Free' version is fully capable of creating ISO images from your discs, which is the aim of this tutorial. Just make sure you choose the 'BurnAware Free' download link.

    If you've used BurnAware Free before and you don't like it or it didn't work, there are alternative ways to make an ISO from a disc. See some other software suggestions at the bottom of this page.

  2. Install BurnAware Free by executing the burnaware_free_[version].exe file you just downloaded.

    During or after installation, you may see one or more Optional Offer or Install Additional Software screens. Feel free to decline or deselect any of those options and continue.

  3. Run BurnAware Free, either from the shortcut created on the Desktop or automatically via the last step in the installation.

  4. Click Copy to ISO from the Disc Images column.

    The Copy to Image tool will appear in addition to the existing BurnAware Free window that's already open.

    You might have seen a Make ISO icon below the Copy to ISO one but you don't want to choose that for this particular task. The Make ISO tool is for creating an ISO image not from a disc, but from a collection of files you select, like from your hard drive or another source.

  5. Choose the optical disc drive that you plan on using, from the drop-down at the top of the window. If you only have one drive, you'll only see one choice.

    You can only create ISO images from discs that your optical drive supports. For example, if you only have a DVD drive, you won't be able to make ISO images from BD discs because your drive won't be able to read the data from them.

  6. Navigate to the location that you want to write the ISO image file to and give the soon-to-be-made file a name in the File name text box.

    Optical discs, especially DVDs and BDs, can hold several gigabytes of data and will create ISOs of equal size. Make sure that whatever drive you choose to save the ISO image to has enough room to support it. Your primary hard drive likely has plenty of free space, so choosing a convenient location there, like your Desktop, as the location to create the ISO image is probably fine.

    Important: If your ultimate plan is to get the data from a disc onto a flash drive so you can boot from it, please know that simply creating an ISO file directly onto the USB device isn't going to work as you expect. In most cases, like when installing Windows 10 from a flash drive, you have to take some extra steps to make this work. See How to Burn an ISO File to a USB Drive for help.

  7. Insert into the optical drive you chose in Step 5 the CD, DVD, or BD disc that you want to create the ISO image from.

    Depending on how AutoRun is configured in Windows on your computer, the disc you just inserted may start (e.g., the movie may start playing or you may get a Windows installation screen). Regardless, close whatever comes up.

  8. Do you get a There is no disc in the source drive message? If so, just click OK and then try again in a few seconds. Chances are, the spin-up of the disc in your optical drive hasn't completed, so Windows just doesn't see it yet. If you can't get this message to go away, make sure you're using the right optical drive and that the disc is clean and undamaged.

  9. Wait while the ISO image is created from your disc. You can watch the progress by keeping an eye on the Image progress bar or the x of x MB written indicator.

  10. The ISO creation process is complete once you see the Copy process completed successfully message along with the time BurnAware finished ripping the disc.

The ISO file will be named and located where you decided in Step 7.

You can now close the Copy to Image window, and also the BurnAware Free window. You can also now remove the disc you were using from your optical drive.

Creating ISO Images in macOS and Linux

Making an ISO in macOS is possible with included tools.

  1. Open Disk Utility.

    You can do this via Applications > Utilities > Disk Utility.

  2. Go to File > New Image > Image from [device name].

  3. There are also options to change format and encryption settings.

  4. When finished, click Done.

Once you have the CDR image, you can convert it to ISO via this terminal command:

To convert the ISO to DMG, execute this from the terminal on your Mac:

In either case, replace /path/originalimage with the path and filename of your CDR or ISO file, and /path/convertedimage with the path and filename of the ISO or DMG file you want to create.

On Linux, open up a terminal window and execute the following:

Learn how to open a terminal window in Ubuntu if that's what you're using.

Replace /dev/dvd with the path to your optical drive and /path/image with the path and filename of the ISO you're making.

If you'd prefer to use software to create an ISO image instead of command line tools, try Roxio Toast (Mac) or Brasero (Linux).

Other Windows ISO Creation Tools

While you won't be able to follow our tutorial above exactly, there are several other free ISO creation tools available if you don't like BurnAware Free or if it's not working for you.

Some favorites that we've tried over the years include InfraRecorder, ISODisk, ImgBurn, ISO Recorder, CDBurnerXP, and Free DVD to ISO Maker.

Active8 months ago

As I understand it, creating an image of a Linux system makes an exact copy of the OS and any user files/configurations/programs etc.

What I would love to do is create an image of my work PC and install it at home on my desktop. Can someone briefly explain the process of creating and installing images of Linux systems?

Home OS: Windows. Want: An image file that can be executed in a virtual machine (VMPlayer or VirtualBox) or booted directly on my home PC. I have tried clonesys but would appreciate a different method.

Hennes
59.9k7 gold badges94 silver badges144 bronze badges
toc777toc777

5 Answers

something you could try.

Prepare a live cd (doesn't matter which one).Have an external storage device large enough (same size as the work HD) to hold the image.

Put the live cd into your work computer and boot it up.Mount your external storage (or even network if you are so inclined)

Use dd to clone the hard drive on your work computer and store it as an image on your storage

Shutdown your work computer

do the same exact method on your home laptop, but instead of cloning your hard drive, you'll be putting your image on your hard drive essentially you have to reverse the if= and of= commands

You might have some hardware compatibility issues right out of the box unless the hardware of your home and work comps are the same. But it is all solvable :)

Enjoy.

Community
g19fanaticg19fanatic

http://www.linux-live.org/ gives you a really simple howto of the process:

Linux Live Kit is a set of shell scripts which allows you to create your own Live Linux from an already installed Linux distribution. The Live system you create will be bootable from CD-ROM or a disk device, for example USB Flash Drive, USB Pen Drive, Camera connected to USB port, and so on. People use Linux Live Kit to boot Linux from iPod as well.

slhck
170k49 gold badges475 silver badges491 bronze badges
Chad LongstaffChad Longstaff

You could use partimage to create an live image.But I think it's hard to get an working live image which you can easily transfer to one pc to the other.

When you can shutdown your work pc I would recommend a live cd with partimage and create an image to an usb stick and rewrite it on the home pc.

Or if you can't shutdown your pc, you could use dump (http://linux.about.com/od/commands/l/blcmdl8_dump.htm) to a file or over network (ssh).

Benjamin
2572 gold badges9 silver badges28 bronze badges
Image
patrickspatricks

You can easily clone the OS using Clonezilla (the Live CD), but just know that the destination drive must be as big, or bigger than the original. These steps will show you how to clone the disk to another.

NOTE - backup your data

invertinvert
4,8452 gold badges17 silver badges32 bronze badges

Here's how I've just done that:

Windows 10 desktop

  • Install VirtualBox

The following steps are to provide a way to copy the disk image. I didn't have an external storage device with enough space to hold my laptop's disk image so I mounted my Windows machine vía SSH. There are other ways to do this, but this was easiest for me in the situation.

  • Enable WSL and reboot when prompted
  • Install Ubuntu from the Windows Store
  • Start Ubuntu from the Start Menu
  • Run sudo apt install openssh-server to install sshd
  • Run sudo nano /etc/ssh/sshd_config to edit the sshd configuration
  • Change PasswordAuthentication no to PasswordAuthentication yes, then press Ctrl+x, y, enter to save
  • Run sudo /etc/init.d/ssh restart

The Windows Firewall dialog should pop up now, click Accept to allow incoming connections.

Linux laptop

Run sudo apt install sshfs virtualbox to give you the sshfs and vboxmanage commands.

Now's a good time to test you can make an SSH connection to your Windows machine

If, in the next section, you create an image of your entire disk instead of just the Linux partition, then you probably won't need to do this.

I wanted to save space so only took my Linux root partition, but this isn't bootable by itself so I created a bootable ISO image:

Linux laptop

  • Install packages required by grub-mkrescue: sudo apt install grub-pc-bin xorriso
  • Make a directory to hold the bootable files: mkdir -p efibootiso/boot/grub
  • Copy the Grub EFI bootloader: cp /usr/lib/grub/x86_64-efi/* efibootiso/boot/grub/
  • Copy your laptop's Grub configuration: cp /boot/grub/grub.cfg efibootiso/boot/grub
  • Make the image: grub-mkrescue -o boot.iso efibootiso
  • Copy it to your Windows machine: scp boot.iso username@windowsten:/mnt/d/VMs/WorkLaptop/

Linux laptop

  • Reboot and select advanced options, then recovery mode from the bootloader
  • Select network from the recovery menu to enable networking
  • Then select the root console option and press enter
  • Run mount to check your root partition (mine is /dev/sda8 )
  • Make a temporary directory to mount your Windows machine, eg: mkdir /run/windowsten
  • Mount your Windows machine, eg: sshfs username@windowsten:/ /run/windowsten
  • Change directory to the location you want to save your disk image, eg: cd /run/windowsten/mnt/d/VMs/WorkLaptop

Here's the trick, if you run mount -o remount,ro / now then you'll get told it's in use, so instead use the magic sysrq keys: SysRq+s to force sync, then SysRq+u to force remount readonly.(SysRq on my laptop was Alt Gr + Print Screen)

  • Now make the VDI file with vboxmanage convertfromraw /dev/sda8 worklaptop.vdi

This will take a long time. I got about 10GB/hour with both machines using 802.11n wifi. Next time I'll use a wired connection.

When It eventually finishes, you'll have a disk image of your laptop's Linux partition.

Windows 10 desktop

  • Start VirtualBox
  • Click New
    • Click Expert Mode
    • Give your VM a name
    • Select the OS type and version (eg. Linux, Ubuntu (64 bit)
    • Give it enough RAM
    • Select 'Use an existing virtual hard disk file' radio button
    • Click the yellow folder icon
    • Browse to and select the VDI file from the previous step
    • Click Create
  • Select your new VM
  • Click Settings
    • Click Storage
    • Select the optical Drive
    • Click the disc icon and select 'Choose Virtual Optical Disc File'
    • Browse to and select the boot.iso image
  • Click System
    • Verify the optical drive is above hard disk in the boot order
    • Check Enable EFI
    • Click OK

Now you should be able to boot your VM.

Aaron FAaron F

Create Cd Image

Not the answer you're looking for? Browse other questions tagged linuxinstallationdisk-image or ask your own question.