linux下開啓FrameBuffer

一:安裝

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 那

樣的命令。

 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章