Page 1 of 1

bin on bootable cd

Posted: Mon Dec 29, 2008 10:58 am
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

Re: bin on bootable cd

Posted: Mon Dec 29, 2008 11:17 am
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.

Re: bin on bootable cd

Posted: Mon Dec 29, 2008 1:12 pm
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.

Re: bin on bootable cd

Posted: Mon Dec 29, 2008 1:19 pm
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

Re: bin on bootable cd

Posted: Mon Dec 29, 2008 5:13 pm
by Combuster

Re: bin on bootable cd

Posted: Mon Dec 29, 2008 5:50 pm
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.'

Re: bin on bootable cd

Posted: Mon Dec 29, 2008 7:28 pm
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.

Re: bin on bootable cd

Posted: Tue Dec 30, 2008 3:21 am
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.

Re: bin on bootable cd

Posted: Tue Dec 30, 2008 11:15 am
by Dex