Burn Software

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
brodeur235
Member
Member
Posts: 86
Joined: Sat Jun 06, 2009 11:55 am

Burn Software

Post 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
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: Burn Software

Post by Combuster »

Bootable CDs don't boot from sector 0.
"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 ]
User avatar
mathematician
Member
Member
Posts: 437
Joined: Fri Dec 15, 2006 5:26 pm
Location: Church Stretton Uk

Re: Burn Software

Post 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).
The continuous image of a connected set is connected.
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: Burn Software

Post 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.)
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: Burn Software

Post 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: .
skyking
Member
Member
Posts: 174
Joined: Sun Jan 06, 2008 8:41 am

Re: Burn Software

Post 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.
lye
Posts: 8
Joined: Mon Jun 08, 2009 6:36 pm

Re: Burn Software

Post 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.
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: Burn Software

Post by Combuster »

NickJohnson wrote:when you've got mkisofs and dd :wink: .
DD can't burn CDs :shock:
"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 ]
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Burn Software

Post by Solar »

...but it can write the floppy image mkisofs needs.
Every good solution is obvious once you've found it.
User avatar
mathematician
Member
Member
Posts: 437
Joined: Fri Dec 15, 2006 5:26 pm
Location: Church Stretton Uk

Re: Burn Software

Post 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.
The continuous image of a connected set is connected.
brodeur235
Member
Member
Posts: 86
Joined: Sat Jun 06, 2009 11:55 am

Re: Burn Software

Post 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
TomT
Member
Member
Posts: 42
Joined: Sat Mar 15, 2008 7:20 am
Location: Wisconsin, USA
Contact:

Re: Burn Software

Post 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
Post Reply