File system, what and why?

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.
User avatar
skwee
Member
Member
Posts: 73
Joined: Mon Jan 12, 2009 3:11 am

File system, what and why?

Post 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!
TCP/IP: Connecting people...
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: File system, what and why?

Post 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
User avatar
finarfin
Member
Member
Posts: 106
Joined: Fri Feb 23, 2007 1:41 am
Location: Italy & Ireland
Contact:

Re: File system, what and why?

Post 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
Elen síla lúmenn' omentielvo
- DreamOS64 - My latest attempt with osdev: https://github.com/dreamos82/Dreamos64
- Osdev Notes - My notes about osdeving! https://github.com/dreamos82/Osdev-Notes
- My old Os Project: https://github.com/dreamos82/DreamOs
User avatar
skwee
Member
Member
Posts: 73
Joined: Mon Jan 12, 2009 3:11 am

Re: File system, what and why?

Post 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!
TCP/IP: Connecting people...
mrnoob
Member
Member
Posts: 26
Joined: Thu Sep 18, 2008 11:45 am

Re: File system, what and why?

Post 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.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: File system, what and why?

Post 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
User avatar
Helu
Posts: 10
Joined: Mon Feb 11, 2008 8:10 pm
Location: An Hui China

Re: File system, what and why?

Post 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
Love HeLU
User avatar
skwee
Member
Member
Posts: 73
Joined: Mon Jan 12, 2009 3:11 am

Re: File system, what and why?

Post 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!
TCP/IP: Connecting people...
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Re: File system, what and why?

Post 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.
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: File system, what and why?

Post 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.
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Re: File system, what and why?

Post 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
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
User avatar
Firestryke31
Member
Member
Posts: 550
Joined: Sat Nov 29, 2008 1:07 pm
Location: Throw a dart at central Texas
Contact:

Re: File system, what and why?

Post 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.
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Re: File system, what and why?

Post 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.
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: File system, what and why?

Post by Troy Martin »

Similar question: has anyone written their own partition table system and tools to use the partitions and the filesystems on them?
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
renovatio
Member
Member
Posts: 57
Joined: Fri May 23, 2008 5:13 am

Re: File system, what and why?

Post by renovatio »

Yes, I use my own filesystem. It's called RFS (Renovatio File System). Anyway it's a "lite" version of the FAT12.
Post Reply