BashCode

Item contains bash code

Mounting partitions from disk images in Linux

I've recently been working extensively with disk image files (actually Compact Flash images, but that's not a useful differentiation). The first time I tried to mount one to work on, with a simple "mount -o loop hd.img /mnt", I was confronted with "mount: you must specify the filesystem type". Okay, then -- "mount -o loop hd.img /mnt -t ext2". Still no love. What gives? A couple of seconds of actually thinking about it gives the answer -- mount mounts partitions -- not disks.

The solution is straightforward enough, but somewhat burdensome. I'll present a shell script to make it easy.

Syndicate content