Sign In

    Enjoy FOSSwire's content? Have it delivered! Subscribe

    Use an ISO as if it were a real CD

    There are a few occasions when you may need or want to use an ISO image without actually burning it. You may want to grab a file off of a CD, or maybe you’re storing an image of a disk for use in Wine. Using mount points, this is an easy task.

    The Quick Way

    On a recent GNOME desktop, opening or mounting ISO images (and other archives) is very simple. Simply right-click the image, and select Open With > Archive Mounter. Done! The image will show as a drive in Places or on your desktop.

    This is the easiest way to grab a file from an image or an archive without having to open an archive manager or extract everything. But, it has its limitations. Because it is mounted under GVFS, it is typically only available on a GNOME desktop. Wine may also have trouble understanding where the image was mounted to as well, and reconfiguring Wine every time you want to change discs is no fun.

    The More Reliable Way

    Almost as quickly as the previous solution, you can mount the image in a terminal:

    sudo mount -o loop /path/to/image.iso /media/cdrom

    We’re using the CD drive location here to keep things simple: GNOME and Wine will both think that it is just a normal CD or DVD. The location of your CD drive on your filesystem may differ; check your distribution documentation for details. The -o loop option is needed because image.iso is not a block device, as the mount command would expect, but a file.

    To remove the mount point again, point the umount command at the location of the CD drive:

    sudo umount /media/cdrom

    Bonus: The Graphical More Reliable Way

    If you find yourself swapping disk images out frequently, you may find Gmountiso useful. You can easily swap out multiple images and mount points, and it works in the same manner as the mount/umount commands do.


    Command Line Tip - Verify Downloaded Files

    CD image - source http://www.sxc.hu/photo/1015749

    Ever wondered what that MD5sum and SHA1sum things are when you are downloading ISO images? Whether it's a Linux distro, or any other file, you might have seen these 'checksums' floating around.

    Their purpose is to allow you to verify that you have a complete and uncorrupted copy of a file. If you can generate the same checksum with your copy of the file, then the file must be a true copy.

    So, how do you verify these checksums?


    For Windows users

    Windows users - you need to first download both md5sum.exe and sha1sum.exe from the CentOS dostools page. Once they've downloaded, copy them to C:\WINDOWS\system32 (so you can use them from the command line without typing the whole path).


    Pretty simple. Open up your command line terminal - usually in Accessories or System Tools on Linux. Windows users - you'll want to do Start > Run > cmd.exe > OK.

    Then simply type either md5sum or sha1sum, followed by the full path to the downloaded file.

    For example, if I want to verify the MD5 of ubuntu-8.04.1-desktop-i386.iso stored in /home/peter/Downloads, I'd do this:

    md5sum /home/peter/Downloads/ubuntu-8.04.1-desktop-i386.iso

    Similarly, to check the SHA1 sum:

    sha1sum /home/peter/Downloads/ubuntu-8.04.1-desktop-i386.iso

    After some calculation, which might take a while depending on file size, you'll get a checksum of your own. Compare this to the one listed on the website you downloaded from.

    If the two checksums match, your copy is complete and true. Burn with confidence!

    Windows users - your paths will look something more like: md5sum "C:\Documents and Settings\Peter\My Documents\Downloads\ubuntu-8.04.1-desktop-i386.iso". It's just the same idea, though!

    [image source]


    Burning CD and DVD ISO images with cdrecord

    So, I've just successfully downloaded my image of Fedora 8, Werewolf (after one unsuccessful attempt) and I'm ready to burn it. It's a DVD ISO image and I downloaded it on my CLI only server.

    So, how do I burn it from the command line? There are actually a couple of different programs you can use, but for this example I'm going to show you how to use cdrecord. Yes, it's called cdrecord, but it works with DVDs too, don't you know?

    So I pop in a blank DVD-R disc in my drive, and run the following:

    # cdrecord -v -dao speed=4 dev=/dev/dvd /path/to/Fedora-8-i386-DVD.iso

    There are some things in that command that need a little explanation, so let's take a look:

    -v - turns on verbose mode. If, heaven forbid, something were to go wrong with the burning process and I was to be left with a coaster, I will at least know what with this switch activated.

    -dao - puts us in Disc At Once mode. Since we're burning an ISO image here, I don't want to add any more data later in a future 'session', so I can just instruct cdrecord to put it in one session and finalise the disc.

    speed=4 - I keep the burning speed down as it is more likely to burn properly and not fail. You can experiment with higher speeds if you want, but don't go higher than either your media or burner state they can do (and do

    dev=/dev/dvd - this is the device node for your DVD drive. It's usually safe to put /dev/dvd here, but if that doesn't work, you may need to use /dev/cdrom or something else.

    Finally, I specify the path to the ISO image I want to burn.

    After some interesting messages, the burn process should start and you should get a progress message showing you the amount of data that has been copied and some other diagnostic information.

    Finally, you should get something along the lines of:

    Track 01: 3266 of 3266 MB written (fifo 100%) [buf 97%] 39.2x.
    Track 01: Total bytes read/written: 3424749568/3424749568 (1672241 sectors).
    Writing time: 645.893s
    Average write speed 35.7x.
    Min drive buffer fill was 11%
    Fixating...
    Fixating time: 26.881s
    cdrecord: fifo had 53944 puts and 53944 gets.
    cdrecord: fifo was 0 times empty and 27183 times full, min fill was 76%.

    At this point, you can eject your disc and put it to use - however that may be!