安装BURG美化

BURG的编译安装

 

一、编译安装:

      安装依赖组件:

      #apt-get install gcc gcc-multilib bison autoconf make ruby gettext

      #apt-get install bzr

 

获取源码:

      #bzr branch lp:burg

下载完成后,进入burg目录:

      #chmod  u+x  autogen.sh

      #./autogen.sh

编译和安装

      #mkdir bin_pc            (新建一个用来存放编译文件的目录)

      #cd bin_pc

      #../configure --with-platform=pc --prefix=/usr/share/burg --disable-werror

      (--disable-werror选项用来忽略警告,如果这里不加这个选项,则make的时候会把它当作错误看待,从而导致编译失败)

      #make

      #make install

      (安装的目录是/usr/share/burg, 在configure的选项里指定,如不指定目录则会默认安装,指定目录或是不指定都无妨,后面我会说一下哪些不同)

打开#vi /etc/default/grub文件,找到 #GRUB_TERMINAL=console, 把前面的#去掉,使得这句生效


我的是安装在/usr/sbin/burg目录:      

            # /usr/share/burg/sbin/burg-install /dev/sda

            (默认安装的童鞋直接(root)#burg-install /dev/sda 或(普通用户)$sudo burg-install /dev/sda )

            # /usr/share/burg/sbin/burg-mkconfig -o /boot/burg/burg.cfg

            (默认安装的童鞋直接(root)#burg-mkconfig -o /boot/burg/burg.cfg 或(普通用户)$sudo burg-mkconfig -o /boot/burg/burg.cfg )

 

二、和安装目录有关的一些整理以及burg和grub

      /boot/burg/

            存放主题,字体和burg.cfg等等配置文件

     
 从源码手动编译好时不存在的目录:(${PATH}表示安装目录)

            ${PATH}/etc/default/,也即这个目录下的burg这个文件一开始是不存在的,但是burg-mkconfig命令是依照这个文件侦测系统的,不存在的话会使用默认的设置,就是说所有的主题都不会生效,只是默认的黑白字体,所以你需要新建burg这个文件,复制粘贴下面的内容:

burg文件内容:

# If you change this file, run 'update-burg' afterwards to update

# /boot/burg/burg.cfg.

GRUB_DEFAULT=0

GRUB_TIMEOUT=5

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

GRUB_CMDLINE_LINUX=""

# Uncomment to disable graphical terminal (grub-pc only)

#GRUB_TERMINAL=console

# If you want to enable the save default function, uncomment the following

# line, and set GRUB_DEFAULT to saved.

#GRUB_SAVEDEFAULT=true

# The resolution used on graphical terminal

# note that you can use only modes which your graphic card supports via VBE

# you can see them in real GRUB with the command `vbeinfo'

# In the boot menu, use hotkey 'r' to popup a resolution selection menu.

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries

#GRUB_DISABLE_LINUX_RECOVERY="true"

# Uncomment to get a beep at grub start

#GRUB_INIT_TUNE="480 440 1"

# GRUB_THEME's value can be 'saved' or a specific BURG theme name, you can also

# set it to the pathname of a GRUB2 theme file.

# In the boot menu, use hotkey 't' to popup a theme selection menu

GRUB_THEME=saved

# GRUB_FOLD's value can be 'saved', 'true' or 'false'.

# In the boot menu, use hotkey 'F7' to show the full list, 'f' to toggle

# between folding modes.

GRUB_FOLD=saved

# Add user with burg-adduser, then use GRUB_USERS to config authentication.

# The following example means user1 can boot Ubuntu, no password is needed to

# boot Windows, user1 amd user2 can boot other OS. Superusers can boot any OS

# and use hotkeys like `c' to enter console mode.

#GRUB_USERS="*=user1,user2:ubuntu=user1:windows="

# For a complete list of supported variables, refer to this wiki page:

# http://code.google.com/p/burg/wiki/ConfigurationVariables

GRUB_GFXMODE=1366x768

 
  /boot/burg/themes/,,刚编译好的时候是不存在主题这个目录和任何主题的,需要自己动手建立这个目录并下载主题放进去

  /boot/burg/fonts/,刚刚编译好的时候是不存在字体这个目录和任何字体的,需要自己动手建立这个目录并下载字体放进去

  grub的目录和文件是和这个一模一样的,只是名称一个是grub,而另一个是burg而已

 

三、默认编译安装会有”GRUB Loading ... ...”去除启动时的”GRUB Loading... ...”的字样,找到下面相应的代码文件修改


            "./boot/i386/pc/boot.S" line 382:

            OLD -> notification_string: .asciz "GRUB "

            NEW -> notification_string: .asciz ""


            "./boot/i386/pc/diskboot.S" line 323:

            OLD -> notification_string: .asciz "loading"

            NEW -> notification_string: .asciz ""

 

            "./boot/i386/pc/diskboot.S" line 325:

            OLD -> notification_step: .asciz "."

            NEW -> notification_step: .asciz ""

 

            "./boot/i386/pc/diskboot.S" line 326:

            OLD -> notification_done: .asciz "\r\n"

            NEW -> notification_done: .asciz ""

 

            "./boot/sprc64/ieee1275/boot.S" line 71:

            OLD->grub_name:            .asciz "GRUB "

            NEW->grub_name:            .asciz ""

 

            "./boot/sprc64/ieee1275/diskboot.S" line 37:

            OLD->notification_string:            .asciz "Loading kernel"

            NEW->notification_string:            .asciz ""

 

            "./boot/sprc64/ieee1275/diskboot.S" line 40:

            OLD->notification_step:            .asciz "."

            NEW->notification_step:            .asciz ""

 

            "./boot/sprc64/ieee1275/diskboot.S" line 43:

            OLD->notification_done:            .asciz "\r\n"

            NEW->notification_done:            .asciz ""

 

四、其他一些设置

      在安装软件包后进行下列步骤:

1. 首先,把 BURG 替代 GRUB 安装为你的开机引导程序,

# burg-install /dev/sda  

注意: 记住 '/dev/sda' 这部份为根据你的硬盘而有变动。

 

2. 然后让 burg 建立它的配置文件:

# burg-mkconfig -o /boot/burg/burg.cfg

 

3. 如果在前几步没遇到任何错误讯息的话,burg 应该己经安装完毕并能够使用了。可以用以下命令作预览:

# /opt/burg-emu/bin/burg-emu

 

现在重启后,便会看到BURG!布景主题的选择和分辨率的设定也不用在配置文件内作修改。当 BURG 启动时载入后,你就能修改设定,而且它会记住你每次开机后所作的设定!

 

提示及技巧

快捷指令

 F1 / h - 说明

 F2 / t - 更换布景主题

 F3 / r - 改变分辨率

 F5 / ctrl-x - 结束编辑

 F6 - 下一个视窗

 F7 - 展开己折叠项目

 F8 - 切换纯文字与图形模式

 F9 - 关机

 F10 - 重启

 f - 切换折叠与展开模式

 c - 打开终端模式

 2 - 打开两个终端模式

 e - 编辑目前的指令

 q - 离开图形模式

 i - 展示布景主题信息

 n - 同类�e的下一个项目

 w - 下一个 Windows 系统

 u - 下一个 Ubuntu 系统

 ESC - 从视窗或选单内离开


想列出完整快捷键列表,请按F1.


目录化 (群组化)

想要使用 burg 的目录化功能 (目录化分类选单项目, 例. arch 跟 arch fallback 能收进同一分类), 当 burg 载入后按 F. 如果看起来没效,你需要 burg.cfg 自行新增一个目录。

打开你的 burg.cfg

### BEGIN /etc/burg.d/10_linux ###

menuentry "Arch, with Linux vmlinuz-linux" --class arch --class gnu-linux --class gnu --class os --group arch {

      savedefault

      insmod ext2

      ...

}

menuentry "Arch, with Linux vmlinuz-linux Fallback" --class arch --class gnu-linux --class gnu --class os --group arch {

      savedefault

      insmod ext2

      ...

}

menuentry "Arch, with Linux vmlinuz-linux Fallback (recovery mode)" --class arch --class gnu-linux --class gnu --class os --group arch {

      savedefault

      insmod ext2

      ...

}

### END /etc/burg.d/10_linux ###

 

请耐心地在每个项目的第一行加上 --group 参数。 拥有同样 group 的项目会在你启用目录化时被收进同一目录。

项目的图示会按照项目的 class (类�e)显示. 例如. --class arch 会让项目设定为 arch linux 并显示 arch 的 logo。


制作 BURG 背景主题


Burg 最主要的功能就是它的可主题化布景。想新增一个主题可以复制它的目录到 /boot/burg/themes/ 然后更新 config (
# burg-mkconfig -o /boot/burg/burg.cfg). 更换主题请在程序中按T,便会显示可用的主题清单。用方向键来反白想要的主题然后按下 Enter 来确定选择。无需修改 burg-emu 也不用重启。

我的空间原文:http://user.qzone.qq.com/1475032202/blog/1419166142




你可能感兴趣的:(burg安装,burg编译)