There is a lot of stuff on running UTF-8 on the console in combination with
lilo, but very little on grub.
Below some info about my own setup (Debian Stable);
In boot/grub/menu.lst there is an entry 'kopt' (kernel options);
## e.g. kopt=root=/dev/hda1 ro # kopt=root=/dev/hda3 ro vga=769The lines with a single remark are remarks to grub, but not to update-grub. update-grub uses double remarks.
Enter the desired VGA mode on the line
Mode table in hex;
| Colours | 640x480 | 800x600 | 1024x768 | 1280x1024 |
|---|---|---|---|---|
| 256 | 0x301 | 0x303 | 0x305 | 0x307 |
| 32k | 0x310 | 0x313 | 0x316 | 0x319 |
| 64k | 0x311 | 0x314 | 0x317 | 0x31A |
| 16M | 0x312 | 0x315 | 0x318 | 0x31B |
Decimal mode table;
| Colours | 640x480 | 800x600 | 1024x768 | 1280x1024 |
|---|---|---|---|---|
| 256 | 769 | 771 | 773 | 775 |
| 32k | 784 | 787 | 790 | 793 |
| 64k | 785 | 788 | 791 | 794 |
| 16M | 786 | 789 | 792 | 795 |
Running 'update-grub' will edit menu.list;
kernel /vmlinuz-2.4.27-2-686 root=/dev/hda3 ro vga=769There is no point in editing this line yourself, since an update-grub will remove it. You have to edit the line with the remark.
Edit /etc/console-tools/config to select the desired font;
SCREEN_FONT=LatArCyrHeb-16You also have to enable framebuffer.
You can select UTF-8 on boot time if you want. In /etc/init.d/console-screen.sh there is a section which checks for a UTF-8 locale and switches to UTF-8. I modified this script to work on all ttys;
CHARMAP=`LANG=$LANG LC_ALL=$LC_ALL LC_CTYPE=$LC_CTYPE locale charmap`
if test "$CHARMAP" = "UTF-8"
then
/usr/bin/unicode_start 2> /dev/null || true
# The script only does tty1
/usr/local/sbin/uni-boot.sh
else
/usr/bin/unicode_stop 2> /dev/null|| true
fi
/usr/local/sbin/uni-boot.sh contains;
#!/bin/bash
consolechars --font=LatArCyrHeb-16
for vc in `seq 2 6`
do
consolechars --font=LatArCyrHeb-16 --tty="/dev/tty${vc}"
/bin/echo -n -e '\033%G' > "/dev/tty${vc}"
done
exit 0
There really should be two separate scripts. One to set the charset on boot and
one the set the charset on the fly.