4.3. The Boot loader

This documentation is for yast2-bootloader and is is valid for SLE11 and openSUSE 11.0+. For older versions please use the documentation that comes with your distribution in /usr/share/doc/packages/autoyast2/

General scope of autoyast profile only bootloader part.

<bootloader>
   <device_map config:type="list">
    - info about order of devices in device.map
   </device_map>
   <global>
   - info about configuration of installation (installation settings for GRUB and generic boot code)
   </global>
   <initrd_modules config:type="list">
   - list of initrd modules
   </initrd_modules>
   <loader_type>grub</loader_type> - type of bootloader
   <sections config:type="list">
   - bootloader sections in menu.lst
   </sections>
 </bootloader>

4.3.1. Device map

You can define devices and their order in device.map but it is not necessary. yast2-bootloader checks the devices during the installation and proposes a device.map by itself. It can happen that the order of the devices is wrong or you have defined a different order than it is in the BIOS (please take care about changes there. it can leads to unbootable system).

<device_map config:type="list">
     <device_map_entry>
       <firmware>hd0</firmware> <!-- order of devices in target map  -->
       <linux>/dev/disk/by-id/ata-ST3500418AS_6VM23FX0</linux> <!-- name of device (disk)  -->
     </device_map_entry>
</device_map>

4.3.2. Globals

This is an important part where you can define where to install GRUB and also how the boot process will work. It is not necessary to define this part as mentioned before, yast2-bootloader proposes a configuration by itself and so this is optional. Usually the AutoYaST profile includes only this part and all other parts are added automatically during installation by yast2-bootloader. Unless you have some special needs, you don't have to specify the bootloader config in the XML file.

 <global>
     <activate>true</activate>
     <default>openSUSE 11.2 - 2.6.31.5-0.1</default>
     <gfxmenu>(hd0,1)/boot/message</gfxmenu>
     <lines_cache_id>4</lines_cache_id>
     <timeout config:type="integer">10</timeout>
 </global>

Table 4.2. 

AttributeValuesDescription
activate

set boot flag on boot partition. The boot partition can be "/" if there is no separate /boot partition. If the boot partition is on logical partition, the boot flag is set to the extended partition.

<activate>true</activate>
 
default

name(title) of the default boot section from menu.lst

<default>openSUSE 11.2 - 2.6.31.5-0.1</default>
 
gfxmenu

path to the graphical boot menu (/boot/message). 'none' means don't use graphical boot menu

<gfxmenu>(hd0,1)/boot/message</gfxmenu>
 
timeout

timeout in seconds for automatic booting the default boot section from menu.lst

<timeout config:type="integer">10</timeout>
 
generic_mbr

write generic boot code to MBR. (It is ignored if boot_mbr is set to true)

<generic_mbr>false</generic_mbr>
 
boot_mbr

write GRUB to MBR of the first disk in the order (device.map include order of disks)

<boot_mbr>false</boot_mbr>
 
boot_boot

write GRUB to separate /boot partition (if separate /boot partition missing GRUB will be written to "/")

<boot_boot>false</boot_boot>
 
boot_root

write GRUB to "/" partition

<boot_root>false</boot_root>
 
boot_extended

write GRUB to the extended partition (it is important if you want to use a generic boot code and the "boot" partition is logical) NOTE: if the boot partition is logical it should use boot_mbr (write GRUB to MBR) instead of generic_mbr.

<boot_extended>false</boot_extended>
 
boot_custom

write GRUB to custom device.

<boot_custom>/dev/sda3</boot_custom>
 
trusted_grub

use trusted GRUB instead of the classical GRUB (gfxmenu is deleted automatically if this option is true) please doesn't use trusted GRUB if your hardware doesn't support it.

<trusted_grub>false</trusted_grub>
 
lines_cache_id

internal option which means cache id for perl-Bootloader. Please don't use it or change it in a cloned XML file.


       
 


4.3.3. Initrd modules

This is a list of initrd modules. It is not necessary to add this part it should be added automatically. Please don't modify it if you are not sure what the initrd modules are.

4.3.4. Loader Type

This part defines the type of the bootloader. It could be grub, lilo, ppc or elilo.

<loader_type>grub</loader_type>
    

4.3.5. Sections

