确定分区属于哪个文件系统

确定分区属于哪个文件系统

问题描述:

操作系统如何知道分区正在使用哪个文件系统?换句话说,FAT16/32,NTFS,ext2/3等如何区分?

How does operating system know what filesystem a partition is using? In other words, how are FAT16/32, NTFS, ext2/3 etc. distinguished from each other?

有几种方法,具体取决于硬件类型.

There are several ways, depending on the hardware type.

硬盘具有主引导记录,后跟分区表. PT 包含此驱动器上的分区列表.该列表中的每个条目(除其他外)都包含一个数字系统ID 字段指定分区文件系统.

Hard discs have a Master Boot Record followed by a Partition Table. The PT contains a list of the partitions on this drive. Each entry in that list contains (among other things) a numeric System ID field that specifies the partitions file system.

软盘和大多数USB记忆棒都没有PT.在这里,您必须查看分区本身. 第一个分区扇区(称为引导扇区)通常包含系统ID 与PT中的系统ID完全不同的格式.而且,在文件系统之间,扇区中ID的位置可能会有所不同.

Floppy discs and most USB sticks do not have a PT. Here you have to look into the partition itself. The first partition sector (known as Boot Sector) usually contains a System ID in a completely different format from the System ID in the PT. Also, the location of the ID within the sector can differ between file systems.