File Systems: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
m Add btrfs into expert filesystems section
→‎Guidelines if you do decide to roll your own: Split **Bootsector in 2; clarify. Removed "hidden sectors for multiple partition disks," does that clause make any sense?
Line 138: Line 138:
* Consider carefully what it will be used for.
* Consider carefully what it will be used for.
* Use a program to figure out the layout (e.g. a spreadsheet). The basic areas needed are:
* Use a program to figure out the layout (e.g. a spreadsheet). The basic areas needed are:
** Bootsector. This is essential for booting on some systems such as BIOS-x86 and Atari ST, unnecessary for others such as UEFI and OpenFirmware. Even if you don't intend to boot on systems which require it, reserving the first sector will allow your OS to be ported to them at a later time. Note that reserving space for a MBR-like partition table is needed to allow the filesystem to work in "logical partitions".
** Bootsector. Unless you are booting with UEFI, this is a must. Even then, it's recommended to include it in the specs for compatibility with older file systems. This section should contain at a minimum the disk size, location of the file table, hidden sectors for multiple partition disks, and a version number. I'd be leaving plenty of reserved space for features you don't think of. Don't forget to leave space for a jmp instruction and the boot code!.
** Partition metadata. This could fit into the first sector with the boot code, or be a separate group of sectors at a specific location. (FAT puts it in the first sector, calling it the FAT parameter block. ext* use a separate location, calling it the superblock.) At a minimum, this should contain the filesystem size, location of the file table, and a version number. Leave plenty of reserved space for features you don't think of. If you put it in the first sector, don't forget to leave space for a jmp instruction, the boot code, and a partition table!
** File table. Don't think of this as just a simple table containing a list of files and their locations. One idea is, instead of storing files, the system would store file parts, and the file table would list the parts in each file. This would be useful for saving space if many files on the disk are the same or similar (for example, license agreements).
** File table. Don't think of this as just a simple table containing a list of files and their locations. One idea is, instead of storing files, the system would store file parts, and the file table would list the parts in each file. This would be useful for saving space if many files on the disk are the same or similar (for example, license agreements).
** Data area. Files will be stored here.
** Data area. Files will be stored here.