The File System Paradox (2007)
technet.microsoft.com
technet.microsoft.com
Only much later did I realise that the S attribute actually meant something like "the bootloader references this file by disk sector - DEFRAG.EXE, leave well alone". So MSDOS.SYS/IO.SYS would contain the filesystem driver, and then load COMMAND.COM "by name".
[0] http://www.dewassoc.com/support/msdos/dos_boot_process.htm
[0] http://en.wikipedia.org/wiki/MSDOS.SYS
[1] http://en.wikipedia.org/wiki/Just_enough_operating_system
That's fully compatible with what you're saying. Yes, you need those flags to keep boot-up working properly and, yes, the bootloader ignores the flags.
TerryADavis 30 minutes ago [dead]
My bootloader uses a fixed LBA block address. When I install Kernel.BIN onto the disk, I patch the bootloader with the LBA of Kernel.BIN. It is stored contiguously. My bootloader knows nothing about filesystems.
Why don't they let up/down votes sort out the quality of comments and stop banning non-spammers. Seems heavy handed.
The real reason these are in the root is because There Can Be Only One. You can have multiple versions of windows in different directories on the same drive, but only one NTLDR or BOOT.INI or HIBERFIL.SYS. If you put them in subdirectories, then you can now have more than one and NTLDR doesn't know which one to use.
And as somebody else pointed out, this all got rewritten after Windows XP.
I don't think that's a better way of doing it. The "dumb and simple" BIOS way, where all it did was load the first sector of the boot device into memory and jump to it, was far easier to understand and debug.
But yes, we're heading into the direction of booting kernels as EFI executables from stub loaders, at least in the contemporary GNU/Linux world. Further, you can just hardcode a cpio archive of an initramfs inside a kernel configured for building with EFI stub support.
Downsides are your CONFIG_CMDLINE (boot params) becomes hardcoded into the kernel configuration, unless you use something like efibootmgr to keep regenerating kernels with different boot parameters. But given the trend of lowering and hiding customizability, I expect it to be par for the course. systemd merging in Gummiboot into their source tree should give you an idea of what's to come in the future.
These sort of things tend to go against the grain of platform portability, though, even though pretty much the only platforms Windows appears to support these days are (or have been) consolidating around UEFI and ACPI.
I suppose they have a clever boot loader with advanced drivers?
Well, all: the file may be fragmented. Just store information about where to find all the blocks in the first block of the hibernation file (alternative view of this is that you have a very simple alternative file system on the disk that stores only one file (or a few, if you also want the ability to find the kernel for a cold boot)
Risk with such approaches is that they may not survive defragmentation of the drive. That's a minor risk for a hibernation file, I would say.
Also, you can only hibernate an OS that knows about hibernation. Such an OS would be foolish if it wouldn't write the current location of the hibernation file whenever it went into hibernation.
So, this only is a problem if you hibernate your system, defragment its disk on another system using a defragmenter that doesn't know about hibernation files, and then try to wake up from hibernation. That might happen to people using an old version of a defragmenter, but I doubt it will happen often.
I remember when GRUB first came out, thinking it was somewhat heretical to have filesystem code in a boot loader.
The biggest gotcha with LILO is that thing about writing the config to the boot sector. But then i have not used it in some years...
Grub2 OTOH is definitely an abomination. Whoever thought it a good idea to require compiling the bootloader config into a binary should be given a thorough slapping with a medium-sized trout. That thing is an overengineered solution looking for a problem.
† in the same way that autotools is "convenience" saving you from writing makefiles and configure scripts.
A very good article on how does your computer boot up.
http://www.tldp.org/HOWTO/Unix-and-Internet-Fundamentals-HOW...