弘扬大陈岛垦荒精神:syslinux的gfxboot配置(實現中文菜單)

来源:百度文库 编辑:中财网 时间:2024/04/29 16:34:13
syslinux的gfxboot配置

http://bbs.wuyou.com/viewthread.php?tid=160655&extra=&page=1 syslinux从3.74后已经支持gfxboot,我们可以通过gfxboot配置来实现中文菜单,需要的相关文件和配置如下:

一、文件结构及说明
1、光盘或U盘目录

QUOTE:<光盘目录结构及说明>
├isolinux.bat
├mkisofs.exe

│  ├
│  │  ├06PE.BIN
│  │  ├FONT.BIN
│  │  ├NTDETECT
│  │  ├NTDETECT.COM
│  │  ├PE06
│  │  ├PEIN
│  │  ├
│  │  │  ├ldntldr
│  │  │  ├mkimage.exe
│  │  │  ├TANGOPE.bin
│  │  │  └合并ldntlr.bat
│  │  ├
│  │  │  ├dir.cmd
│  │  │  ├diskgen.img
│  │  │  ├img.txt
│  │  │  └MaxDOS.img
│  │  ├
│  │  │  ├back.jpg
│  │  │  ├boot.cat
│  │  │  ├gfxboot.cfg
│  │  │  ├isolinux.bin
│  │  │  ├isolinux.cfg
│  │  │  ├text.jpg
│  │  │  └welcome.jpg
│  │  ├
│  │  │  ├gfxboot.c32    作用:gfxboot的程序,在syslinux的modules目下,在syslinux.cfg中加入ui gfxboot.c32 message这条命令,就可以用gfxboot的菜单
│  │  │  ├gfxboot.cfg    作用:gfxboot的配置文件,可设置菜单条数,位置等等,不放到message文件里的话,必须放到syslinux、isolinux目录,pxelinux的放在根目录
│  │  │  ├message        作用:是一个cpio压缩包,可用7z打开或解压,但必须用cpio压缩,内置gfxboot菜单的核心文件、翻译文件、背景图等等,可以任意命名,结构图下面。
│  │  │  ├back.jpg       作用:gfxboot菜单的背景图,不放到message文件里的话,必须放到syslinux、isolinux目录,pxelinux的放在根目录
│  │  │  ├text.jpg       作用:gfxboot菜单的欢迎文字图,
│  │  │  ├welcome.jpg    作用:gfxboot菜单的欢迎背景图
│  │  │  ├syslinux.cfg   作用:这个地球人都知道,使用gfxboot菜单的话加入:ui gfxboot.c32 message,并作相关改动
│  │  │  ├back.png       作用:syslinux普通菜单背景图
│  │  │  ├sys_zh.cfg     作用:syslinux普通中文菜单配置
│  │  │  ├zh.psf         作用:syslinux普通中文菜单字体
│  │  │  ├vesamenu.c32
│  │  │  ├chain.c32
│  │  │  ├isolinux.bin
│  │  │  ├ldlinux.bin
│  │  │  ├memdisk
│  │  │  ├poweroff.com
│  │  │  ├pxelinux.0
│  │  │  ├reboot.c32
│  │  │  ├syslinux.exe
│  │  │  ├生成isolinux.cfg.bat
│  │  │  ├<工具>
│  │  │  │  ├gfxboot注释.cfg
│  │  │  │  ├syslinux_zh_rsc.cfg
│  │  │  │  ├安装syslinux.bat
│  │  │  │  ├编辑配置软件.exe
│  │  │  │  ├编辑配置软件.ini
│  │  │  │  ├解压message.bat
│  │  │  │  ├生成syslinux_zh中文菜单.bat
│  │  │  │  ├压缩message.bat
│  │  │  │  ├
│  │  │  │  │  ├chs16
│  │  │  │  │  ├cpio.exe
│  │  │  │  │  ├GREEK.F16
│  │  │  │  │  ├hzpsf.exe
│  │  │  │  │  ├libiconv2.dll
│  │  │  │  │  └libintl3.dll
│  ├
│  │  ├NTDETECT.COM
│  │  └SETUPLDR.BIN
│  ├TANGOPE.IS_
│  ├WINNT.TPE


