|
先后实现了 lilo 和 grub 从 reiser4 文件系统中引导系统。看上了lilo的 password 可以加密启动项的功能。但lilo不如grub灵活,我已经将grub的引导信息导出为文件了,如何让lilo切换到grub呢?这个引导备份文件在第一主分区的 boot 目录下,文件名为 MBR_sda1 。lilo.conf应该如何写呢?
/ 2007 10 14 /
问题解决了。是从 (hd0,2)+1 上引导的,不是以文件的方式。lilo可以实现我要的效果。
补充: (hd0,2)+1 ,第一硬盘第三主分区的第一扇区含有 GRUB 引导信息。
这样, Lilo 启动时,可以选择名为 GRUB 的启动菜单,按Enter键之后此时屏幕上出现 GRUB 引导菜单并提示输入密码。由于已改 /etc/lilo.conf 为 600 权限,属主:组为root:root,也不必担心密码不安全了。
这是我的 /etc/lilo.conf 文件:- # Begin /etc/lilo.conf
- # lilo.conf
- #
- # global options
- boot=/dev/sda
- keytable=/boot/uk.ktl
- lba32
- map=/boot/map
- prompt
- timeout=100
- # set the name of the default image to boot
- default=Pure64
- # define an image
- image=/boot/clfskernel-2.6.22.6-64bit
- label=Pure64
- root=/dev/sda1
- read-only
- password="xxxxxxxxxx"
- vga=792
- # optionally add parameters to pass, e.g.
- # append="video=radeonfb:1024x768-16@70"
- # repeat for any other kernel images
- image=/media/sda2/boot/clfskernel-2.6.22.6-64bit
- label=x86_64
- root=/dev/sda2
- read-only
- password="xxxxxxxxxx"
- vga=792
- # optionally, add legacy operating systems
- # see man lilo.conf for examples
- # repeat for any other kernel images
- # Loader GRUB form (hd0,0)+1
- other=/dev/sda3
- label=GRUB
- password="xxxxxxxxxxx"
复制代码 |
|