Hidden Linux : ISO magic

In Linux, you don't need to
burn a CD or DVD image to a disc to take a look at its
contents. Since "everything's a file", it's just a matter of mounting
it.ISO images -- from which CDs and DVDs are traditionally burnt -- are interesting (and useful!) because the don't just contain files but also the filesystem metadata. (That's stuff like boot code, filesystem structures and file attributes.) It means you can download a single file -- like the latest version Ubuntu -- and create an independently bootable operating system just by writing it to a disc.
So do you mount an ISO file?
mount -o loop image_file.iso /mnt/image
Simple as that!
(Of course you do need to be root to mount things. Ubuntu users should prefix that command with sudo. And you need a place to mount the image. I did that with the command mkdir /mnt/image -- also as root.)
Once it's mounted, you're free to browse it via any GUI-based browser.
ISOs are a brilliant way of backing things up. How? Again, it's really simple...
dd if=/dev/hda1 of=/image_file.iso
where if indicates the input file and of the output file.
Note that dd requires a device address, not a directory. Imagine you're using a spare HDD for backups and have it mounted as /media/backups. A df -h lists it as...
Filesystem
Size Used Avail Use% Mounted on
/dev/hdb1
37G 177M 35G 1%
/media/backups
<--Previous Hidden Linux Next Hidden Linux -->



Comments
I found a link for this interesting article in:
http://ubuntuforums.org/showthread.php?t=621146&page=2
Posted by: TH1RT33N | January 18, 2009 1:38 PM