Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use lilo, and have two different kernels. One is newer and use KMS with it.

What I would like to do, is to be able to set vga=xxx for only one of the kernels.

Is this possible?

I would also like to be able to code into lilo.conf options that I pass on the commandline, but am unsure how to do this


adding my current lilo.conf

append=" vt.default_utf8=0"
boot = /dev/sda
timeout = 1200
other = /dev/sda1
  label = Windows
  table = /dev/sda
image = /boot/bzImage-
  root = /dev/sda5
  label = Test
image = /boot/bzImage-2.6.31
  root = /dev/sda5
  label = Older
  vga = 791
share|improve this question
wow, blast from the past. my answer below jives with what i recall from the last decade, but i haven't used LILO in quite some time so i may be forgetting something. – quack quixote May 4 '10 at 20:33
up vote 0 down vote accepted

According to an old LILO manpage you'd use the vga option for one kernel section in your lilo.conf but not the other. Example:

image = /zImage-1.0.9
        label = 1.0.9

image = /tamu/vmlinuz
        label = tamu
        root = /dev/hdb2
        vga = ask

The vga parameter can be given any standard response (that is, any value the kernel will understand; I believe LILO will simply pass any value set to the kernel):

vga = mode
This specifies the VGA text mode that should be selected when booting. The following values are recognized (case is ignored):

  • normal: select normal 80x25 text mode.
  • extended (or ext): select 80x50 text mode.
  • ask: stop and ask for user input (at boot time).
  • [number]: use the corresponding text mode. A list of available modes can be obtained by booting with vga=ask and pressing [Enter].

If this variable is omitted, the VGA mode setting contained in the kernel image is used. (And that is set at compile time using the SVGA_MODE variable in the kernel Makefile, and can later be changed with the rdev(8) program.)

For additional kernel options that LILO doesn't understand, use the append keyword in lilo.conf:

image = /tamu/vmlinuz
        label = tamu
        root = /dev/hdb2
        vga = ask

Don't forget to rerun LILO after changing lilo.conf to pick up the changes.

share|improve this answer
At the moment I have the cga option set for one kernel as per your example, but it currently occurs for every kernel I boot with. Likewise I wanted to add the option iwlagn.swcrypto=1 for a particular kernel, but running lilo just results in an error. Rather than have the option on a operate line, should I have it after the path of the kernel? – Jack May 5 '10 at 1:39
@jack: hopefully you mean the vga option... i can't remember, but i think LILO only recognizes a few kernel options in this format. use the append option for others. adding another example now... – quack quixote May 5 '10 at 1:59
Hi quack, thanks, I will try out the append option later, it should solve my problem. However the vga paramter does not work as it should. I have pasted my lilo.conf above, and when I boot test, which is the kernel with KMS enabled, I have to manually tell it to continue whenit complaines about the vga line. Removing it solves the problem... – Jack May 5 '10 at 5:46
NM, got it all sorted, thanks :) – Jack May 5 '10 at 10:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .