4
New to Linux and am having a tough time understanding some basic OS concepts. What is the Linux version of FAT, and how does it relate to these so-called "blocks" or block devices?
4
New to Linux and am having a tough time understanding some basic OS concepts. What is the Linux version of FAT, and how does it relate to these so-called "blocks" or block devices?
6
In Linux, you have many different file systems to choose from: ext3, ext4, ext2, xfs, ReiserFS, ReiserFS4, even FAT and NTFS.
The block devices correspond to your hard disk and/or to the partitions on it (sda
vs. sda1
), and there you put a file system of your choice. After that, you can mount that device to /mnt
, to /usr
or wherever you need it.
1
FAT is a filesystem, a way of organising disk storage with hidden structures that enable an operating system to locate data. Most Linux distributions natively use a filesystem named ext4, however Linux can work with a lot of different filesystems, including FAT.
The word filesystem is also used to mean a specific named disk partition (e.g. the boot partition). It is also used to mean the whole collection of such filesystems that are currently in-use ("mounted") by a computer's operating system.
In Unix-like operating systems, such as Linux, (almost) everything is a file. There are files that represent disks and disk partitions. These files are called device files and live in the /dev folder. Devices are categorised into block-mode devices and character mode devices depending on the way they are written-to or read-from.
1
Supplementing other correct answers: the Unix philosophy (inherited by Linux) is that "everything is a file". Everything (to first approximation) is a block device, including disks but also printers, USB devices, RAM ....
FAT is one way to organize data in a disk partition. What you see as drive letters in DOS/Windows (C:, D:, etc.) are disk partitions. Linux can use FAT disks, but also disks organized in different ways as @glglgl explained. Note that Windows recognizes the same partitions that Linux does, if you connect the same hard disk to both (not at the same time!). And just as in Windows, where you can assign the same disk partition as D: or E: or Z:, you can mount it in Linux as /media/mydisk or /media/externaldisk or /mnt/securedisk or whatever you want.
There are lots of complications (e.g. RAID can recognize multiple physical disks as one partition) but that's the basic explanation for simple cases.
Ahhh, so block devices like
sda
, etc. are actually like the C:\ drive you interact with on Windows OSes, yes? – pnongrata – 2011-09-21T14:28:19.8033Sort of, yes. But I rather think
C:
corresponds to the mount point when you mount it; as well as you can call a windows partitionD:
,G:
orR:
, as you like./dev/sda1
is more like the entry in the Volume Manager, so to say. – glglgl – 2011-09-21T14:32:10.797