Page 1 of 1
Make And Emulate a FAT12 Floppy
Posted: Sun Jun 20, 2010 4:52 pm
by Nathan
Hello,
I'm trying to work with
BootProg, but one of it's requirements(for the boot sector) is to have a FAT12 formatted floppy, to write the boot loader. I've tried to create the floppy image using Virtual Floppy Drive, MagicISO and WinImage, but used only Virtual Floppy Drive to emulate my floppy image(because I think this is the only program that can emulate floppy's).
When I try to run BOOTABLE.EXE(to write the boot sector, program that is included with BootProg), I got this:
Code: Select all
C:\bootprog> bootable boot.bin A:
Loading a boot sector file...
OK.
Reading original boot sector...
OK.
Altering original boot sector...
FAT types don't match.
Original FAT type: FAT16
New FAT type: FAT12
Failed.
I don't know what to do. Could you help me?
Best Regards,
Nathan Paulino Campos
Re: Make And Emulate a FAT12 Floppy
Posted: Sun Jun 20, 2010 5:03 pm
by gravaera
Maybe you could try reading the error code.
Re: Make And Emulate a FAT12 Floppy
Posted: Sun Jun 20, 2010 5:06 pm
by Nathan
My floppy image is a FAT16, and it should be FAT12. This is the error(as I can see).
Re: Make And Emulate a FAT12 Floppy
Posted: Sun Jun 20, 2010 5:57 pm
by pcmattman
dd + mkdosfs.
Don't even need to mount the image.
Re: Make And Emulate a FAT12 Floppy
Posted: Sun Jun 20, 2010 6:04 pm
by Nathan
pcmattman wrote:dd + mkdosfs.
Don't even need to mount the image.
Yeah, but I need to mount the image, because the program BOOTABLE.EXE just writes to a "physical" drive.
Also, did you have a good tutorial of how to use dd and mkdosfs using Cygwin?
Re: Make And Emulate a FAT12 Floppy
Posted: Sun Jun 20, 2010 6:11 pm
by pcmattman
dd + mkdosfs can create a FAT12 image... that you can mount with VFD and use with this "BOOTABLE.EXE" thing you're obsessed with.
It'd be easier to just write your own bootloader.
As for tutorials, you can spend 30 seconds on Google, I'm not doing that for you. Or try "man dd" and "man mkdosfs" and try learning something for yourself for once.
Re: Make And Emulate a FAT12 Floppy
Posted: Sun Jun 20, 2010 6:32 pm
by Nathan
Ok, I've done better, I got my Linux laptop(an Eee PC 904HD with Ubuntu Hardy Heron), and I will do all, using Wine to help me with the BootProg things.
Re: Make And Emulate a FAT12 Floppy
Posted: Sun Jun 20, 2010 8:29 pm
by Tosi
As far as I know you don't need anything like BootProg on linux.
You can set up a floppy image as a loopback device (see losetup(8)) and then mount it like any other device.
Re: Make And Emulate a FAT12 Floppy
Posted: Mon Jun 21, 2010 3:43 am
by Nathan
Tosi wrote:As far as I know you don't need anything like BootProg on linux.
You can set up a floppy image as a loopback device (see losetup(8)) and then mount it like any other device.
Yeah, I know that, but I'm mounting it to a directory(/mnt/os), then when I try to write to the boot sector, like this:
Code: Select all
dd if=/mnt/os of=boot.bin bs=1 count=512 skip=0
I got an error message saying that it's a directory.
What I need to do?
Re: Make And Emulate a FAT12 Floppy
Posted: Mon Jun 21, 2010 6:04 am
by Combuster
Mounting is for accessing the filesystem. Access the image for writing the bootsector.
Re: Make And Emulate a FAT12 Floppy
Posted: Mon Jun 21, 2010 10:20 am
by Nathan
Combuster wrote:Mounting is for accessing the filesystem. Access the image for writing the bootsector.
Using
cat for this?
Re: Make And Emulate a FAT12 Floppy
Posted: Mon Jun 21, 2010 10:33 am
by tharkun
Unmount the image, and then dd to the loop back device, replace /dev/loop0 with the name of the loopback device.
Code: Select all
dd if=boot.bin of=/dev/loop0 bs=1 count=512 skip=0
This will write the bootsector to the loop device (and your floppy image)
Re: Make And Emulate a FAT12 Floppy
Posted: Mon Jun 21, 2010 10:53 am
by Nathan
Now I just got a 512 bytes image(that is just the copy of the binary), just like if I do like this:
Let's do this better, someone creates a FAT12 floppy image, install BootProg on it and send me.
Re: Make And Emulate a FAT12 Floppy
Posted: Mon Jun 21, 2010 11:06 am
by Combuster
Since you're asking for a floppy and not a floppy image, Can we have your post address?
I happen to have something
Re: Make And Emulate a FAT12 Floppy
Posted: Mon Jun 21, 2010 11:20 am
by Nathan
Nice joke.
But on my question that is on the last post, I've asked to a floppy image.