Page 1 of 2

File system, what and why?

Posted: Sat Jan 17, 2009 4:40 am
by skwee
Hey all.
I wanted to ask do you use any File System in your OS? If yes is it custom made or a ready one?
Thanks!

Re: File system, what and why?

Posted: Sat Jan 17, 2009 5:00 am
by AJ
I think that a file system is really one of the essentials - if you want to have file support :) There have been suggestions in the past about using a database instead of a file system - but I think of this as a file system in disguise, when it comes down to it.

Have you had a look at all the file system information on the wiki and at JamesM's page? It's all useful stuff.

I guess one of the key decisions (with a conventional design) is to have a *nix-like system with the "devices are files" concept (/dev node), or a DOS-like system where you need to decide how you are going to abstract away hardware details.

Cheers,
Adam

Re: File system, what and why?

Posted: Sat Jan 17, 2009 5:06 am
by finarfin
Hi,

i plan to use some kind of file System in future versions of my os, probably we (we are two people working on the project) write VFS support, with for at beginning a very silly file system, that will be loaded in ram (following the james m way!). That will happen in the early future.

After we planning to write a driver for at least:
  • Ext2 file system
  • FAT file system
But this is later in the future :D

Re: File system, what and why?

Posted: Sat Jan 17, 2009 5:45 am
by skwee
Well, on the one side looks like developing my own is the best choice since all the purpose of writing OS is to learn how to do it, and not doing something revolutionary, the same goes for FS. On the other hand... Dunno, Ill see later when Ill come to the need of FS.
Other comments will be welcomed!

Re: File system, what and why?

Posted: Sat Jan 17, 2009 6:14 am
by mrnoob
i personally have gone for FAT16, and if you plan to write your own bootloader(?) i suggest you do the same. In my opinion it is the easiest by far to load and parse, and fits in perfectly with the register sizes for real mode.

Re: File system, what and why?

Posted: Sat Jan 17, 2009 6:41 am
by AJ
Hi,

Just as an addendum to my last post - I should point out that I have pretty much assumed you meant VFS rather than on-disk FS.

I think that the choice of on-disk FS comes down to what you want to achieve and your dev environment. If developing on Windows, do you want easy R/W access to your disk? If so, use FAT12/16/32. You can also get an EXT2 driver for Windows. If you want automatic compatibility with Linux machines for file transferring, you have a bigger choice, but may like to look at the native EXT2 and eventually EXT3/4.

You could develop your own on-disk FS, but that's quite a big project to run alongside your OS development and you lose the ability to transfer files between your OS and *nix/Windows unless either you write networking stuff or write custom drivers for your host environment.

Cheers,
Adam

Re: File system, what and why?

Posted: Sat Jan 17, 2009 7:02 am
by Helu
HI
In my opinion ,Fat12 is esay for beginners;and fat16 is enough for a self_design os.On the other hand ,elf is another choice. :P

Re: File system, what and why?

Posted: Sat Jan 17, 2009 7:39 am
by skwee
Yea I saw that fat12 is pretty easy, however Im in linux and prefer to use some native FS like ext2/3 (3 is a bit hard IMHO since its also a journaling FS), Ill see later.
Other comment who use what and why welcomed!

Re: File system, what and why?

Posted: Sat Jan 17, 2009 9:58 am
by xyzzy
Helu wrote:HI
In my opinion ,Fat12 is esay for beginners;and fat16 is enough for a self_design os.On the other hand ,elf is another choice. :P
ELF is another choice? ELF is an executable file format, not a filesystem...

Ext2 is pretty easy to implement read support for, write support is fairly complicated though. I currently use it as the main filesystem in my OS.

Re: File system, what and why?

Posted: Sat Jan 17, 2009 10:05 am
by 01000101
I'm creating my own filesystem. I have a very specific task for it to do, so I figured it fitting to just design it specifically for my OS.

I hear that FAT12/16/32 are really easy to implement, and there is always the experimental SFS route which implies simplicity in its name (and it's drafted by one of our top members here).

I really like journaling designs, but sometimes you don't need/want it.

Re: File system, what and why?

Posted: Sat Jan 17, 2009 10:42 am
by piranha
I wanted to ask do you use any File System in your OS? If yes is it custom made or a ready one?
I currently use an initrd of the style from JamesM's tutroials, and I load those files into my own RamFS (which gives me capabilities to test the VFS to about 80% of what it can do. I'm currently working on implementing SFS as my first FS, and then I may go to FAT.

-JL

Re: File system, what and why?

Posted: Sat Jan 17, 2009 10:52 am
by Firestryke31
I went with FAT32 because I develop in Windows. It's a relatively easy system once you grasp the ideas behind it, and I managed to get my bootloader to parse the root directory and load a multi-cluster file. The only problem is that it was a bit hard to get it to fit in less than 512 bytes, but that's what some of the fancy opcodes like "movzx ebx, word [Some2BytePointer]" are for.

Re: File system, what and why?

Posted: Sat Jan 17, 2009 2:22 pm
by bewing
I worte my own FS, because all versions of FAT, NTFS, Ext, Reiser, etc have bad things in them that I don't like -- and I don't want any negative legacy BS bogging down my OS.

Re: File system, what and why?

Posted: Sat Jan 17, 2009 4:26 pm
by Troy Martin
Similar question: has anyone written their own partition table system and tools to use the partitions and the filesystems on them?

Re: File system, what and why?

Posted: Sat Jan 17, 2009 4:56 pm
by renovatio
Yes, I use my own filesystem. It's called RFS (Renovatio File System). Anyway it's a "lite" version of the FAT12.