Page 1 of 1

Bootloader, booting from CD

Posted: Fri Dec 26, 2008 9:37 am
by m99
Welcome
I want to write bootloader. It will be on floppy. I want this bootloader to boot CD, that is actually inserted.
Now I have simple bootloader that prints text on the screen.
Can someone give me some ideas about how to boot CD?

Thanks in advance

Re: Bootloader, booting from CD

Posted: Fri Dec 26, 2008 12:47 pm
by djmauretto
Hello,
Easy way: Burn your floppy image with CD Burner software( in some cd burner software
there is a function to create cd boot)
Hard way(my favourite): Write your raw cd iso image and burn it to cd :-)

Re: Bootloader, booting from CD

Posted: Fri Dec 26, 2008 1:00 pm
by m99
I mean something diffrent.
I HAVE TO write my own bootloader, that boots CD.

Re: Bootloader, booting from CD

Posted: Fri Dec 26, 2008 1:04 pm
by LoseThos

Re: Bootloader, booting from CD

Posted: Fri Dec 26, 2008 4:52 pm
by mrnoob
Why not boot straight from the CD with El Torito?

Re: Bootloader, booting from CD

Posted: Sat Dec 27, 2008 7:21 am
by m99
mrnoob wrote:Why not boot straight from the CD with El Torito?
I don't know how to do it.
Can you tell me more about it?

Re: Bootloader, booting from CD

Posted: Sat Dec 27, 2008 8:25 am
by Combuster
From our own wiki: Bootable CD. Please search in the future.

Re: Bootloader, booting from CD

Posted: Sat Dec 27, 2008 12:10 pm
by m99
But I don't want to create bootable CD. I want to make bootloader that will be reading from CD.

Re: Bootloader, booting from CD

Posted: Sat Dec 27, 2008 12:15 pm
by 01000101
So, do you want a bootloader that gets loaded from the floppy but then can read from a CD? or do you want a bootloader on a CD which can read from the CD?

In either case, you've been provided with the information to accomplish either task.

Also, I'm sure there are various BIOS Interrupts that you can use to read sectors and such. Do some research.

Re: Bootloader, booting from CD

Posted: Sat Dec 27, 2008 12:27 pm
by Troy Martin
E: I don't think the BIOS ints would do too well with the 2352-byte sectors, so you'd probably be going for direct hardware access.

Re: Bootloader, booting from CD

Posted: Sat Dec 27, 2008 12:41 pm
by Dex
Other than use the above mefords, you will need to write a ATAPI driver, you will need the above pdf for programming info.
Also you can look at DexOS ATAPI driver, to code a driver you need to start at the basic's and add more funtions etc.

Here is a example of a basic ATAPI driver i coded, it demos setting up vesa, going to pmode, drawing a basic GUI and a simple CD player (ATAPI driver) all in less than 512bytes, has it boots and runs from the boot sector of a floppy.

Re: Bootloader, booting from CD

Posted: Sat Dec 27, 2008 10:08 pm
by JohnnyTheDon
Some BIOSes have EDD extensions. These extensions include ATAPI support. If your bootloader loads your kernel while in real mode, you can use a modified int 0x13 interface to load it.

Specifications:
http://www.phoenix.com/NR/rdonlyres/9BE ... sedd11.pdf

Re: Bootloader, booting from CD

Posted: Tue Jan 06, 2009 10:36 am
by m99
I read some information about Int 13 h extensions and about ElTorito Specifaction and I managed to write what I want.
It looks:
I put CD with my bootloader into CDROM, then I remove it then I insert some bootable CD for example livecd of UBuntu i press enter and livecd shout be booted.

I read about ElTorito and I know that BootRecordVolume is in 17 sector, I can find there pointer to Booting Catalog and in Booting Catalog I find pointer to bootable image of CD.
To use sectors I use function 42h of int 13h.
Program works good in Bochs, it boots windows, linux and other CDs, but when I tests program in real it can not read bootable image.
Does someone knows what has happened?

Re: Bootloader, booting from CD

Posted: Wed Jan 07, 2009 9:49 am
by eddyb
i think it's because those extensions: Bochs BIOS have it, but your pc doesn't :(

Re: Bootloader, booting from CD

Posted: Wed Jan 07, 2009 11:12 am
by m99
But when I checked function 41h of int 13h it shows that I have support. It shows even when I boot my computer from CD.
Interesting think is that reading is bad it means I want to read 17 sector offset 47h on CD(8847h) but my program reads from addres F247h.
It happens with every CD I boot. Isn't int 13h extensions standard in these days?