Page 1 of 1

A bunch of questions

Posted: Fri Aug 16, 2002 11:00 pm
by Alan
Hey, this message board is the greatest around, i'd like to add first of all :-)  heh and no i am not sucking up

But i do have some questions:
1)  I am trying to find a working ext2 loader, a simple one, looks for a kernel, loads it, done

2)  once my kernel is loaded in the FAT12 filesystem (or any other filesystem FAT wise or EXT2 wise)  how would i load other files then come back to the one i am using?  More or less like DOS.  I think i got an idea of how, but not too sure as in the filesystem loading way

3)  and finally how do you actually make your own filesystem??

I know these are probably the most commonly asked questions, but filesystems i pretty much completely don't understand and i've read other sites and stuff but nothing that good.  Thanks in advanced.
-Alan

RE:A bunch of questions

Posted: Sun Aug 18, 2002 11:00 pm
by Khumba
Hi, welcome to the board!

I don't know where you can find a ext2 bootloader, but there are lots of docs about ext2 at the OSRC (http://www.nondot.org/sabre/os/articles). FAT too, but FAT bootloaders aren't uncommon (at least in sample OSes I've downloaded).

As for making your own filesystem, there are a few things you need to think about first. Are you going to have it support hard drives and floppys, or only one? I'm trying to make my own filesystem, which supports 18-Track-per-Sector floppys only, but I'm not trying for anything bigger like hard drives (yet!). On the first segment, if you want the disk to be bootable (which is nice when you're writing an OS) have the bootloader on the first sector. Then you have another question: Will you have the kernel on it's own spoton the disk, or in a file? Anyways, your bootloader should load it and jump to it.

Continuing on with the layout, after the bootloader (and kernel, if you choose) have some kind of file table or list, containing the name, type, size, attributes, pointers to each file segment, and anything else you want the file to have. Then have the empty segments for the file!

Note that this design does not support directories, but one idea I'm using for my directory-less filesystem on my floppy OS is "groups": a way for sorting files, eg. you set the group, then type DIR (or LS, etc.), then only files with that group name show up.

Anyway, hope this helps!

RE:A bunch of questions

Posted: Sun Aug 18, 2002 11:00 pm
by OSD
Gook Luck !!!

u need to simply read the sectors of file allocation table and to parse each entries of the table which holds the filename, size, starting sector number, date, time etc. leave it, i think u known these things...

in order to switch between files or programs, ur kernel must be designed interrupt based. for ex. u can load a shell prg. after loading the kernel which completly depends on the kernel thro' interrupts. now u work will be simple.
u need to write the routines in ur kernel & call them from shell thro' interrupts. u can switch between programs now.
NICE.

RE:A bunch of questions

Posted: Mon Aug 19, 2002 11:00 pm
by Alan
Thanks for all of the advice, i am going to look farther into interupts, etc.  Do you have any docs you'd recommend for learning about them?  And also, i was reading a post about memory management and something about Intel's docs.  I've been to their site but what exactly kind of docs would be useful for o/s dev'ing.  I'm guessing about low-level processor design and what not, but still being kind of fresh, i'm still a bit confused.  Thanks in advanced.
Alan

RE:A bunch of questions

Posted: Mon Aug 19, 2002 11:00 pm
by garf
I would suggest going to this link for Intel documentation. http://developer.intel.com/design/pentium4/manuals/

There you can download all of the intel documentation for the Intel processors. Of paticular intrest to OS developers would be "IA-32 Intel Architecture Software Developer’s Manual Volume 3: System Programming Guide"

It is geared specificaly towards OS and low level developers, however it does not give you any specifics of OS design, so it will not show you how to develop an OS. The other two volumes are geared towards application developers and those just starting out with the Intel architecture. If you are developing an OS on the Intel platform, you will need these docs.