Multiple Filesystems

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
nuno_silva_pt

Multiple Filesystems

Post by nuno_silva_pt »

How can i put in my o.s. a FAT32 and EXT2 Filesystems?
and how can i make something to choose from them?
how can i boot the filesystems?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Multiple Filesystems

Post by Pype.Clicker »

okay, first you don't put "filesystems" in an OS : you put drivers to support them. Filesystem is a file organisation that is on the disk, somewhere ...

To have your OS support for FAT32 or ext2fs, you must decode sectors you read from the FAT partition (or ext2fs partition) according to the filesystem specifications (look out for them at Operating System Resource Center in .:QuickLinkz:.)

The OS can tell the driver to use for a given partition by looking at the partition type in the disk's Partition Table (in the Master Boot Record)
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Multiple Filesystems

Post by Pype.Clicker »

let's make myself clearer:

The goals for a file system are:
  • manage the disk space: The filesystem driver will have to look up for some special sectors telling how much free sectors remain and where they are. When allocating a sector, a tag is written in that special area to tell the sector is now busy.
    FAT32 uses the FAT to do this (a special value is used for identifying free clusters), ext2fs uses a bitmap in the group's superblock (iirc)
  • collect sectors into files: The filesystem driver will have to be able to tell you which sector is the next one in a list of sectors (that makes a file). Once again, in FAT32, this is stored in the fat: at FAT[cluster], you read the cluster number for the next sectors or a special value meaning the end of the file.
    In ext2fs, special sectors (called inode) hold a list of sectors number for the file. If a single sector is not enough to list all the sector numbers, then a second level is added (so that the inode holds numbers of sectors that hold themselves numbers of the sectors of the file).
  • provide directory service : It's useless to have files if you can't find them back! so every filesystem will come with a way to "name" them, and most do by the mean of directories.
    A directory is nothing but a file that contains "name -> file's main sector" information under a given format.
hope this helps .
nuno_silva_pt

Re:Multiple Filesystems

Post by nuno_silva_pt »

where are the websites that tell me how to implement FAT32 and EXT2?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Multiple Filesystems

Post by Pype.Clicker »

Pype.Clicker wrote: (look out for them at Operating System Resource Center in .:QuickLinkz:.)
http://www.nondot.org/sabre/os/articles/FileSystems/

(do you ever read what i wrote or are you just performing a color analysis to see if something can be clicked ? i really wonder ...)
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Multiple Filesystems

Post by distantvoices »

Well, try www.google.com. Ask it for linkses. Don't be lazy. yes, i say it.

thanks for your magnificient audience.

ps. I understand your father... ::)
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
nuno_silva_pt

Re:Multiple Filesystems

Post by nuno_silva_pt »

Can you send me some source code?
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Multiple Filesystems

Post by distantvoices »

(I wonder if he's able to read and understand english... or if he just copies sentences from elsewhere after having searched in a dirtionary about two or so words.)

nuno_silva, listen: It has 2 letters, this word. At least read it: NO.

There is plenty of source code in Linux, there is plenty of source code in minix, what the hell are you expecting more??
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
nuno_silva_pt

Re:Multiple Filesystems

Post by nuno_silva_pt »

I'm sorry. but i didn't ever have any c++ cource.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Multiple Filesystems

Post by Pype.Clicker »

nuno_silva_pt wrote: I'm sorry. but i didn't ever have any c++ cource.
what's the point ? Linux isn't in C++ ... that's just C !

And if you don't know C, how will you use sources we would send to you ?

Really, you should improve your english or find a board in your natural language... we're just all getting nervous by the "one-way" communications ...

I'm sorry to have this to be said... Look out for good books in portugese (you're portugese, aren't you) because we cannot help someone we can't talk to ...
nuno_silva_pt

Re:Multiple Filesystems

Post by nuno_silva_pt »

That's the problem. In my country we don't have any osdev forum.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Multiple Filesystems

Post by Pype.Clicker »

nor do we in mine... but we have libraries and bookstores :D
nuno_silva_pt

Re:Multiple Filesystems

Post by nuno_silva_pt »

i also can't find any GOOD books!
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Multiple Filesystems

Post by Pype.Clicker »

maybe you can try out some of your local university website and search for course notes or something alike ...
Or just try to translate the System Programming Manual from Intel ...
(it took time, but that's what i did myself ...)
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Multiple Filesystems

Post by distantvoices »

Nuno_silva, of course you will find good books!

go to www.amazon.com f. ex.

and check quick linkz and book recommendations on this board.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Post Reply