BOOTMENU.DOC
上传用户:yeshiping1
上传日期:2007-01-06
资源大小:29k
文件大小:4k
源码类别:

磁盘编程

开发平台:

Others

  1. BOOTMENU -- a BOOT sector program with a MENU
  2. ---------------------------------------------
  3. by Gordon W. Ross, Aug 1990
  4. This program is loaded by the PC ROM BIOS and is responsible
  5. for selecting one of four partitions to boot from.  The normal
  6. (MS-DOS) version of this program always boots the "active"
  7. partition, but this version allows any partition to be
  8. selected for booting, wether marked "active" or not.
  9. Two versions of this program are now distributed:
  10. BOOTMENU is small (less than 256 bytes of code) and compatible
  11. with the SpeedStor hard disk formatting package.  (Note that
  12. SpeedStor writes in several locations in the boot sector!)
  13. This version, however, does not allow unattended reboots.
  14. After BOOTMENU displays its partition menu, it waits
  15. indefinitely for someone to select a boot partition.
  16. BOOTAUTO (previously called "boot-hdp") is a full-featured
  17. boot program which allows boot-time partition selection, but
  18. also provides a default selection which is used if no user
  19. input arrives within five seconds.
  20. The behaviour of BOOTAUTO is as follows:
  21. BOOTAUTO displays the message:
  22. Booting device: hd0,
  23. and then pauses for a five second delay.
  24. If the user presses any key before the delay expires, a menu
  25. of bootable partitions is displayed, and the user is prompted
  26. for the number of the partition to boot from.  If no key is
  27. pressed before the delay ends, the first partition marked as
  28. "active" is used.  If no partition is marked as active, the
  29. boot menu is presented without delay, as if a key were struck.
  30. In essence, this program interprets the "active" mark (if
  31. present) as a default choice indicator.
  32. Once a partition has been selected this program displays the
  33. selected partition number and loads its secondary boot
  34. program.  Errors are printed if (1) the selected partition is
  35. empty, (2) the secondary boot program lacks a valid signature,
  36. or (3) an error occurs while reading the secondary boot sector.
  37. Installation:
  38. ------------
  39. The "pfdisk" utility included with this program simplifies
  40. installation of BOOTAUTO into the primary boot sector.
  41. Instructions for using "pfdisk" are in the pfdisk.doc file.
  42. Limitations:
  43. -----------
  44. Names in the boot menu:
  45. BOOTMENU and BOOTAUTO contain a name table that is used to
  46. generate the boot menu.  This name table is recognized (using
  47. a signature) and updated by pfdisk but not by other fdisk
  48. programs. If another fdisk program is used to modify the
  49. partition table, the name table may be left with misleading
  50. entries.  Note that pfdisk only updates the name field for any
  51. entry when the entry is set using the optional name field, i.e:
  52. pfdisk> 1 4 0 127 MS-LOSS
  53. Furthermore, the name supplied as the fourth arg. is truncated
  54. to eight characters.  (Space is tight in the boot sector.)
  55. The signature which flags the presence of a name table is
  56. written into any boot sector every time the name argument is
  57. given in a partition setting command (1,2,3,4).  This
  58. signature occupies locations 0x1A0 -- 0x1AD which does not
  59. clobber anything used by any of: UNIX or DOS boot programs,
  60. SpeedStor or WesternDigital Auto-configuring controllers.
  61. Booting inactive partitions:
  62. MS-DOS will boot from an inactive partition without needing
  63. any modifications.  Unfortunately, some systems refuse to boot
  64. from a partition which is not marked as active.
  65. ESIX (from Everex Systems) Sys.V Rel.3.2 will not (as shipped)
  66. boot unless its partition is marked active.  Other versions of
  67. Sys.V/386 are similar in this regard.  The easiest solution is
  68. to mark the UNIX partition as active, and use BOOTMENU to
  69. offer you a choice between DOS and UNIX.
  70. If you wish, it is also possible to patch UNIX so that it will
  71. boot without demanding that its partition be marked active.
  72. These patches (called "esix-boot") are available from the
  73. author.  Send EMAIL to gwr@linus.mitre.org if you want them.