怎么在文本模式下显示中文?

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
bellsleep
帖子: 9
注册时间: 2009-09-10 17:40
送出感谢: 0
接收感谢: 0

怎么在文本模式下显示中文?

#1

帖子 bellsleep » 2010-11-19 21:33

在文本模式下比较快,但是进入系统后发现中文没法显示
查到资料说有这句就已经支持中文了啊
if loadfont /usr/share/grub/unicode.pf2 ; then
为什么不行呢?

代码: 全选

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  set saved_entry=${prev_saved_entry}
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z ${boot_once} ]; then
    saved_entry=${chosen}
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 57a1cc98-cb80-4937-a410-21b23bb51ad0
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 57a1cc98-cb80-4937-a410-21b23bb51ad0
set locale_dir=($root)/boot/grub/locale
set lang=zh
insmod gettext
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu,Linux 2.6.32-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set 57a1cc98-cb80-4937-a410-21b23bb51ad0
	linux	/boot/vmlinuz-2.6.32-24-generic root=UUID=57a1cc98-cb80-4937-a410-21b23bb51ad0 ro   text
	initrd	/boot/initrd.img-2.6.32-24-generic
}
menuentry 'Ubuntu,Linux 2.6.32-24-generic (恢复模式)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set 57a1cc98-cb80-4937-a410-21b23bb51ad0
	echo	'载入 Linux ...'
	linux	/boot/vmlinuz-2.6.32-24-generic root=UUID=57a1cc98-cb80-4937-a410-21b23bb51ad0 ro single 
	echo	'载入引导虚拟磁盘 ...'
	initrd	/boot/initrd.img-2.6.32-24-generic
}
menuentry 'Ubuntu,Linux 2.6.32-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set 57a1cc98-cb80-4937-a410-21b23bb51ad0
	linux	/boot/vmlinuz-2.6.32-23-generic root=UUID=57a1cc98-cb80-4937-a410-21b23bb51ad0 ro   text
	initrd	/boot/initrd.img-2.6.32-23-generic
}
menuentry 'Ubuntu,Linux 2.6.32-23-generic (恢复模式)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set 57a1cc98-cb80-4937-a410-21b23bb51ad0
	echo	'载入 Linux ...'
	linux	/boot/vmlinuz-2.6.32-23-generic root=UUID=57a1cc98-cb80-4937-a410-21b23bb51ad0 ro single 
	echo	'载入引导虚拟磁盘 ...'
	initrd	/boot/initrd.img-2.6.32-23-generic
}
menuentry 'Ubuntu,Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set 57a1cc98-cb80-4937-a410-21b23bb51ad0
	linux	/boot/vmlinuz-2.6.32-21-generic root=UUID=57a1cc98-cb80-4937-a410-21b23bb51ad0 ro   text
	initrd	/boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu,Linux 2.6.32-21-generic (恢复模式)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set 57a1cc98-cb80-4937-a410-21b23bb51ad0
	echo	'载入 Linux ...'
	linux	/boot/vmlinuz-2.6.32-21-generic root=UUID=57a1cc98-cb80-4937-a410-21b23bb51ad0 ro single 
	echo	'载入引导虚拟磁盘 ...'
	initrd	/boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod ext2
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set 57a1cc98-cb80-4937-a410-21b23bb51ad0
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod ext2
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set 57a1cc98-cb80-4937-a410-21b23bb51ad0
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid
送出感谢: 1 次
接收感谢: 23 次

Re: 怎么在文本模式下显示中文?

#2

帖子 leeaman » 2010-11-19 21:35

你的grub菜单不支持中文显示?
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
bellsleep
帖子: 9
注册时间: 2009-09-10 17:40
送出感谢: 0
接收感谢: 0

Re: 怎么在文本模式下显示中文?

#3

帖子 bellsleep » 2010-11-19 21:43

Grub没注意,不过应该没有关系

为什么进入系统以后不能显示中文呢?
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid
送出感谢: 1 次
接收感谢: 23 次

Re: 怎么在文本模式下显示中文?

#4

帖子 leeaman » 2010-11-19 21:48

进系统的tty是要用zhcon fbterm来显示中文的,不同的
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
回复

回到 “启动和引导”