Making a Windows disk a file on Linux

Bruce Dawson jbd at codemeta.com
Fri Sep 10 09:29:01 EDT 2004


On Thu, 2004-09-09 at 23:12, Jeff Macdonald wrote:
> Hi,
> I just bought a new Dell Laptop for my wife and I'd like to use her
> old one for Linux. I have a file server running Gentoo that has mp3
> and videos and runs Samba for windows networking. What I'd like to do
> is dd the windows disk and have the target be a file and then mount
> that file as a FAT32 file system. In other words I don't want to
> create a partition for the data. I just want to keep it around for a
> while until I'm sure I don't need it anymore (a few years, just for
> good measure).

I believe this can be done using '-o loop' in mount, allowing you to
mount a file as a mounted file system. I haven't tried it myself, so I'm
not sure.

You'll just need to specify '-t vfat' or somesuch. And, you may also
need to specify something to force logical block addressing for the
filesystem. It will require someone who has done it before, or some
playing with on your part. But it should be do-able.
 
> Here is the catch, the disk is 60Gigs but only 11Gigs is being used.
> So I'd rather have just a 11Gig file instead of a 60 Gig file (I only
> have 20 Gigs free anyway). Can I do something like:
> dd {opts} | gzip {options} > file
> mount {options to read compressed file}
> mount {loop options to present previous mount a FAT32}
> 
> or should I shrink the drive instead?

I don't know enough about VFAT vs FAT32 to know if the 110GB file will
pose a problem or not.

--Bruce
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20040910/898ee4f0/attachment.bin


More information about the gnhlug-discuss mailing list