2、


QUOTE:
├init         gfxboot的核心文件 (必须有)
├16x16.fnt    字体文件          (必须有)
├lang         作用:设置菜单默认语言,用Notepad++或notepad2来编辑,末尾要留一行空行 (必须有)
├languages    语言列表文件,用Notepad++或notepad2来编辑,末尾要留一行空行 (必须有)
├en.tr        核心菜单翻译文件---英文 (可以有)
├zh_CN.tr     核心菜单翻译文件---简体 (必须有)
├zh_TW.tr     核心菜单翻译文件---繁体 (可用有)
├translations.zh_CN    将syslinux.cfg或isolinux.cfg菜单翻译为简体中文 (必须有)
├translations.zh_TW    将syslinux.cfg或isolinux.cfg菜单翻译为繁体中文 (可以有)
├panim.jpg    动画菜单小企鹅图
├panim_a.jpg  动画菜单小企鹅图
├pback.jpg    动画菜单背景图
├timer_a.jpg  默认菜单项倒计时启动图
├phead.jpg
├hapysuse.mod
└pabout.txt




二、配置示例
1、gfxboot.cfg示例

[Copy to clipboard] [ - ]CODE:; Sections are read in the order given in base::layout, with section 'base'
; implicitly added at the end. If a config value is given more than once,
; the first entry wins.
;
; If a screen resolution can't be set, 640x480 is used as fallback (and
; section '640x480' added to the layout list).
;
; If the penguin screen is active, section 'penguin' is automatically added
; to the layout list.
;
; Setting livecd=1 implicitly adds section 'live' to the layout list.
;
; Color values: 24 bit RGB (e.g. 0xff0000 = red).
;

[base]
; theme name
theme=openSUSE
; other sections to read
layout=1024x768,live
; penguin theme likelihood (in percent, -1 = auto)
; penguin=100开启动画,-1为关闭
penguin=-1
; activate speech output
talk=0
; sound volume (0..100)
volume=70
; menu background transparency (0..255)
menu.transparency=0x20
; default font
font.normal=16x16.fnt
; main menu font
font.large=16x16.fnt
; background image
background=back.jpg
; max. visible main menu items
; mainmenu.entries=16 设置菜单条数为16
mainmenu.entries=16
; minimal main menu selection bar width
mainmenu.bar.minwidth=300
; main menu selection bar transparency (0..255)
mainmenu.bar.transparency=150
; main menu colors
; mainmenu.bar.color=0xFF0000 菜单选定条颜色
mainmenu.bar.color=0xffffff
; mainmenu.normal.fg=0xFF0000 未选定菜单文字颜色
mainmenu.normal.fg=0xEEC900
; mainmenu.selected.fg=0xFF0000 选定菜单文字颜色
mainmenu.selected.fg=0xFF0000
; boot option colors 启动选项颜色
bootopt.label.fg=0xFF0000
bootopt.text.fg=0xFF0000
; progress bar color
progress.bar.color=0x295202
; menu colors
menu.normal.bg=0xd8deed
menu.normal.fg=0xEE30A7
menu.selected.bg=0x6c6c6c
menu.selected.fg=0xffffff
; window colors
window.bg=0xd8deed
window.fg=0x000000
window.title.bg=0x217b05
window.title.fg=0xffffff
window.title.error.bg=0xc00000
; help system colors
help.link.fg=0x0000a0
help.link.selected.fg=0xffffff
help.link.selected.bg=0x0000a0
help.highlight.fg=0x009000
; panel colors
panel.fg=0xEE30A7
; panel.title.fg 底下“语言”等文字的颜色
panel.title.fg=0xffffff
; FX的颜色
panel.f-key.fg=0xFF0000
; default keymap (e.g. de-latin1-nodeadkeys or cz-lat2-us)
keymap=
; replace underscores ('_') with space in menu entries
_2space=1

[1024x768]
; screen size
screen.size=1024,768
; upper left corner, if x = -1, center horizontally
; mainmenu.pos=120,80 调整菜单的水平向左位置为120,垂直向下为80
mainmenu.pos=120,80
; boot option input field position
; bootopt.pos=120,510调整启动项的水平向左位置为120,垂直向下为505
bootopt.pos=120,500

