|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
Re: [Plug] .iso files mounted as a loopback device?
|
On Tue, 5 Oct 1999 tburba@GLCORPIS01.usvision.com wrote:
> Huh? Wow! What?
Heh, try it, you'll like it.
Got, say, a DOS filesystem on a hard drive somewhere ? Say it's on your
1st SCSI hard drive, 1st partition, so the partition's named /dev/sd0a.
Create a image of the raw device by doing
dd if=/dev/sd0a of=dos.img
Or an image of a CD w/
dd if=/dev/cdrom of=cd.img
Now you have a file called dos.img that contains a raw image of that
entire partition. Now mount it...
mkdir /mnt/loop
mount -t msdos -o loop dos.img /mnt/loop
ls /mnt/loop
Neat, eh ? Can do this for anything. Neat way to store copies of
floppies. You know those rescue disks ? They (or at least the last one I
looked at) have a FAT filesystem, you can mount them with the command
listed above.
you could also do
dd if=/dev/zero of=new.img bs=1024 count=20
mkfs -t ext2 new.img
mount -t ext2 -o loop new.img /mnt/loop
To create a filesystem that's 20mb, and format it as ext2 (standard linux
filesystem).
That kinda thing can be useful for like, DOSEMU.... you can then boot off
a DOS floppy under DOSEMU, with your configuration files set up to mount
that new loopback device, and format it, and sys it to make it bootable,
so you don't need the boot disk to boot DOSEMU.
I used this for a while when I had 2 hard drives, one disk was all FAT,
and the other disk was all ext2. I had a program (probably the
distributed.net client) that I wanted to run continuously, that kept
writing temp files. I also wanted to let my ext2 drive spin down. So I
created & mounted a loopback ext2 filesystem on my DOS disk to store the
temp files.
And yeah, you can have loopback filesystems within loopback filesystems.
I've um, played with them a bit.
__________________________________________________________________
PGP fingerprint = 03 5B 9B A0 16 33 91 2F A5 77 BC EE 43 71 98 D4
darxus@op.net / http://www.op.net/~darxus
Join the Great Internet Mersenne Prime Search
http://www.mersenne.org/prime.htm
_______________________________________________
Plug maillist - Plug@lists.nothinbut.net
http://lists.nothinbut.net/mail/listinfo/plug
|
|