[augeas-devel] [Augeas] #50: grub lense on Debian
Augeas
trac at fedorahosted.org
Wed Mar 25 14:47:01 UTC 2009
#50: grub lense on Debian
---------------------------------+------------------------------------------
Reporter: micah | Owner: lutter
Type: defect | Status: new
Priority: minor | Milestone: next
Component: Augeas | Version: 0.4.1
Keywords: grub, debian, lense |
---------------------------------+------------------------------------------
Debian does something odd with the grub menu.lst that is not very
standard, as a result it is not surprising that the augeas lense does not
know how to deal with it. In the menu.lst there is the following:
{{{
### BEGIN AUTOMAGIC KERNELS
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below
## DO NOT UNCOMMENT THEM, just edit them to your needs
}}}
This describes how there are options between these headers which have
comments preceeding them that are actually parsed by the 'update-grub'
command which then generates a new menu.lst based on those values. The
update-grub command is run after every kernel package change, and various
other packages. The reason that they are commented out (for better or for
worse) is because if they were not commented out, they would be
interpreted by grub on boot, which would fail.
Some examples of these values:
{{{
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/mapper/pond-root ro
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)
...
## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true
}}}
As you can see from the snippets included above, I've got the following
set:
# kopt=root=/dev/mapper/pond-root ro
when update-grub is run, it parses that line and creates the kernel lines
later in the file based on that and what kernels are installed, for
example it would create the following set, using the kopt line to add to
the kernel line appropriately:
{{{
title Debian GNU/Linux, kernel 2.6.26-1-vserver-686
root (hd0,0)
kernel /vmlinuz-2.6.26-1-vserver-686 root=/dev/mapper/pond-root
ro
initrd /initrd.img-2.6.26-1-vserver-686
}}}
The section where these automagic values are parsed and turned into these
kernel stanzas is ended by the following:
{{{
### END DEBIAN AUTOMAGIC KERNELS LIST
}}}
--
Ticket URL: <https://fedorahosted.org/augeas/ticket/50>
Augeas <http://augeas.net/>
a configuration API
More information about the augeas-devel
mailing list