Tuesday, August 09, 2005

Debian console resolutions

That was one of these things I expected to be difficult and probably not worth the trouble. It turned out to be so easy, that you may wonder why I even talk about it.

The default console is 640 x 480, but that is not the resolution current LCD monitors are built for. So it would be nice to have the Linux console use the appropriate reolution for your monitor, to have more and sharper text on the screen.

Searching for things like "debian console resolution", I got the impression I would have to recompile the kernel. While not difficult, it definitely seemed like far too much trouble.

The article that discouraged me at first but then also gave me the answer is "Jazz Up Your Debian System Boot". It allows you to add a graphical boot splash, and run the console in the graphics mode of your choice.

I didn't care about the splash screen, so I just tried a tiny part of the instructions: I added vga=791 to the kernel line in /boot/grub/menu.lst and rebooted into a 1024 x 768 text console. That was it.

The number to give to the vga option depends on the resolution and color depth you want:
Colors        | 800x600   1024x768   1280x1024

256 (8bit)| 771 773 775
32K (15bit)| 787 790 793
65K (16bit)| 788 791 794
16.7 M (24bit)| 789 792 795


This is my entry in grub's menu.lst:
title           Debian GNU/Linux, kernel 2.6.8-2-686 @ 1024 x 768
root (hd0,0)
kernel /boot/vmlinuz-2.6.8-2-686 root=/dev/sda1 ro vga=791
initrd /boot/initrd.img-2.6.8-2-686
savedefault
boot

7 Comments:

Anonymous xicast said...

Dude, thanks. This is still a useful bit of info. Thanks for saving me some time.

24 November, 2005 02:24  
Anonymous Avochelm said...

This was actually the first thing I did when learning linux (Debian). Great stuff. Got my feet wet. Thanks.

27 December, 2005 18:27  
Anonymous Lee said...

You're the man.

My Lilliput lcd always has part of the screen cutoff vertically when booting into a console, of course it 's the prompt that's hidden.

Worked like a charm.

Thanks!

29 May, 2006 19:50  
Anonymous phiberoptik said...

great info - but how to do it with SILO?

31 July, 2007 17:26  
Anonymous Mr. Blue said...

Sweet! Thanks dude, this is nice and simple. Good one.

17 March, 2008 14:46  
Anonymous Anonymous said...

Sweet man thanks!!!

04 July, 2009 11:28  
Blogger Melnik Balogh said...

how can I change the resolution of the login screen? its now on max, witch makes it unreadable...

05 December, 2009 22:24  

Post a Comment

Links to this post:

Create a Link

<< Home