File System Implementation Trouble
-
- Posts: 16
- Joined: Sun Mar 20, 2011 8:19 pm
File System Implementation Trouble
Hey guys, I am new to the forum but, I have been struggling with file systems in my very crude "Lino Commando" OS. Here are some details on the project:
- I am running Windows XP SP3
- I made the kernel in C used ASM for the GDT, IRQ, and GRUB for bootloader (Tools: DJGPP, NASM).
- I am using bochs to test the OS from a floppy image (.img) file.
- I have interrupts working, and a simple command line interface with three commands
- I have been trying for a long time to implement file system support, I have two possible file systems I might want to use, ISO 9660 (because I want the OS to be Live-CD), or FAT - 12/16/32 (because I have heard FAT is simple to implement)
Heres my problem: I have no idea how to implement a file system! I have read a lot of articles explaining the theory of file systems and possible C structures to use, and they are great! But none seem to touch base on implementation from the ground up. Can anyone provide any resources or shed some light on possible steps to take to implement one of the two file systems I mentioned? Thanks in advance, and great forum!
- I am running Windows XP SP3
- I made the kernel in C used ASM for the GDT, IRQ, and GRUB for bootloader (Tools: DJGPP, NASM).
- I am using bochs to test the OS from a floppy image (.img) file.
- I have interrupts working, and a simple command line interface with three commands
- I have been trying for a long time to implement file system support, I have two possible file systems I might want to use, ISO 9660 (because I want the OS to be Live-CD), or FAT - 12/16/32 (because I have heard FAT is simple to implement)
Heres my problem: I have no idea how to implement a file system! I have read a lot of articles explaining the theory of file systems and possible C structures to use, and they are great! But none seem to touch base on implementation from the ground up. Can anyone provide any resources or shed some light on possible steps to take to implement one of the two file systems I mentioned? Thanks in advance, and great forum!
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: File System Implementation Trouble
I would take a look at the idea of a "Virtual Filesystem" (check out the wiki)
Once you've created that, writing a driver for an existing filesystem should be relatively easy.
Once you've created that, writing a driver for an existing filesystem should be relatively easy.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Re: File System Implementation Trouble
Did you check the wiki?
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
Re: File System Implementation Trouble
Building a Virtual File System First is a really good idea, because it's similar, easier, and fun.
I built a Virtual RAM based file system using a very simple library called FUSE (File system in USEr space) see http://fuse.sourceforge.net/
They have a good wiki page linked to the site I gave with examples of how to get started. The only problem is that you're going to need to
use a unix type environment (linux, mac, freebsd, etc)
I built a Virtual RAM based file system using a very simple library called FUSE (File system in USEr space) see http://fuse.sourceforge.net/
They have a good wiki page linked to the site I gave with examples of how to get started. The only problem is that you're going to need to
use a unix type environment (linux, mac, freebsd, etc)
The More I See, The More I See There Is To See!
-
- Posts: 16
- Joined: Sun Mar 20, 2011 8:19 pm
Re: File System Implementation Trouble
I am a total noob to file systems, thanks for help (I never bothered to look at Virtual file systems), but could I use cygwin on windows instead of my ubuntu box?xfelix wrote:Building a Virtual File System First is a really good idea, because it's similar, easier, and fun.
I built a Virtual RAM based file system using a very simple library called FUSE (File system in USEr space) see http://fuse.sourceforge.net/
They have a good wiki page linked to the site I gave with examples of how to get started. The only problem is that you're going to need to
use a unix type environment (linux, mac, freebsd, etc)
-
- Member
- Posts: 255
- Joined: Tue Jun 15, 2010 9:27 am
- Location: Flyover State, United States
- Contact:
Re: File System Implementation Trouble
No, as far as I know FUSE only works on Linux. If you have some form of it installed, then what's the point of trying to do it in Cygwin?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: File System Implementation Trouble
The idea of FUSE is that you can write a FS implementation and then have others natively access it. You don't need it to just implement a filesystem - just provide a suitable interface to use which will obviously be different under cygwin or even native windows.
Re: File System Implementation Trouble
I was doing under graduate research for a class (http://lagoon.cs.umd.edu/classes/dfs-f10/) on distributed file systems. And the professorTosi wrote:No, as far as I know FUSE only works on Linux. If you have some form of it installed, then what's the point of trying to do it in Cygwin?
was showing me stuff on a Mac, you can just use MacFUSE.
The More I See, The More I See There Is To See!
-
- Posts: 16
- Joined: Sun Mar 20, 2011 8:19 pm
Re: File System Implementation Trouble
Well, when I tried to port it to Ubuntu, I kept getting a load of errors from the linker.Tosi wrote:No, as far as I know FUSE only works on Linux. If you have some form of it installed, then what's the point of trying to do it in Cygwin?
-
- Member
- Posts: 255
- Joined: Tue Jun 15, 2010 9:27 am
- Location: Flyover State, United States
- Contact:
Re: File System Implementation Trouble
I was confusing FUSE with something else then, probably the read-only NTFS support in the linux kernel.
If you are trying to use FUSE under Ubuntu, then can't you install it with the package manager?
If you are trying to use FUSE under Ubuntu, then can't you install it with the package manager?
-
- Posts: 16
- Joined: Sun Mar 20, 2011 8:19 pm
Re: File System Implementation Trouble
No, I meant porting the kernel source, and I have to remake the whole project anyway, so I don't think that I'll need to worry about file systems for a while.Tosi wrote:I was confusing FUSE with something else then, probably the read-only NTFS support in the linux kernel.
If you are trying to use FUSE under Ubuntu, then can't you install it with the package manager?