linux下开启FrameBuffer

来源:互联网 发布:医院网络咨询好做吗 编辑:程序博客网 时间:2024/04/29 21:17

一:安装

1.linux设置

   确保您的 Linux 内核包含了 FrameBuffer 支持,并包含了 VESA FrameBuffer驱动程

序。RedHat Linux 6.x 及以上的发行版自带的内核中已经包含了该驱动程序。如果使用自己

编译的内核,请检查您的内核配置。

如果使用 LILO 引导装载器,则需要修改 /etc/lilo.conf 文件,在您所使用的内核选项

段中,添加如下一行(使用 GRUB 的用户请转到第 6 步):

vga=0x0317

这样,Linux 内核在启动时将把显示模式设置为 1024x768x16bpp 模式。如果您的显示

器无法达到这种显示分辨率,可考虑设置 vga=0x0314,它对应 800x600x16bpp显示模式。

修改后的 /etc/lilo.conf 文件类似:

boot=/dev/hda

map=/boot/map

install=/boot/boot.b

prompt

timeout=50

linear

default=linux

image=/boot/vmlinuz-2.4.2

vga=0x0317 ; 这一行设置显示模式.

label=linux

read-only

root=/dev/hda6

other=/dev/hda1

label=dos

运行 lilo 命令,使所作的修改生效,并重新启动系统:

# lilo

# reboot

如果一切正常,将在 Linux 内核的引导过程中看到屏幕左上角出现可爱的 Linux 吉祥

物——企鹅,或者 RedHat Linux 的蓝天白云产品徽标,并发现系统的显示模式发生了变化。

如果读者使用的是 Red Hat 7.x 或者更高版本,并且在安装 Red Hat 时使用了 GRUB

而不是 LILO 作为引导装载器,则设置 FrameBuffer 的方法会有一些不同:

第一,要激活 VESA FrameBuffer 驱动程序,需要修改 /boot/grub/menu.lst 文件,并在

kernel 打头的一行添加 vga=0x0317。您也可以复制已有的引导选项并修改复制之后的选项,

例如:

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE: You do not have a /boot partition. This means that

# all kernel and initrd paths are relative to /, eg.

# root (hd0,0)

# kernel /boot/vmlinuz-version ro root=/dev/hda1

# initrd /boot/initrd-version.img

#boot=/dev/hda

default=0

timeout=10

splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Red Hat Linux (2.4.18-3, FrameBuffer)

root (hd0,0)

kernel /boot/vmlinuz-2.4.18-3 ro root=/dev/hda1 vga=0x0317

initrd /boot/initrd-2.4.18-3.img

title Red Hat Linux (2.4.18-3)

root (hd0,0)

kernel /boot/vmlinuz-2.4.18-3 ro root=/dev/hda1

initrd /boot/initrd-2.4.18-3.img

其中Red Hat Linux (2.4.18-3, FrameBuffer) 就是设置了 VESA FrameBuffer 的引导选项。

第二,修改了 /boot/grub/menu.lst 文件之后,重新启动系统即可,而无需执行类似 lilo 那

样的命令。

 
原创粉丝点击