3 ms·
Back in the days of MS-DOS, I used to wonder why MSDOS.SYS had both the H (hidden) and S (system) attributes set, whereas COMMAND.COM, without which a disk woul
by red_admiral 11y ago
Back in the days of MS-DOS, I used to wonder why MSDOS.SYS had both the H (hidden) and S (system) attributes set, whereas COMMAND.COM, without which a disk wouldn't boot, had none of these.
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".
- digi_owl 11y agoWell for one thing you could replace COMMAND.COM. https://en.wikipedia.org/wiki/4DOS https://en.wikipedia.org/wiki/4DOS
- oso2k 11y agoI don't think that was ever true. DOS 7.x proved this as MSDOS.SYS became a text file. The DOS boot process always required IO.SYS to load MSDOS.SYS [0]. [0] http://www.dewassoc.com/support/msdos/dos_boot_process.htm http://www.dewassoc.com/support/msdos/dos_boot_process.htm
- Someone1234 11y agoYou don't think what was ever true? What you said after doesn't contradict anything they said.
- oso2k 11y agoIf you read the link, the file attributes (Hidden and/or System) of place no bearing on the MBR/Bootloader. Even the OP Article also acknowledged that. You can also read about this on wikipedia [0]. Bootloaders are essentially JeOSes [1] (in modern parlance) that can do root directory searches for key boot/OS files, independent of their file attributes. I've seen custom bootloaders depend on certain files being in certain locations or having certain names. Dave Dunfield's [2] "DOS-less" EMBEDPC [3] comes to mind as a bootloader that supported this. [0] http://en.wikipedia.org/wiki/MSDOS.SYS http://en.wikipedia.org/wiki/MSDOS.SYS [1] http://en.wikipedia.org/wiki/Just_enough_operating_system http://en.wikipedia.org/wiki/Just_enough_operating_system [2] http://www.classiccmp.org/dunfield/dos/index.htm http://www.classiccmp.org/dunfield/dos/index.htm [3] http://www.classiccmp.org/dunfield/dos/embedpc.zip http://www.classiccmp.org/dunfield/dos/embedpc.zip
- mapgrep 11y agoOP was saying (roughly) that the file attributes were used by, for example, DEFRAG.EXE to avoid having files like MSDOS.sys re-arranged ("defragmented") on disk because they need to be in certain locations the bootloader expects. 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.
- oso2k 11y agoThe files only need to be in certain logical locations (like the root of the drive), not physical locations. Fragmentation is not an issue either. See what FreeDOS say about this [0]. [0] http://help.fdos.org/en/hhstndrd/base/attrib.htm http://help.fdos.org/en/hhstndrd/base/attrib.htm