这次我们要来定制一下 Tiny Core 的引导界面,要用到 syslinux。
下载 syslinux 并复制我们需要的 syslinux 模块到指定的目录
PS:考虑到版本问题,我这里提供了我的 BXTLinux 的 syslinux 模块下载。
mkdir syslinux_moduels
cd syslinux_modules/
wget http://git.oschina.net/bxtkezhan/BXTLinux/raw/dev/boot/isolinux/boot.cat
wget http://git.oschina.net/bxtkezhan/BXTLinux/raw/dev/boot/isolinux/isolinux.bin
wget http://git.oschina.net/bxtkezhan/BXTLinux/raw/dev/boot/isolinux/ldlinux.c32
wget http://git.oschina.net/bxtkezhan/BXTLinux/raw/dev/boot/isolinux/libcom32.c32
wget http://git.oschina.net/bxtkezhan/BXTLinux/raw/dev/boot/isolinux/libutil.c32
wget http://git.oschina.net/bxtkezhan/BXTLinux/raw/dev/boot/isolinux/reboot.c32
wget http://git.oschina.net/bxtkezhan/BXTLinux/raw/dev/boot/isolinux/vesamenu.c32
cd ..
sudo cp syslinux_modules/* boot/isolinux/ -fv
编辑 syslinux 配置文件
syslinux 配置文件路径为 mylinux/boot/isolinux/isolinux.cfg
,可以使用 vim、nano、gedit 之类的文本编辑器进行编辑修改,我这里做了如下修改:
UI vesamenu.c32
DEFAULT MyLinux
PROMPT 0
MENU TITLE MyLinux Boot Menu
TIMEOUT 120
MENU HSHIFT 0
MENU VSHIFT 0
MENU WIDTH 78
MENU ROWS 14
MENU MARGIN 10
MENU TABMSGROW 18
MENU TIMEOUTROW 20
LABEL MyLinux
MENU LABEL ^MyLinux
LINUX /boot/vmlinuz
INITRD /boot/core.gz
APPEND loglevel=3 cde
LABEL CoreMode
MENU LABEL ^Core mode
LINUX /boot/vmlinuz
INITRD /boot/core.gz
APPEND loglevel=3
LABEL Reboot
MENU LABEL ^Reboot
COM32 /boot/isolinux/reboot.c32
UI vesamenu.c32
指定为 vesamenu 模式的 UI,比较漂亮。DEFAULT MyLinux
默认采用 MyLinux 标签所指定的启动项。
MENU TITLE MyLinux Boot Menu
UI 标题。TIMEOUT 120
等待时长。MENU HSHIFT 0 ... ...
一些 UI 配置。
LABEL MyLinux
MENU LABEL ^MyLinux --> 名称
LINUX /boot/vmlinuz --> 内核镜像
INITRD /boot/core.gz --> 文件系统镜像
APPEND loglevel=3 cde
LABEL CoreMode
MENU LABEL ^Core mode
LINUX /boot/vmlinuz
INITRD /boot/core.gz
APPEND loglevel=3
LABEL Reboot
MENU LABEL ^Reboot
COM32 /boot/isolinux/reboot.c32 --> 使用 reboot 模块用以重启
清理上次构建的残余项,重构系统
sudo make clean
sudo make
make run