Guru Boot Manager

... the smallest boot manager for advanced users ...

Version 2.0
1999-2001, by Andrew Removsky (arem@iname.com)

Table of Contents


 

Overview of GuruBoot

The GuruBoot is designed for advanced users who know what Boot Manager is, who want to know what their Boot Manager does and who want to have full control over it.

The GuruBoot allows you:

  • to have installed several primary operational systems on your PC
  • to boot from any of the primary system
  • to hide necessary partitions
  • to protect booting from any of your primary systems

    If you are an advanced user you cannot crash your PC even if it is not booted after incorrect installation of the GuruBoot. Just because you know what "fdisk /mbr" does and you know how to saddle Disk Editor. If not - enjoy yourself without the GuruBoot.


  • How It Works

    Before you use the GuruBoot you have to know how PC boots.

    How It Boots

    If the boot device is on a hard disk, the BIOS loads the master boot record (MBR) - the first sector on the hard disk. The MBR contains references to four primary partitions with one of which is active. The master boot code in the MBR loads the boot sector of the active partition. Then the boot sector code loads the OS.
    Of course you can have more then four volumes. This is done by making one primary partition as Extended. All additional volumes are resided in that Extended partition.

    What GuruBoot Does

    The GuruBoot stores its code only in the MBR. It recognizes what configuration you want to have by entered password. The configuration consists of the active partition and set of partitions you want to hide on every hard disk.

    The Benefit

    You know how it works and you control it.

    Writing Configuration File

    To install the GuruBoot you need to create configuration file.

    Boot Entries

    Entry contains settings to boot from specified partition.
    
      entry " text-description " {
          [ password " password-string " ]
          disk disk-number  {
              partition-operation partition-number
              ...
          }
          ...
      }
    
    

    Parameters

    text-description
    Specifies text string to output on boot to visualize the entry presence. Usually contains name of OS.
    There is an example:
    entry " \x1A Windows 2000".
    See String Values.
    password-string
    Specifies unique password to boot from the entry. If the entry does not contain password and empty password value is assumed.
    See Password Values.
    disk-number
    Specifies the number of the hard disk. Bootable disk number is 0.
    partition-operation
    Specifies how to mark partition on boot:
    activeMarks the partition as bootable. The entry must contain only one active partition. The active partition is meaningful only for bootable disk 0.
    enableDefault. Mark the partition as visible.
    disableMark the partition as hidden.
    partition-number
    Specifies the number of partition to operate on. Valid values are 0, 1, 2 and 3.

    Remarks

    At least one entry must be specified and up to 8 entries are supported.

    Partitions Map

    Partitions map specifies what and how partitions are marked as hidden.
    
      map {
          { original-partition-ID, hidden-partition-ID }
          ...
      }
    
    

    Parameters

    original-partition-ID
    Specifies partition ID recognizable by the system. There are examples of partition IDs for some file systems:
    0x01FAT12 file system
    0x04FAT16 file system
    0x05Extended partition
    0x06FAT16 file system
    0x07NTFS or HPFS file system
    0x0BFAT32 file system
    0x0CFAT32 file system
    0x0EFAT16 file system
    0x0FExtended partition
    hidden-partition-ID
    Specifies partition ID not recognizable by the system. When the partition is disabled the GuruBoot changes the original ID to this value.

    Remarks

    At least one partition map definition must be specified. The value 0 must not be used since means an empty partition. The maximum valid value is 0xFF.

    Customizing Output

    The set section is used to change default GuruBoot output on boot. This section is optional.
    
      set {
          [ password_prompt " password-prompt-string " ]
          [ password_wrong " password-wrong-string " ]
          [ password_ok " password-ok-string " ]
          [ disk_error " disk-error-string " ]
          [ no_logo ]
      }
    
    

    Parameters

    password_prompt
    Specifies password prompt text. The default is "\nEnter password: ".
    password_wrong
    Specifies text to output on wrong entered password. The default is "WRONG!\r".
    password_ok
    Specifies text to output on valid entered password. The default is "OK\r\n\n".
    disk_error
    Specifies text to output on hard disk I/O error. The default is "Disk IO Error\r\n".
    no_logo
    Suppresses GuruBoot message on boot.

    Tokens

    Comments

    A comment is text that the GuruBoot compiler ignores. A comment is written in one of the following ways:

    Numerical Values

    Numerical values can be specified in decimal, octal or hexadecimal format.
    The value is interpreted as decimal if it not begins from 0.
    The value is interpreted as hexadecimal if it begins from 0x.
    The value is interpreted as octal if it begins from 0.

    String Values

    A string value is a sequence of characters from the source character set enclosed in double quotation marks (" "). Adjacent strings are concatenated. There is an example:

    entry "First entry is " "Windows" {...}

    Special characters can be included into strings using escape sequences:

     

    Escape
    Sequence

    Represents

    \aBell (alert)
    \bBackspace
    \nNew line
    \rCarriage return
    \"Double quotation mark
    \\Backslash
    \xhhASCII character in hexadecimal notation

    Password Values

    The GuruBoot recognizes entered password by scan codes. So, if the password string is specified as either "abAB" or "AbaB" both mean the same key sequence.

    Functional and control keys can be included into password strings directly as scan codes by embracing in parentheses:

    password "a(\x0F)B(\x3B\x1)"

    This means the following password key sequence: 'A', 'TAB', 'B', 'F1', 'ESC'

    'ENTER' scan code (\x1C) is reserved for submitting the password.


    How to Run GuruBoot

    There are two executables of the GuruBoot:
    GuruBoot.exefor DOS and Windows 95 family.
    GuruBoot32.exefor Windows NT family.

    There is a default option:

    -h
    Show option help.

    Building Configuration File

    To install the GuruBoot the Configuration File must be created. The GuruBoot can help to make the template by following options:
    -b <config_file>
    Create the Configuration File using currently installed settings. If the GuruBoot was not installed the same as option -bn.
    -bn <config_file>
    Create new Configuration File with a map and an entry of current system configuration.
    -bs <config_file>
    -bns <config_file>
    Create the Configuration File with set section.

    Installation

    The GuruBoot can be installed in two ways.
    <config_file>
    Install the GuruBoot from the Configuration File.
    By default the GuruBoot uses Int 13 Extension to boot from bootable partition resided outside ~8GB.
    -x <config_file>
    Install the GuruBoot from the Configuration File.
    This option disables using Int 13 Extension so the GuruBoot uses CHS (cylinder, head, sector) values to boot. The option is useful for some old BIOSes to install from Windows system since it simulates Int 13 Extension feature. Cannot be used for bootable partitions outside ~8GB.

    Uninstallation

    The GuruBoot uninstalls itself by overwriting the MBR code. All currently hidden partitions are leaved hidden.
    -u
    Uninstall the GuruBoot.

    Notes

    Any program that overwrites the MBR code uninstalls the GuruBoot.

    CAUTION:
    If you are going to change disk volume structure you must uninstall the GuruBoot first, make what you want and then reinstall the GuruBoot with the Configuration File adapted to the new disk structure (see Building Configuration File).

    There is a sample of programs that can change disk structure:


    GuruBoot Configuration File Example

    
      /*
        This is an example of writing GuruBoot Configuration File.
        DO NOT TRY TO INSTALL THIS SAMPLE WITHOUT ADAPTATION.
      */
    
      map {
        {0x05, 0x15}	// These are my logical volumes
        {0x06, 0x16}	// This is my FAT16 Windows 98 volume
        {0x0B, 0x1B}	// This is my FAT32 Windows 2000 volume
        {0x07, 0x17}	// This is my NTFS Windows 2000 Server volume
      }
      entry "  \x1A Windows 2000" {
        password "Admin"
        disk 0 {
          active  1
        }
      }
      entry "  \x1A Windows 2000 Server" {
        password "(\x01)cape"	// 'ESC', 'A', 'P', 'E'
        disk 0 {
          active	0
          disable	1
          disable	2
        }
        disk 1 {
          enable 	0
        }
        }
      entry "  \x1A Guest Windows \"Press Enter\"" {
        disk 0 {
          disable	0
          disable	1
          enable	3
          active	2
        }
        disk 1 {
          disable	0
        }
        }
      set {
        password_wrong "S.O.S.\a\r"
      }
    
    

    The screen on PC boot:

    
     GuruBoot 2.0
    
        Windows 2000
        Windows 2000 Server
        Guest Windows - "Press Enter"
    
     Enter password: 
    
    
    
    
    

    Download GuruBoot

    GuruBoot 2.0 zip archive, size 52 Kb.


    Last Updated: July 21, 2001, by Andrew Removsky (arem@iname.com).
     
    Return Home