[800x600]
; screen size
screen.size=800,600
; upper left corner, if x = -1, center horizontally
; mainmenu.pos=100,80 调整菜单的水平向左位置为100,垂直向下为80
mainmenu.pos=100,80
; boot option input field position
; bootopt.pos=100,500调整启动项的水平向左位置为180,垂直向下为500
bootopt.pos=180,500

[640x480]
; screen size
screen.size=640,480
; upper left corner, if x = -1, center horizontally
mainmenu.pos=120,80
; boot option input field position
bootopt.pos=120,380

[penguin]
; upper left corner, if x = -1, center horizontally
mainmenu.pos=220,163
; main menu selection bar transparency (0..255)
mainmenu.bar.transparency=120
; boot option input field position
bootopt.pos=263,490
; background image
background=pback.jpg

[live]
welcome=1
; set livecd flag
livecd=1
; move down one menu entry the first time an F-key is used
autodown=0
; F-key assignments, see install section for doc
key.F2=lang
key.F3=video
key.F4=
key.F5=
key.F6=
key.F7=
key.F8=
key.F11=reboot
key.F12=poweroff
; add 'lang' option with current locale
addopt.lang=1
; add 'keytable' option with current keymap
addopt.keytable=1
2、syslinux.cfg示例:

[Copy to clipboard] [ - ]CODE:default TangoPE
implicit 1
ui /boot/syslinux/gfxboot.c32 /boot/syslinux/message
prompt   1
timeout 300
label harddisk
    localboot 0x80
label TangoPE
        boot /boot/bin/TANGOPE.bin
label 66369
        boot /BOOT/06PE.BIN
label MaxDOS
        kernel /boot/syslinux/memdisk  
        append initrd=/boot/img/MaxDOS.img
label grub4dos
        kernel /boot/bin/ldntldr
        append initrd=/boot/bin/grldr.bin
label syslinux
        config /boot/syslinux/sys_zh.cfg
# label reboot
#        kernel /boot/syslinux/reboot.c32
# label Power_off
#        kernel /boot/syslinux/poweroff.com

label XXXPE
        boot /boot/bin/XXXPE.bin
label XXXIMG
        kernel /boot/syslinux/memdisk  
        append initrd=/boot/img/XXX.img
3、translations.zh_CN



[Copy to clipboard] [ - ]CODE:※※※※※※※※※※※※※※※※※
※※※※※※※主菜单※※※※※※※
harddisk
【01】   从硬盘启动
TangoPE
【02】   启动无忧启动论坛TangoPE
66369
【03】   启动无忧启动论坛我心如水PE
MaxDOS
【04】   启动迈思DOS工具箱加强版
grub4dos
【05】   切换至GRUB4DOS菜单
syslinux
【06】   切换至SYSLINUX菜单
XXXPE
【XX】   启动X X WINDOWS PE
XXXIMG
【XX】   启动XXX IMG
reboot
【10】   重新启动
Power_off
【11】   关闭电脑
※※※※※※※※※※※※※※※※※
※※※※※※※※※※※※※※※※※

三、效果截图

开启动画效果



四、相关文章连接
1、分享:gfxmenu定制高级教程(新增可定制菜单)
2、grub4dos 的 gfxmenu 支持 (更新v3)
3、gfxboot-theme的源码编译

五、iso样板及教程

1、gfx3.3相关文件 http://www.vdisk.cn/down/index/8032332A9128
2、保留启动选项的gfx4.1 http://bbs.wuyou.com/attachment.php?aid=84869
3、去掉启动选项的gfx4.1 http://bbs.wuyou.com/attachment.php?aid=123844
4、教程 :http://www.vdisk.cn/down/index/8040033A9741
5、生成iso批处理: 生成iso批处理.rar (344.64 KB)
6、iso样板此ISO仅含TangoPE、maxdos8等工具,水老的PE请自行下载加入:http://www.vdisk.cn/down/index/8035108A9001
7、DIY步骤:修改syslinux.cfg或isolinux.cfg添加修改菜单>>>解压message修改message中对应的translations.zh_CN、换相关背景图>>>修改gfxboot.cfg设置菜单字体颜色和位置>>>重新压缩