bin on bootable cd

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
m99
Posts: 13
Joined: Fri Dec 26, 2008 8:16 am

bin on bootable cd

Post by m99 »

Welcome

Actually I am writting bootloader. It consists of 2 parts. Bootsector and kernel.
After compiling two files to .bin I merge these files to one file ( prog.bin).
When I want to check how this file works I use fdimage to record this file on floppy.
To do it I do

Code: Select all

fdimage -f 1.44M prog.bin a
It works fine, after restarting computer my program is running from floppy.
Now I want to record my program on CD. It means, after restarting computer my program should run from CD.
I tried some conversions to .img and then to .img but these doesn't work. It maybe I do something wrong.

Can somebody tell me what should I do to boot CD with my program
I maybe should consider that bootsector in CD is in 17 sector and not in 1 ( like in floppy).

Thanks in advance
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Re: bin on bootable cd

Post by Dex »

You can just use floppy emulation to boot from CD, make a floppy image from your working bootable floppy using say winimage.
Than using your CD burn software, use the opion "make bootable" or something like that, than when it ask for a image or drive point it to your saved floppy image, it will add two bin files to the cd, click to burn and you now have a bootable CD.
If your CD burn software does not do bootable CD's get one that does from the net.
m99
Posts: 13
Joined: Fri Dec 26, 2008 8:16 am

Re: bin on bootable cd

Post by m99 »

Yes it sound right. But I mean that I don't want to use floppy(i have no fdd on my laptop).
I would like to know some way to convert *.bin to *.img or *.iso.
clange
Member
Member
Posts: 163
Joined: Sun Oct 05, 2008 5:00 am
Location: Copenhagen, Denmark
Contact:

Re: bin on bootable cd

Post by clange »

Dex is right, read his answer one more time. He explains how to make a bootable CD.

http://wiki.osdev.org/Mkisofs

clange
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: bin on bootable cd

Post by Combuster »

"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
m99
Posts: 13
Joined: Fri Dec 26, 2008 8:16 am

Re: bin on bootable cd

Post by m99 »

I understand you but I still can not create img file. In links you gave me to create bootable cd I need img file.
But I have only bin.
I have directory 'files' where I have prog.bin
I have also prog.bin in current directory.
When I want to use mkisofs I write.

Code: Select all

mkisofs -o image.iso -b prog.bin files
I received message
'Size of boot image is 4 sectors -> mkisofs: Error - boot image 'files/prog.bin is not the an allowable size.'
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Re: bin on bootable cd

Post by Dex »

First there are program out on the net that let you make a floppy image and add boot sector etc without a floppy, BUT IF I READ YOUR POSTright you put your file on a floppy with "fdimage" or am i missing something ?, if this is a real floppy, use winimage to make a copy.
m99
Posts: 13
Joined: Fri Dec 26, 2008 8:16 am

Re: bin on bootable cd

Post by m99 »

Yes actually I put my bin file on real floppy using "fdimage", so then I can use winimage, I checked and it works.
But I want to change this way, because in few days I will have no possibilty to use PC.
That's why I have to find some program that make floppy image without real floppy.
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Re: bin on bootable cd

Post by Dex »

Post Reply