Linux Mint Disc Images

Just upgraded my desktop PC to Linux Mint 12 and it's not going terribly smoothly. Apparently there isn't very good support for ATI cards at the moment, so I'm just practicing patience and hopefully things will start to look up soon, but I digress...

Creating an ISO

I've always found the linux dd command to be extremely useful. It is a command line tool for making disc images (technically, it's a bit-stream duplicator, but for my purposes, it's a disc image maker). You basically just supply the input (typically the CDROM device location) and an output (the ISO filename you want). At its most basic, it works like this:

$ dd if=/dev/cdrom of=/home/drew/filename.iso

For some reason, Linux Mint 12 (and likely any current Ubuntu derivative) no longer uses /dev/cdrom to point to the optical drive, so I was a bit flustered when trying to use dd today. I noticed that Mint auto-mounts any discs I put in the drive to /media/disc_name, so I issued a mount | grep disc_name command and realized that the true mount point is at /dev/sr0. This is likely true for you as well. So, putting 2 and 2 together, I realized I needed to do things this way:

$ dd if=/dev/sr0 of=/home/drew/filename.iso

And then things worked out just fine. You could probably make a symbolic link for sr0 at /dev/cdrom instead, if you're used to the old way.

A couple of things to note:

  • You should first unmount /dev/cdrom (or in Linux Mint 12, /media/disc_name) using the umount command.
  • There's no progress indicator for dd (though I believe there are forks that include one, and there are other methods of indicating progress), so if it looks like nothing is happening, don't be alarmed. You may wish to append the dd command with & to start it in the background.

Mounting an ISO

Now that you've got an image of your disc, it's probably handy to know how to mount the image so you can utilize it like a regular disc. First you need to make a directory in the /mnt folder. I make a one-size-fits-all directory, name it "iso", and mount all images there, but you can name it (or them, if you routinely mount multiple images at the same time) whatever you want. Here's the command:

$ sudo mkdir -p /mnt/iso

Note that the -p flag will suppress any errors if the directory already exists. All we need to do now is mount the file with the mount command:

$ sudo mount -o loop filename.iso /mnt/iso

And you're done! Hit the /mnt/iso directory with ls to ensure it worked.

Burning an ISO

For this task, I leave it to a proper application like K3B, but here's a lengthy tutorial if you want to do it command line style. Cheers.

blog comments powered by Disqus