CD File Reading

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
JoeTheProgrammer
Member
Member
Posts: 48
Joined: Mon Aug 13, 2007 2:30 pm

CD File Reading

Post by JoeTheProgrammer »

How does an operating system live cd when booted read files from the cd? Does it use an internal atapi driver of some sort or what are other ways that the cd can be read from in protected mode?

Thanks,
Joseph
Last edited by JoeTheProgrammer on Thu May 29, 2008 4:27 pm, edited 1 time in total.
svdmeer
Member
Member
Posts: 87
Joined: Tue May 06, 2008 9:32 am
Location: The Netherlands

Post by svdmeer »

For booting El Torito, http://en.wikipedia.org/wiki/El_Torito_ ... tandard%29

After booting, a hardware driver for accessing sectors (for example scsi or atapi) on the CD and support for a CD filesystem (mostly ISO9660).
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:

Post by Combuster »

Read the wiki: Bootable CD
"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 ]
JoeTheProgrammer
Member
Member
Posts: 48
Joined: Mon Aug 13, 2007 2:30 pm

Post by JoeTheProgrammer »

Combuster wrote:Read the wiki: Bootable CD
I mean after the cd boots with grub and executes my kernel, how does the kernel read files on the cd?
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:

Post by Combuster »

Well, at that point you'll need ATAPI drivers and filesystem support.
But since you use GRUB, you can also load a ramdisk into memory and use that :)
"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 ]
JoeTheProgrammer
Member
Member
Posts: 48
Joined: Mon Aug 13, 2007 2:30 pm

Post by JoeTheProgrammer »

Ok, thanks for your help.

Joseph
robos
Member
Member
Posts: 33
Joined: Sun Apr 06, 2008 7:04 pm
Location: Southern California

Post by robos »

My memory is a bit fuzzy on the subject, but if you can stay inside 1.44 MB (size of a floppy) then you can put whatever you want in that floppy image and it will be accessible through the floppy emulation the BIOS is doing for you when you boot from it. So you can easily put extra stuff in the additional "sectors" and load that whether you put a fat file system in there or not.

Obviously the rest of the CD/DVD is still ISO / UDF and to get to that you will need a driver I'd imagine. But you have 1.44 MB of space to put that driver in ;)

I think the above is correct... if someone knows it isn't don't hesitate to correct me!
- Rob
Post Reply