Page 1 of 1

Burn Software

Posted: Mon Jun 08, 2009 3:55 pm
by brodeur235
I've written my first OS, but my BIOS (although being able to detect bootable usb drives) cannot boot from a usb drive. So, I want to burn it to a disk. What software allows you to burn binary files exactly where you want them on disk (for instance sector 0). I heard Nero is good, but I need something free and preferably open source. All help is appreciated,

Brodeur235

Re: Burn Software

Posted: Mon Jun 08, 2009 4:08 pm
by Combuster
Bootable CDs don't boot from sector 0.

Re: Burn Software

Posted: Mon Jun 08, 2009 4:46 pm
by mathematician
brodeur235 wrote:I've written my first OS, but my BIOS (although being able to detect bootable usb drives) cannot boot from a usb drive. So, I want to burn it to a disk. What software allows you to burn binary files exactly where you want them on disk (for instance sector 0). I heard Nero is good, but I need something free and preferably open source. All help is appreciated,

Brodeur235
You could try DVD-RAM, which is effectively a floppy with 4.7Gb capacity. It would need formatting, then you could alternatively use whatever file system the formatter puts in place, or overwrite it with your own. In the latter case you would need to find a utility which can write to absolute disk sectors. I can think of one, but it is a commercial product (for Windows).

Re: Burn Software

Posted: Mon Jun 08, 2009 5:36 pm
by neon
I burn mine to DVD-RAMs using MagicISO. But as Combuster pointed out, its a bit different in how CDs boot. (Although with floppy emulation, you might not run into much issues.)

Re: Burn Software

Posted: Mon Jun 08, 2009 6:48 pm
by NickJohnson
Combuster wrote:Bootable CDs don't boot from sector 0.
I agree with Combuster's implicit wiki link. Just install Cygwin and follow those instructions. No need to go install some fancy Windows Super-Copy-Inator 2011 app when you've got mkisofs and dd :wink: .

Re: Burn Software

Posted: Mon Jun 08, 2009 9:48 pm
by skyking
Combuster wrote:Bootable CDs don't boot from sector 0.
That depends on what you mean by sector 0. The floppy image is an image of a bootable floppy where booting starts from sector 0 and is accessed from BIOS just like it was a floppy IIRC.

Re: Burn Software

Posted: Mon Jun 08, 2009 9:58 pm
by lye
Check my "mbr relocation" thread. There I pastied some C code which will write it to disk. If you want to move it forward, multiply the number of sectors by 512 and pass it to SetPtr.

http://pastebin.ca/1452717 Just use the header I have there for it, real easy.

Re: Burn Software

Posted: Tue Jun 09, 2009 3:30 am
by Combuster
NickJohnson wrote:when you've got mkisofs and dd :wink: .
DD can't burn CDs :shock:

Re: Burn Software

Posted: Tue Jun 09, 2009 6:50 am
by Solar
...but it can write the floppy image mkisofs needs.

Re: Burn Software

Posted: Tue Jun 09, 2009 7:48 am
by mathematician
neon wrote:I burn mine to DVD-RAMs using MagicISO. But as Combuster pointed out, its a bit different in how CDs boot. (Although with floppy emulation, you might not run into much issues.)
I have got a DVD-RAM formatted as FAT32, and I can copy files onto it from the Windows command line without the need for burning software. If you do burn something onto it, from that point on you can only use it as an ordinary DVD-RW; that is an expensive mistake I made. Away from the command line, XP mistakes it for an ordinary DVD-RW, and wants to burn files onto it, but Windows 7 seems to know the difference.

Sometimes DVD-RAMS come in a pod, intended for use in a CAMCORDER, and you have to use brute force to break the pod open , if you are intending to use it with a computer.

Re: Burn Software

Posted: Tue Jun 09, 2009 1:50 pm
by brodeur235
Okay, I have a .bin it want loaded at 0:7C. I want to create an ISO that virtualbox can boot from. I am using bchunk in Ubuntu. It's general syntax is:

bchunk <image.bin> <image.cue> <desired_ISO_name_w/o_extension>

I read about cue files and supposedly it contains header data such as what track the bin image will be written to in the ISO. Simple question: What options do I need to set/address in the cue file to make my iso bootable? (Examples good too)

Brodeur235

Re: Burn Software

Posted: Tue Jun 09, 2009 2:16 pm
by TomT
This is a Linux shell script I use for making a boot CD. "file.img" is a bootable floppy image created by your OS. It must be padded out to a full 1474560 bytes. You need mkisofs and cdrecord.

#!/bin/sh
# a script for making a single track bootCD
# using a CD-R or CD-RW disc
# be sure you have a full 1474560 byte img file first !


#make new file.iso from the img file
#-b option is for El Torito bootcd
mkisofs -b file.img -R -o file.iso /home/tom/projects/file.img


#if CD-RW, first you must erase the disc
#my drive does not accept blank=track
#my drive will accept blank=all but its a 15 minute operation
#blank=fast takes about 30 seconds
sudo cdrecord -v blank=fast speed=8 dev=/dev/hdd


#burn cd
sudo cdrecord -v -tao speed=8 dev=/dev/hdd -data file.iso


#remove the file.iso
rm file.iso


TomT