Undefined video mode number 未定义的视频模式号



Undefined video mode number 未定义的视频模式号

i ve added vga=0×318 to my menu.lst but whenever I boot, I get the message, “Undefined video mode number 318, press enter to see available modes, space to continue, or wait 30 seconds…”.

Undefined video mode number - Sacrifice - BabyUnion

 

Anyone know what the problem is? I’ve tried vga=ask (gives me tiny resolutions like 80×65!!!!) and vga=792. Still the same thing.

 

Answer:

GRUB allows you to choose the VGA definition it uses when booting.
(Note: this does not affect the definition in Xorg).

You need to add the option vga=xxx on the kernel stanza in the file /boot/grub/menu.lst.


Of course, replace xxx with the video mode you want. Your kernel stanza will look like this:
kernel /boot/vmlinuz-2.6.18-6-686 root=/dev/sda7 ro vga=791

Here is a list of the available video modes:

 

Colour depth 640×480 800×600 1024×768 1280×1024 1400×1050 1600×1200
8 (256) 769 771 773 775
15 (32K) 784 787 790 793
16 (65K) 785 788 791 794 834 884
24 (16M) 786 789 792 795

 

 

This is a problem I get a lot when I run Slackware on my netbook. The problem seems to lie in the fact that the video numbers displayed in the menu are in hexadecimal form while the “vga=” number in lilo.conf is in decimal form. What you have to do is boot the system, make note of the number you use when you get the error and have to select a video mode, then convert this number to decimal (Hex/Dec/Bin Converter Here) and use it in the “vga=” portion of lilo.conf. Remember, after editing lilo.conf, run lilo to install the changes.
In the event that this doesn’t work, perhaps try converting the number you’ve selected (during boot) from decimal to hex. My explanation above could be backwards, I can’t remember exactly which way it is. if it doesn’t work still after you convert the number,i think maybe your screen can’t support the video mode, try others, in my case, my computer can’t support 789, but the 788 works well。

 

总之:出现这个错误的原因是因为,在grub的menu.lst中的vga= 的值是*10*进制模式的,而在系统引导时的列表显示的vga模式值是16进制的,所以如果你在grub的配置文件中按系统列表的值来设置的话是不对的,要对这个数字进行转换,比如如果你要设置分辨率为800*600*16,按上图可以选择使用314,如果你在grub中设置vga=314,那是不对的,需要将314转换为十进制,也就是788(或者vga=0×314,这种方法我没有试过)。但是如果你将vga=789,系统也会有Undefined video mode number提示,那是因为你的系统根本就不支持vga=789的模式。