
    readme for updategrub 1.0 
    by Agnelo de la Crotche <agnelo@unixversal.com>
    Thu Apr  7 04:18:42 PDT 2011
    
    ---

  LICENCE:
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
      
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    ---


  What on earth (and in space) does this script:


    It simply scans for other bootable Linux kernels and adds boot 
    entries (preserving the syntax used in the corresponding menu.lst)
    to the (Legacy) Grub menu of the system from which it is ran.

    It won't modify nor add any kernel boot entries of the current operating
    system but only look for other Linux distros and Windows, using 
    os-prober in a similar way that Grub2 does.      

    It will also scan for Grub in partitions bootsectors and in MBR and
    add chainload entries for these other Grubs. This feature is optional
    and can be disabled in the config file /etc/updategrub/defaults.

    Failsafe, recovery and single-user mode entries will be ignored by
    default. These are entries which titles contain one of the terms 
    'failsafe', 'fallback', 'recovery' or 'single-user'. If you want 
    updategrub to add those entries, you can set NOFAILSAFE=no in 
    /etc/updategrub/defaults.
      
    The content of the file /etc/updategrub/custom if it exists will be
    appended to /boot/grub/menu.lst (just like the file /etc/grub.d/40_custom     
    in Grub2). You can add any entry you like in LEGACY GRUB SYNTAX in this
    file. It is intended for other OS chainload entries such as BSDs or 
    other Unixes. The file /etc/updategrub/custom is not provided 
    since it contains only custom menu entries. You have to create it
    if you need one.

    In /etc/updategrub/defaults, you can add options for specific entries
    to be inserted in Grub menu. The option names must be in the form OS_options,
    where "OS" is the short name of the distro returned by os-prober or the
    first word of the OS description if the distro identified as UnknownLSB.
    You can view the list of valid short names by typing updategrub -h.
    Short names might not be what you expect however in the /etc/lsb-release    
    file or other distro specific release files are missing or altered.  

    Other Grub commands you might specify in options are reserved for advanced
    usage, such as hiding partitions, changing partition types or rewriting
    partition geometry before booting. Most users won't define options here. 

    Examples of partition table rewriting:

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    linux_options="\
        partnew (hd0,0) 0x06         63     514017
        partnew (hd0,1) 0xA5   73947195  285282270
        partnew (hd0,2) 0xA5  361398240  100663290
        partnew (hd1,1) 0xA5   18539010  534016665 
        partnew (hd1,2) 0xA5  554724450   79698465"

    ubuntu_options=$linux_options

    mandriva_options=$linux_options

    arch_options=$linux_options

    debian_options=$linux_options

    windows_options="\
        partnew (hd0,0) 0x06         63     514017
        partnew (hd0,1) 0xA5   73947195  285282270
        partnew (hd0,2) 0xA5  361398240  100663290"
 
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !! Since the feature exists (in Legacy Grub only), I guess that I should    !!
    !! document it. But, unless you need more than 4 primary partitions for     !!
    !! other OS like the BSDs, QNX, Solaris, SCO (!), OS/2, BeOS, Plan9, HuRD   !! 
    !! or whatever and you want Grub to rewrite the partition table, it is very !!
    !! unlikely that you will ever use it. Linux do NOT require primary         !!  
    !! partitions.                                                              !!
    !!                                                                          !!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    
    You can specify an order for boot entries to appear in the menu in the
    variable linux_order. Notice that the distro you're actually using (the
    one currently mounted in /) will be ignored by updategrub as it is skipped
    by os-prober.

    You can ignore entries by adding one word of their title in the variable
    ignore_linux.  The words are case insensitive and separared by spaces.
    The following example will reject boot entries which contain the names
    "gutsy" and "hardy" in their title: 
    linux_ignore="gutsy hardy"


  Usage:

    updategrub [options]


  command line options: 

     -l | --list :     print found boot entries to standard output,
                       without actually adding them to Grub menu
     -i | --interactive : launch interactive menu to enable/disable boot entries 
     -m | --menu        : enable/disable boot entries in grubmenu (withouth scanning OS)
     -a | --activate : activate Grub partition provided :
                       * it is a primary (or the entended partition)
                       * it is on the first BIOS drive (hd0 not sda!)
                       * there is only one primary partition containing
                         Grub stage1.
     -r | --restore  : restore previous Grub menu (saved in menu.lst.updg)
     -2 | --grub2    : update Grub2 menu
     -h | --help :     display help


   options in /etc/updategrub/defaults

   Keys (option names) are uppercase. Values are case insensitive. 		
   Valid values are yes/no, true/false or 1/0. 	

   CHAINLOADGRUB
   Adds other Grubs chainloading entries. Default is yes. 

   NOFAILSAFE
   Ignores failsafe, recovery and single user mode boot entries. Default is yes.

   INTERACTIVE
   Launchs interactive menu to enable/disable boot entries. Default is no.

   MAKEACTIVE
   Makes Windows partition active. Default is no.

   SETBOOTFLAG
   Sets bootflag on Grub partition (primary only!). Default is no.

   WINDOWSFIRST
   Writes Windows chainloading entries before Linux kernel entries. Default is no.

   CHECKROOT
   Checks if root device found in menu.lst matches device scanned by linux-boot-prober. Default is yes.
   This is a workaround to a linux-boot-prober bug which confuses Mandriva and openSUSE boot entries
   in openSUSE's menu.lst (only!).  


  Grub2
  -----

   As a fortuitous side effect, installing os-prober will allow Grub2 to look 
   for other distros and add their boot entries to Grub2 menu. That's the reason
   why I added option -2. So updategrub -2 does the same as Ubuntu's update-grub, 
   although this script wasn't originally intended to be used with grub2.




  
