First post, by LSS10999
UPDATE: Thanks to Grzyb's advice, I've confirmed it's indeed possible to make some DOS kernels read an external, off-image CONFIG.SYS file. For FreeDOS, you can simply edit the source code to add your own CONFIG.SYS path, while for others, such as MS-DOS, some hex-editing would be needed. Not all DOS kernels can be modified to work this way, however.
AUTOEXEC.BAT can be trivially chained in most DOS versions. FreeDOS (as well as some others) allows specifying your own AUTOEXEC.BAT to load from CONFIG.SYS via SHELL directive, though you can always put a dummy AUTOEXEC.BAT on-image that in turn calls your own off-image one, to avoid using SHELL directive if necessary, since the directive itself, as well as the command interpreter (COMMAND.COM), may vary a lot across different DOS versions. Note that you'll need to explicitly do a C: at the end of AUTOEXEC.BAT in order to make the command prompt point to C: instead of A:.
Generally speaking, this modding is mostly useful for those who want to boot a DOS kernel from BIOS flash using coreboot or ROMOS, as it allows one to customize the system configuration without having to modify the ROM afterwards, since flashing ROM is a risky and expensive task.
-- Original Post --
I don't know if anyone else has asked or tried to achieve this before.
The thing is, I'm interested in creating some DOS floppy images that contains only the kernel itself and a dummy CONFIG/AUTOEXEC to direct the system to load configurations and drivers on the first accessible hard disk partition (C:), so that anything else could be placed and configured off-image. The images themselves could then be put in a place normally inaccessible by DOS/Windows as they would be loaded through boot managers like GRUB, and can remain unchanged and read-only.
I wonder if some DOS variants ever implemented such a thing in the CONFIG.SYS syntax, while I am aware that the COMMAND interpreter of some DOS variants do have arguments to specify your own AUTOEXEC.BAT (through SHELL in CONFIG.SYS). I did google about this before, but I found nothing about directing DOS to continue reading configuration from a different CONFIG.SYS file elsewhere, so I'm afraid this is unlikely.
This is mainly for dealing with issues about multi-booting different DOS variants, as I noticed that some DOS variants, namely MS-DOS and ROM-DOS, cannot coexist on a FAT32 partition. Installing one will surely break the booting of the other.
If chaining CONFIG is really not that possible... I can always build the DOS floppy image to contain all the CONFIG/AUTOEXEC configurations (and respective programs) on-image, just that the image would have to be changed more frequently as I add or update configurations, and there would always be a risk for the image to end up broken (unbootable) at some point if I'm not careful...