A beginner tackling filesystem support

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
User avatar
makerimages
Member
Member
Posts: 27
Joined: Sun Dec 28, 2014 11:16 am
Libera.chat IRC: Makerimages
Location: Estonia

A beginner tackling filesystem support

Post by makerimages »

Well, hello there!

I'm new to OSdev and I am facing a pretty big challenge. My bootsector has reached the tip of what I want to do in there, basically - greet the user & show copyright info, and I'd now like to load a second-stage .bin file to set up stuff properly. The file system I'm currently targeting is UDF, since I want this to run on a cd in virtualbox, from a .iso. In the future, this would be needed for SFS too. I have no idea on how I should approach this, other than that it most likely needs

Code: Select all

int 13h
. I have written my understanding of how this process should go here: http://paste.ubuntu.com/9635658/.

Can someone help me get started? Thank you,
Makerimages
Working on SinusOS.
User avatar
KemyLand
Member
Member
Posts: 213
Joined: Mon Jun 16, 2014 5:33 pm
Location: Costa Rica

Re: A beginner tackling filesystem support

Post by KemyLand »

I can only provide you with some documents:
The UDF Specification should be pretty straightforward. Ralf Brown's Interrupt List is pretty complicated to follow up, and to find your needed functionalities. I can't help you anymore, as I have little to null experience with the BIOS :lol: . (Now expecting Brendan/another member to answer the interrupt stuff)
Happy New Code!
Hello World in Brainfuck :D:

Code: Select all

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
[/size]
Octocontrabass
Member
Member
Posts: 5590
Joined: Mon Mar 25, 2013 7:01 pm

Re: A beginner tackling filesystem support

Post by Octocontrabass »

From the sound of things, you want an El Torito no-emulation bootable CD. If you configure the boot image to load at physical address 0x7C00, your existing code will probably work unmodified.

From there, it works the same as any other bootloader: read the filesystem data from the disk, parse the filesystem until you've located your second stage, read the second stage from the disk, and run the second stage. There are only two major differences from a floppy disk or hard disk: sectors are 2048 bytes instead of 512, and you have to use INT 0x13 AH=0x42 to read the disk (AH=0x02 won't work).
Post Reply