|
The dd command can write to the device, so the floppy doesn't need to be mounted.
For example, if you have a 30GB hard disk on your laptop you could created a backup of the hard drive image and save it to a mounted external usb drive. Then if the hard drive goes belly up, you can reverse the process.
dd if=/dev/hda of=/media/usbdrive/hda.img bs=512
This will work even if the drive has partition on it. The image file contains the MBR and the partition table.
dd if=/mnt/cdrom/images/bootdisk.img of=/dev/fd0
The bootdisk.img file contains the image of an entire floppy disk including the filesystem. It might of been created with the mkbootdisk command, or might have been copied from a real floppy disk. The dd command writes this image file to the floppy device. So you can start with a blank disk. The image contains the filesystem, so you don't need to format the disk.
mount /dev/fd0 /mnt/floppy
Now that the floppy image is written, the floppy disk contains a filesystem which can be mounted.
And the last line copies the ks.cfg file to the floppy.
cp ks.cfg /mnt/floppy
Make sure you run "umount /dev/df0" before ejecting the floppy disk. The ks.cfg file may still be written to the cache. Because a floppy is so small, the entire filesystem may be cached to speed things up. You need to umount the floppy to save your changes.
|