You are not logged in.

#1 2009-08-05 20:14:25

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,683
Website

how to use dd to create a floppy image from a directory [SOLVED]

I need to create a floppy img file that I can use in virtualbox as a virtual floppy disk drive.  I have the files I need on the image in ~/disk but I can't get the syntax of dd right to do this.  The required format is .img and I know dd can do this.  All I can seem to find via google is how to go from a block device (/dev/fd0) to an image file, but not from a directory on the filesystem to an img.  Help smile

Last edited by graysky (2009-08-05 20:28:12)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2009-08-05 20:27:58

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,683
Website

Re: how to use dd to create a floppy image from a directory [SOLVED]

Ahhh.. thanks to this page.  It's a 2 step process

1) Make an empty image file
2) Mount it via loop and write the contents to it

$ dd bs=512 count=2880 if=/dev/zero of=floppy.img
$ mkfs.msdos floppy.img
$ sudo mount -o loop image.img /media/floppy/
<<<copy your files on to the "drive" now>>>
$ sudo umount /media/floppy/

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB