Floppy boot sector injection/conversion to HD (Miscellaneous)
> For the boot sector of the HD, from what I see on some page, there is infos
> about the number of sectors, clusters size, etc..., so the boot sector of
> one HD will not be injectable in another. You confirm this ?
For FAT filesystems, boot sectors contain that type of information, yes. Well-written boot sectors base their file system processing only on documented fields, so a SYS style tool can combine filesystem properties for the current drive with generic code provided for the OS and the combination will boot.
Situations where this will most likely not work are when the boot sector is for FAT12, FAT16 or FAT32 and the filesystem is not the same FAT variant as the boot sector expects. Some boot sectors can only do CHS, or only LBA, others automatically switch. FAT32 boot sectors are often more than one sector long, so your SYS tool will have to install more than one sector.
Also, when the boot sector contains additional data such as "cluster number of some boot file" instead of actually looking into the directory data, it will of course only work if they are used with some special installer which stores the extra data in the boot sector. In the other direction, some boot sectors use information passed from the partition table, which can even let them compensate gaps in filesystem property data stored in the boot sector itself, for example regarding the absolute position of the partition on disk, the filesystem type, whether or not to use LBA or CHS etc.
So your success can easily depend on some very specific properties of the boot sector you want to install. Putting a floppy (FAT12) boot sector on a harddisk partition will often NOT work, unless you make a small FAT12 boot partition near the start of the disk to stay in FAT12 context and to stay in CHS geometry with small C, H and S numbers.
Some smart FAT12 boot sectors may be a bit more universal and automatically switch to LBA when available. If you are very lucky, you could even have a combined FAT12 and FAT16 boot sector. But it is extremely unlikely that a floppy boot sector will recognize and support being used for a FAT32 partition.
You might be able to use some FreeDOS boot sectors together with one of the more flexible SYS versions to say you want the boot sector to load a file from the root directory with any name of your choice, to any address segment of your choice. Depending on whether your operating system needs anything more than that, this lets you use FreeDOS boot infrastructure to load and boot kernels of other DOS brands by giving the right parameters on the SYS command line. Could be useful for DR DOS, EDR DOS, MS DOS, PC DOS etc. multiboot "switching" by updating your boot sector and restarting the computer. Not sure how experimental this was and which SYS versions have it.
---
FreeDOS / DOSEMU2 / ...
Complete thread:
- Floppy boot sector injection/conversion to HD - nico7550, 27.02.2021, 19:44 (Miscellaneous)
- Floppy boot sector injection/conversion to HD - ecm, 27.02.2021, 21:27
- Floppy boot sector injection/conversion to HD - mceric, 27.02.2021, 23:07
- Floppy boot sector injection/conversion to HD - nico7550, 27.02.2021, 23:24
- Floppy boot sector injection/conversion to HD - mceric, 28.02.2021, 01:48
- Floppy boot sector injection/conversion to HD - ecm, 28.02.2021, 08:57
- Floppy boot sector injection/conversion to HD - nico7550, 28.02.2021, 10:35
- Floppy boot sector injection/conversion to HD - RayeR, 01.03.2021, 14:52
- Floppy boot sector injection/conversion to HD - mceric, 28.02.2021, 16:09
- Floppy boot sector injection/conversion to HD - ecm, 28.02.2021, 18:26
- Floppy boot sector injection/conversion to HD - nico7550, 28.02.2021, 10:35
- Floppy boot sector injection/conversion to HD - ecm, 28.02.2021, 08:57
- Floppy boot sector injection/conversion to HD - mceric, 28.02.2021, 01:48
- Floppy boot sector injection/conversion to HD - nico7550, 27.02.2021, 23:24