Grub2背景設定具體實現方法

來源:互聯網
上載者:User

Ubuntu 9.10 使用 Grub2,它的設定與 Grub1 已經完全不一樣,Grub2 更加方便,功能也更多。下面是Grub2背景設定具體實現方法。

Grub2背景設定實現步驟查看 Grub 版本:
$  grub-install  -v
grub-install (GNU GRUB 1.97~beta4)
安裝 Grub2 Splashimages:
$ sudo  apt-get  install  grub2-splashimages

註:這些檔案被安裝在 /usr/share/images/grub 目錄下。

Grub2背景設定實現步驟配置 Grub2:
Grub2 的配置已經不通過直接編輯 /boot/grub/grub.cfg 了,而是由
(1) /etc/grub.d 目錄下的檔案
(2) /etc/default/grub
共同決定,修改了這些檔案後執行 update-grub 就可以自動產生 /boot/grub/grub.cfg。
/etc/grub.d 下的檔案和 /etc/rcX.d 下的檔案命名方式類似。
/etc/default/grub 存放一些全域參數,比如 GRUB_DEFAULT、GRUB_TIMEOUT 等等。

Grub2背景執行個體:修改 Grub2 背景圖片
比如現在要使用 /usr/share/imagse/grub/Windbuchencom.tga 作為背景圖片:
[Step 1]
修改 /etc/grub.d/05_debian_theme,找到這一行:
for i in {/boot/grub,/usr/share/images/desktop-base}/moreblue-orbit-grub.{png,tga} ; do
改成:
for i in {/boot/grub,/usr/share/images/desktop-base,/usr/share/images/grub}/Windbuchencom.{png,tga} ; do
這樣一來,Grub 就會在:
/boot/grub
/usr/share/images/desktop-base
/usr/share/images/grub
目錄下尋找到 Winbuchencom,尾碼名為 png 或 tga 的檔案。
註:如果你的圖片是 JPG 格式,那麼只要在尾碼名再添加 jpg 即可。
[Step 2]
$ sudo  update-grub
這樣就OK了,重啟後就可以看到了。

如果要修改圖片的解析度,比片是 1334x768,那麼修改 /etc/default/grub:GRUB_GFXMODE=1334x768

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.