Creating a bootable image...

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
kenneth_phough
Member
Member
Posts: 106
Joined: Sun Sep 18, 2005 11:00 pm
Location: Williamstown, MA; Worcester, MA; Yokohama, Japan
Contact:

Creating a bootable image...

Post by kenneth_phough »

I wrote my FAT12 bootsector and want to test it but found out that my SuSE Linux, for some reason, doesn't acknowlege my external USB floppy drive (I hope its not because I put an Apple sitcker on it :) ), so I decided to make a floppy image with bximage and use fdisk to format it w/ FAT12.
80 clusters
18 sectors per track.
so I can run it with bochs. But now I can't seem to write my FAT12 boot sector to the image. I can't mount it; used wine and ran PARTCOPY but that didn't work either.
Finally I used dd as follows:

Code: Select all

dd if=boot.bin of=a.img bs=512 count=1
And checked it with fdisk

Code: Select all

fdisk -l a.img
it didn't show the partition table so I'm starting to wonder if its not a FAT12 formated floppy image anymore.
How can I write my fat12 boot sector to my floppy?
joke
Member
Member
Posts: 56
Joined: Sat Jul 22, 2006 6:20 am

Post by joke »

i used to do the following :

fdformat /dev/fdx (where x is your drive number, look at /etc/fstab)
mkfs -t msdos -m 0 /dev/fdx 1440 (-t may also take fat12, not sure, and i'm not sure about 1440 either, look at the man pages)
then a simple dd if=<your bootimage> of=/dev/fdx (again x=your drive)

it works with me, although i just format and dd :D

Hope it helps!
I need someone to show me the things in life that I cant find
I cant see the things that make true happiness, I must be blind
Post Reply