If you don't use the filesystem, there are two other ways:
1. Assume the second stage is stored in contiguous sectors on the disk. The only information you need to find the second stage is the starting sector and number of sectors.
A file stored on a freshly-formatted FAT12 or FAT16 disk will be stored in contiguous sectors, but not if you modify the file afterwards.
2. Write a program to make a list of the disk sectors which contain the second stage, then write this sector list into the first stage code. This is how the LILO and GRUB first stages work, I think.
If you modify the second stage file, you must re-run the sector list installer.
|