This includes the configuration of the boot sections in the menu.lst. This part is added by yast2-bootloader during installation automatically. It is good to know that yast2-bootloader deletes boot sections with no valid kernel and initrd path. It also deletes such boot sections.

   <sections config:type="list">
     <section>
       <append>resume=/dev/disk/by-id/raid-sil_ajacccbhejai-part2 splash=silent quiet showotps</append>
       <image>(hd0,0)/vmlinuz-2.6.31-10-default</image>
       <initial>1</initial>
       <initrd>(hd0,0)/initrd-2.6.31-10-default</initrd>
       <lines_cache_id>0</lines_cache_id>
       <name>openSUSE 11.2 Milestone 8 - 2.6.31-10 (default)</name>
       <original_name>linux</original_name>
       <root>/dev/mapper/sil_ajacccbhejai_part3</root>
       <type>image</type>
       <vgamode>0x31a</vgamode>
     </section>
     <section>
       <append>resume=/dev/disk/by-id/raid-sil_ajacccbhejai-part2 splash=silent quiet showopts</append>
       <image>(hd0,0)/vmlinuz-2.6.31-10-xen</image>
       <initrd>(hd0,0)/initrd-2.6.31-10-xen</initrd>
       <lines_cache_id>2</lines_cache_id>
       <name>Xen -- openSUSE 11.2 Milestone 8 - 2.6.31-10</name>
       <nounzip>0</nounzip>
       <original_name>xen</original_name>
       <root>/dev/mapper/sil_ajacccbhejai_part3</root>
       <type>xen</type>
       <vgamode>0x31a</vgamode>
       <xen>(hd0,0)/xen.gz</xen>
       <xen_append></xen_append>
     </section>
     <section>
       <blockoffset>1</blockoffset>
       <chainloader>/dev/fd0</chainloader>
       <lines_cache_id>3</lines_cache_id>
       <name>Floppy</name>
       <noverifyroot>true</noverifyroot>
       <original_name>floppy</original_name>
       <type>other</type>
     </section>
   </sections>

4.3.6. Options

the options depend on the type.

4.3.6.1. Options for section type: image and xen

Table 4.3. 

AttributeValuesDescription
append

list of kernel args but without(!) vga= and root=

<append>splash=silent quiet showopts</append>
 
image

path to the kernel

<image>(hd0,0)/vmlinuz-2.6.31-10</image>
 
initrd

path to the initrd

<initrd>(hd0,0)/my-initrd</initrd>
 
lines_cache_id

internal option which means cache id for perl-Bootloader. Please don't use it or change it in a cloned XML file.


       
 
name

name of section

<name>Productive System</name>
 
original_name

internal name of section parsed by YaST from a comment in the config file. There are some rules for names and original_name helps to determine if boot section is linux or failsafe and for chainloader it helps to determine if it is windows or other linux/floppy etc. Please use simple original_name: linux, xen, windows, floppy etc.

<original_name>linux</original_name>
 
root

location of the root partition ("/")

<root>/dev/mapper/sil_ajacccbhejai_part3</root>
 
type

type of section it could (image/xen/other/menu)

<type>xen</type>
 
vgamode

kernel arg for vga (vga=)

<vgamode>0x31a</vgamode>
 
xen

path to xen.gz

<xen>(hd0,0)/xen.gz</xen>
 
xen_append

kernel args for XEN

<xen_append></xen_append>
 

4.3.6.2. Options for section type: other (chainloader)

Table 4.4. 

AttributeValuesDescription
lines_cache_id

internal option which means cache id for perl-Bootloader. Please don't use it or change it in a cloned XML file.


       
 
name

name or title of section

<name>Floppy</name>
 
original_name

internal name of section parsed by YaST from a comment in the config file. There are some rules for names and original_name helps to determine if boot section is linux or failsafe and for chainloader it helps to determine if it is windows or other linux/floppy etc. Please use simple original_name: linux, xen, windows, floppy etc.

<original_name>linux</original_name>
 
type

type of section it could (image/xen/other/menu)

<type>other</type>
 
blockoffset

offset in chainloader (used only in grub)

<blockoffset>1</blockoffset>
 
chainloader

partition part for chainloader (so chainloader+blockoffset get final chainloader item in grub)

<chainloader>/dev/fd0</chainloader>
 
noverifyroot

with/without checking root

<noverifyroot>true</noverifyroot>
 
remap

it is special for windows and it means remapping disk which makes the second disk the first e.g. map (hd0) (hd1) map (hd1) (hd0)

<remap>false</remap>
 
makeactive

add the makeactive argument for chainloader section

<makeactive>false</makeactive>
 

4.3.6.3. Options for section type: menu (configfile)

Table 4.5. 

AttributeValuesDescription
lines_cache_id

internal option which means cache id for perl-Bootloader. Please don't use it or change it in a cloned XML file.


       
 
name

name or title of section

<name>Floppy</name>
 
original_name

internal name of section parsed by YaST from a comment in the config file. There are some rules for names and original_name helps to determine if boot section is linux or failsafe and for chainloader it helps to determine if it is windows or other linux/floppy etc. Please use simple original_name: linux, xen, windows, floppy etc.

<original_name>linux</original_name>
 
type

type of section it could (image/xen/other/menu)

<type>other</type>
 
configfile

path to menu.lst config file

<configfile>1</configfile>
 
root

device name for loading menu.lst from other installation of linux

<root>/dev/sda1</root>