[KLUG Members] making floppy img file
Tony Gettig
members@kalamazoolinux.org
Wed, 28 Jan 2004 13:43:54 -0500
Rock on, Bruce! That worked perfectly! Thanks!
Tony
Quoting Bruce Smith <bruce@armintl.com>:
> > > Maybe I'm missing the obvious, but I can't seem to find info on
> > > this after a few varied googles. Is there a way to create a floppy
> > > .img file from a directory? I know I can use dd to create an image
> > > of an existing floppy, but I have a zip file, the contents of
> > > which I want to extract then make a floppy .img file from. Any
> > > pointers are appreciated.
> >
> > I know there exist command line tools to do this, but I don't recall
> > any names. If this is just something you need to do once, why not
> > unpack the .zip onto an actual floppy, then dd it?
>
> # from memory (I hope it's correct):
>
> # create file of correct size:
> dd if=/dev/zero of=floppy.img bs=1k count=1440
>
> # make a filesystem in the file:
> mkfs.msdos floppy.img
> # you can make any filesystem type, i.e. mke2fs ...
>
> # mount the image as a loopback device:
> mkdir -p /mnt/floppyimg
> mount floppy.img /mnt/floppyimg -oloop
>
> # - BS
>
--
Tony Gettig
Voiceovers, PGP key, and more at
http://gettig.net