Take the 2-minute tour ×

Why we need a filesystem. Can we use OS without file system because our kernel has already in build module. For example if we doesn't need /lib/modules directory .So why we need file system

share|improve this question

closed as unclear what you're asking by Hauke Laging, jasonwryan, slm, Anthon, jlliagre Mar 7 '14 at 19:56


I will answer your question with another: How does the boot loader know where to find the kernel to load it if there is no file system? –  h3rrmiller Mar 7 '14 at 18:14
@h3rrmiller man lilo –  Hauke Laging Mar 7 '14 at 18:32
Even the most simplistic disk organisation can be assimilated to a filesystem ... and *nix systems are based on files ! –  Ouki Mar 7 '14 at 18:34
You seem to be asking unrelated things. Even if you build your kernel with filesystems builtin (i.e. not as a module), you will need a file system for the operating system itself. –  Renan Mar 7 '14 at 18:35

2 Answers 2

Why we need a filesystem .Can we use OS without file system bacuese our kernel has already in build module. For example if we does't need /lib/modules directory .So why we need file system

Even if you could get it to work this way, it would be pointless. What would the kernel do and why/how would it be doing it?

The first thing the kernel does is start init, which is a userland executable residing on a filesystem, even if that filesystem is just from a compressed ramdisk. After that, the kernel waits to take directions from userspace. If init never starts, then the kernel will be waiting for instructions that never come.

share|improve this answer

The concept of a file is core to the way Linux/Unix works, many things which are not files in the classic sense that perhaps a document is considered to be. A file has a much broader sense under Unix/Linux in that in represent a range of hardware devices and other system internals which can be read from and/or written to. It allows programs to create file descriptors to have communication with such internals using the same read and write system calls, instead of the array of different calls found on other systems.

An example of the system internals include files under /proc (proc is considered a type of filesystem), many of the files here allow processes to get information on themselves or other running processes. Another (on Linux) is /sys (filesystem type sysfs), where files are more orientated toward hardware/driver states etc. Also the is /dev (on linux this is usually a devtmpfs filesystem) where files allow direct read/write communication with hardware such as disks and serial ports.

That said there are various ways that a system can run without a filesystem on disk. it is possible to have a diskless system where the everything that is needed to boot comes from a network. Application binaries can be stored in a temporary filesystem in memory, rather than on disk, just as all the filesystems previously mentioned can be purely in memory (this is always the case for /proc and /sys. Still however the concept of a filesystem is a necessary for Unix/Linux as the concept of a file itself.

share|improve this answer
