I was reading about NTFS and the use of the driver ntfs.sys and I was wondering how could the NTFS driver be loaded if it's on an NTFS partition.
I couldn't find any answer for this online and I was curious to know how it works.
Asked
Active
Viewed 3,232 times
1 Answers
47
ntfs.sys is the NTFS driver for the Windows operating system. However, Windows does not start itself. It relies on the Windows Boot Manager. Windows Boot Manager and winload have built-in NTFS support. It is likely not as full-featured as ntfs.sys.
Windows Boot Manager (or rather winload) is responsible for loading all early drivers. These also include disk controller drivers (AHCI, NVMe, …)—otherwise, Windows could not continue booting.
This situation is somewhat comparable with Linux: GRUB, a popular Linux boot manager, includes support for many filesystems, including the ext family (ext2/3/4).
Daniel B
- 60,360
- 9
- 122
- 163
-
18I guess, "Windows Boot Manager and winload will have read-only capability/access with no knowledge of users, etc" to **load & enable booting**, while "Driver ntfs.sys will have write-capability, knowledge of users and full-access" to enable regular usage. – Prem Jan 16 '22 at 10:32
-
3@Prem - This sounds right. – Stilez Jan 16 '22 at 14:13
-
16And as a historical curiosity: in 1990s most bootloaders (such as lilo, but possibly Windows also) didn't understand filesystems at all, but the operating system installation stored the sector address of the necessary files inside the bootloader itself. – jpa Jan 16 '22 at 19:16
-
1Are they actually reading individual files off the file system (like grub), or are they reading a single archive (like lilo loading the initramfs)? – Simon Richter Jan 17 '22 at 07:09
-
@SimonRichter Individual files, though their placement on the drive is optimised for sequential access. And before NT, MS DOS (and non-NT Windows)'s bootloader didn't understand filesystems at all - they expected to find the "files" on a specific location in the partition. Of course, in either case, one of the first things to load were "real" drivers for the filesystem and drives. – Luaan Jan 18 '22 at 12:35
-
1@Luaan many Linux loaders like LILO also don't understand filesystems at all and just load sectors at a hardcoded offset. Even Grub supports that mode in case the embedded space for the second stage loader isn't available – phuclv Jan 18 '22 at 13:00