2 edited body
source | link

Short answer is that it doesn't know.

But there are ways of giving hints. Historically this was done via a label in the partition table of a fixed disk. But this is still just a hint to what filesystem is in there - some tools will rely on this hint (e.g. mkfs - which is just a simple front end to mkfs.umsdos, mkfs.ext3, mkfs.reiserfs....)

Another approach is to try to sniff the filesystem type by reading bytes off the raw partition (mount does this to select between the different MSDOS compatablecompatible types). Or retain a database of filesystems on known device identifiers.

Given the diversity of filesystems there's no unified approach which will always be accurate.

So the system will use the filesystem type (or at least family) the admin tells it to use.

Short answer is that it doesn't know.

But there are ways of giving hints. Historically this was done via a label in the partition table of a fixed disk. But this is still just a hint to what filesystem is in there - some tools will rely on this hint (e.g. mkfs - which is just a simple front end to mkfs.umsdos, mkfs.ext3, mkfs.reiserfs....)

Another approach is to try to sniff the filesystem type by reading bytes off the raw partition (mount does this to select between the different MSDOS compatable types). Or retain a database of filesystems on known device identifiers.

Given the diversity of filesystems there's no unified approach which will always be accurate.

So the system will use the filesystem type (or at least family) the admin tells it to use.

Short answer is that it doesn't know.

But there are ways of giving hints. Historically this was done via a label in the partition table of a fixed disk. But this is still just a hint to what filesystem is in there - some tools will rely on this hint (e.g. mkfs - which is just a simple front end to mkfs.umsdos, mkfs.ext3, mkfs.reiserfs....)

Another approach is to try to sniff the filesystem type by reading bytes off the raw partition (mount does this to select between the different MSDOS compatible types). Or retain a database of filesystems on known device identifiers.

Given the diversity of filesystems there's no unified approach which will always be accurate.

So the system will use the filesystem type (or at least family) the admin tells it to use.

1
source | link

Short answer is that it doesn't know.

But there are ways of giving hints. Historically this was done via a label in the partition table of a fixed disk. But this is still just a hint to what filesystem is in there - some tools will rely on this hint (e.g. mkfs - which is just a simple front end to mkfs.umsdos, mkfs.ext3, mkfs.reiserfs....)

Another approach is to try to sniff the filesystem type by reading bytes off the raw partition (mount does this to select between the different MSDOS compatable types). Or retain a database of filesystems on known device identifiers.

Given the diversity of filesystems there's no unified approach which will always be accurate.

So the system will use the filesystem type (or at least family) the admin tells it to use.