VGA framebuffer modes used while booting in Linux

VGA modes are those that you pass as a parameter to the kernel while booting Linux from the GRUB or LILO boot loader. You will find the answer to why you should do that in the following section.

Most modern Linux distributions turn ON the graphics mode during boot time with the help of the BIOS and use this as the framebuffer device /dev/fb0. This lets the Linux distribution provide a nice graphical splash image while booting.

You can switch the VGA mode using the vga=... boot parameter. For the graphics mode to be operational, you have to compile the kernel in vesafb mode.

Table of Linux Kernel Video Mode Numbers

The video mode number of the kernel is the VESA mode number + 0×200. Keeping the following table as a reference, you can pass the requisite number as the value of the vga boot parameter to allow Linux bootloader to use that particular screen resolution and color.

Linux kernel video mode numbers
640×480 800×600 1024×768 1280×1024
256 0×301 0×303 0×305 0×307
32k 0×310 0×313 0×316 0×319
64k 0×311 0×314 0×317 0x31A
16M 0×312 0×315 0×318 0x31B

Note: In the table above, the 0x denotes, the values are in hexadecimal.

If you are using LILO as your boot loader, to enable one of the above modes in LILO, you have to specify “vga=ask” in the lilo.conf file and rerun LILO. Then at the time of booting your machine, LILO will ask you to specify a value to the vga mode and you can type in the desired mode at the “vga=ask” prompt. For example if you like to use 800x600x16M colors you have to say “315″ at this prompt.

If you are using GRUB as your bootloader, then too you can pass vga=0x315 as your kernel boot parameter.

0saves
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Related posts: