Bootable Cd's
Bootable Cd's
All the tutorials i have seen for os development use floppy disks and my computer dosen't have a floppy drive. Do you just use debug or partcopy to write to the cd. Secondly when i have a bootable disk i would want to load the kernel from it and i don't know the driver code for cd drives (ie 00 for floppy A: and 01 for floopy b) Any help would be greatly appreciated. Thanks.
Re:Bootable Cd's
*sigh*
You can't write to a CD using either debug or partcopy. It's a read-only media, see? And even if you have a CD-R/CD-RW, the file format and driver protocol are completely different from that used on floppy. They are, for that reason, also adressed very differently by the BIOS. There are two different ways to boot from a CD that I know of - El Torito and floppy emulation. It's not just a matter of changing a number here and there.
I would recommend you use a floppy image file and an emulator like Bochs for your first steps.
You can't write to a CD using either debug or partcopy. It's a read-only media, see? And even if you have a CD-R/CD-RW, the file format and driver protocol are completely different from that used on floppy. They are, for that reason, also adressed very differently by the BIOS. There are two different ways to boot from a CD that I know of - El Torito and floppy emulation. It's not just a matter of changing a number here and there.
I would recommend you use a floppy image file and an emulator like Bochs for your first steps.
Every good solution is obvious once you've found it.
Re:Bootable Cd's
Some software suck as WINISO will be helpful.Or burning your image into the disk manually.If you think floppy too small for you,try the raw hard disk image.I think it cool and I'm now using it to hold my kernel.Debugging your kernel under BOCHS's a good idea.
Re:Bootable Cd's
If I were you, I'd also check the GRUB manual and check the section 'Creating a bootable CD-Rom' (or something like that). I think that's what you'd like, isn't it? The only thing you need is mkisofs and a tool to write .iso images to cds (if you don't want to use BOCHS).
Candamir
Candamir
Re:Bootable Cd's
It's not just about testing your OS. I'm sure most everyone uses Bochs or some kind of tool to test/debug an operating system, but from time to time you also need to test on a real system. Bochs still isn't perfect and every so often, things will work in Bochs that won't work on a real machine. Also if you plan on distrubuting your OS to others, then you almost have to use a CD because of the lack of floppy drives in newer computers. Storage size is another issue, if you are farther along and require more than 1.44mb of storage. So simply telling someone "use bochs" isn't always a good enough answer for what they really need to do.
Re:Bootable Cd's
Hi,
IMHO one of the best ideas is to have some form "boot specification" that specifies the state of the computer before the kernel (or whatever) is started - something that defines that state of everything for the transition between the boot loader and the rest of the OS. Then you can have many different boot loaders and many different disk images that all comply with your "boot specification".
That way the OS itself won't care where it was booted from or what code booted it - you can have one boot loader for floppy, one for CD-ROM, one for GRUB, some for a specific embedded systems (that copy the OS from ROM or flash memory), one for TFTP, etc.
Cheers,
Brendan
IMHO one of the best ideas is to have some form "boot specification" that specifies the state of the computer before the kernel (or whatever) is started - something that defines that state of everything for the transition between the boot loader and the rest of the OS. Then you can have many different boot loaders and many different disk images that all comply with your "boot specification".
That way the OS itself won't care where it was booted from or what code booted it - you can have one boot loader for floppy, one for CD-ROM, one for GRUB, some for a specific embedded systems (that copy the OS from ROM or flash memory), one for TFTP, etc.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re:Bootable Cd's
Even when emulating a floppy on CD, you still need a ATAPI driver, as if not, you need a ramdisk, as once you have loaded your kernel and moved to pmode emulation stops, so you can not load anything else from the image.
A simple ATAPI driver is much easier, than a fdd or Hdd if you include the file sys that you also need.
A simple ATAPI driver is much easier, than a fdd or Hdd if you include the file sys that you also need.
Re:Bootable Cd's
hello....
Its true that most of us are making our OS not only to run in bochs and feel good by seeing it, but to also distribute it among friends and share it.
There must be a way of writing kernel in CD and having a bootloader which will load it.
Please throw some light on this area too....
Its true that most of us are making our OS not only to run in bochs and feel good by seeing it, but to also distribute it among friends and share it.
There must be a way of writing kernel in CD and having a bootloader which will load it.
Please throw some light on this area too....
Re:Bootable Cd's
Lather. Rinse. Repeat.
There are two ways of making a CD-ROM bootable, one being floppy emulation, the other being the El Torito standard.
Floppy emulation means that a floppy image - which might be a copy of a real floppy - is embedded in the CD. When booting off that CD, this floppy image is installed as a kind of overlay over the real floppy, and can be addressed as such. If the code contained on that floppy image includes a driver for the CD-ROM, voila. How you do that is basically what OS design is all about, isn't it?
El Torito I know nothing about as I've never tried it, but it should be comparatively easy to google for relevant information.
There are two ways of making a CD-ROM bootable, one being floppy emulation, the other being the El Torito standard.
Floppy emulation means that a floppy image - which might be a copy of a real floppy - is embedded in the CD. When booting off that CD, this floppy image is installed as a kind of overlay over the real floppy, and can be addressed as such. If the code contained on that floppy image includes a driver for the CD-ROM, voila. How you do that is basically what OS design is all about, isn't it?
El Torito I know nothing about as I've never tried it, but it should be comparatively easy to google for relevant information.
Every good solution is obvious once you've found it.
Re:Bootable Cd's
Basically you open your burn software and click on the make cd bootable, then point it to a floppy image or a floppy drive with a booable floppy in, it will add 2 files to the CD, once burnt it than bootable.
You can do the same with a Hdd image.
You can do the same with a Hdd image.
Re:Bootable Cd's
Hello...
Is is that easy to write a floppy image to CD!! But than the CD will only emulate floppy and it wont be using whole 700 mb space... I havent tried yet but i guess i must have ATAPI driver by which i'll read CDs.. And first it should be written to Floppy image and then on CD. So this way after booting... our kernel will access CD...
Is is that easy to write a floppy image to CD!! But than the CD will only emulate floppy and it wont be using whole 700 mb space... I havent tried yet but i guess i must have ATAPI driver by which i'll read CDs.. And first it should be written to Floppy image and then on CD. So this way after booting... our kernel will access CD...
Re:Bootable Cd's
Yes, that is what we have been telling you.
Every good solution is obvious once you've found it.
Re:Bootable Cd's
El torito bios specification can load the kernel directly anywhere on the first megabyte of ram ,this way you can
forget about floppy and fat12 drivers, you only need a atapi
cd driver. There is also the hard disk emulation wich can use all the 700MB of the cd using int13h in real mode.
I use the first option on my OS ,there are also bios services
to translate the bios device number (in register dl ) to the
hardware disk number (ide 1/2 master/slave).
forget about floppy and fat12 drivers, you only need a atapi
cd driver. There is also the hard disk emulation wich can use all the 700MB of the cd using int13h in real mode.
I use the first option on my OS ,there are also bios services
to translate the bios device number (in register dl ) to the
hardware disk number (ide 1/2 master/slave).
Re:Bootable Cd's
Hello....
I am starting to code a fresh ATAPI driver. My kernel is a multitasking C++ kernel with:
* Intruppt Management System
* Multitask floppy driver
* Driver management module
Right now i am studying the manuals. Can anyone suggest the steps to start it? I mean somethin like:
1. Install an ISR at ATAPI_INT_NO
2. Configure DMA
3. Send command to controller
Anything like that? I dont know much about this, so please give some long discription....
I am starting to code a fresh ATAPI driver. My kernel is a multitasking C++ kernel with:
* Intruppt Management System
* Multitask floppy driver
* Driver management module
Right now i am studying the manuals. Can anyone suggest the steps to start it? I mean somethin like:
1. Install an ISR at ATAPI_INT_NO
2. Configure DMA
3. Send command to controller
Anything like that? I dont know much about this, so please give some long discription....
Re:Bootable Cd's
start by something easier, write a hard disk driver with polling instead of interrupts and pio instead of dma. The atapi protocol is a bit complex.