|
|
期末考试已经结束好长时间了,考完试了,反而更加忙碌起来,近来连我的SlackWare也很少有机会“修整”了,今天用了接近一个小时搞定了Lilo Graphical,其实最早接触的多系统引导程序是grub(说来还不到一年的时间),也就是最早接触Linux就接触了grub,原来确实感觉grub功能强大,便于使用,但是最近通过使用SlackWare以及它自带的Lilo,感觉Lilo也是很不错的引导程序,而且小巧,简洁,功能对于一般使用也绝不逊色,这不,还可以制作Lilo Graphical……
Post by xiaoma@Linuxsir.org
Arch WiKi 译文:Graphical Lilo
Graphical Lilo
本文讲述如何使用lilo在启动时显示带图片背景的启动菜单。在讲述DIY的通用方法的同时,也提供了在Arch下看起来很不错的设置。
准备图片
1.找出你想用作背景的图片,最好简单点,因为你必须将其设为16色。
2.用gimp找开这张图片。
3.调整为640*480。
4.设为索引色模式(Image-->Mode-->indexed)。
5.选择"create optimal palette",并设为16色,选一种合适的抖动模式。
6.打开"Indexed Palette"对话框。记下你要使用的文字、时钟等的颜色。在lilo.conf中,将会用到这些颜色。
7.将图片以bmp格式存储在/boot目录中。
如果你喜欢,可以使用这个图片:http://www.archlinux.org/~dusty/arch-lilo.bmp
准备lilo.conf文件
1.pacman -Sy lilo
2.阅读手册页,man lilo.conf。
3.再读一遍。
4.有几种方法可以设置“图形菜单”:
1.bitmap=<bitmap-file>,将其设为你已保存的图片。例如:
bitmap=/boot/arch-lilo.bmp
2.bmp-colors=<fg>,<bg>,<sh>,<hfg>,<hbg>,< hsh>。这是菜单入口的颜色,涉及了前景、背景以及各个阴影的颜色,紧跟着高亮的文本。不要使用空格。这些颜色的索引值就是前面你所看到的。如果你愿意,你可以空一个值不填(别忘了逗号)。默认的背景是透明的,没有阴影。
3.bmp-table=<x>,<y>,<ncol>,<nrow>,<xsep>,< spill>。这个选项决定了菜单放置的位置,x和y是字符坐标。你也可以加个后缀p,将其转换为像素坐标。 阅读手册页(man lilo.conf)可以找到其他选项。
4.bmp-timer=<x>,<y>,<fg>,<bg>,<sh>。这个选项是指定倒计时的时钟坐标及计时器(数字)的颜色。一旦超时,就会启动默认的选项。它使用颜色的索引值及字符(或像素)坐标。
5.如果你使用的是上文提到的 arch-lilo.bmp,可以使用如下的选项:
bitmap=/boot/arch-lilo.bmp
bmp-colors=1,0,8,3,8,1
bmp-table=250p,150p,1,18
bmp-timer=250p,350p,3,8,1
6.保存lilo.conf
7.以root身份运行lilo
8.重启,看看效果。
在这里我使用的图片是:

/etc/lilo.conf配置如下:
- # LILO configuration file
- # generated by 'liloconfig'
- #
- # Start LILO global section
- boot = /dev/hda
- #message = /boot/boot_message.txt
- prompt
- timeout = 600
- # Override dangerous defaults that rewrite the partition table:
- change-rules
- reset
- # VESA framebuffer console @ 800x600x256
- #vga = 773
- # Normal VGA console
- # vga = normal
- # VESA framebuffer console @ 1024x768x64k
- vga=791
- # VESA framebuffer console @ 1024x768x32k
- # vga=790
- # VESA framebuffer console @ 1024x768x256
- # vga=773
- # VESA framebuffer console @ 800x600x64k
- # vga=788
- # VESA framebuffer console @ 800x600x32k
- # vga=787
- # VESA framebuffer console @ 800x600x256
- # vga=771
- # VESA framebuffer console @ 640x480x64k
- # vga=785
- # VESA framebuffer console @ 640x480x32k
- # vga=784
- # VESA framebuffer console @ 640x480x256
- # vga=769
- bitmap = /boot/lilo.bmp
- bmp-colors = 15,,0,5,,15
- bmp-table = 59,5,1,18
- bmp-timer = 66,28,6,8,0
- # End LILO global section
- # Windows bootable partition config begins
- #other = /dev/hda1
- # label = Windows
- # table = /dev/hda
- # Windows bootable partition config ends
- # Linux bootable partition config begins
- image = /boot/kernel-2.6.12
- root = /dev/hda3
- label = SLK2612
- read-only
- append = " video = vesafb : ywrap, mtrr "
- # initrd = /boot/initrd-1024*768
- # initrd = /boot/initrd-slk
- initrd = /boot/initrd-Linux
- # initrd = /boot/initrd-fly
- image = /boot/vmlinuz
- root = /dev/hda3
- label = SLKold
- read-only
- # Linux bootable partition config ends
- # Windows bootable partition config begins
- other = /dev/hda1
- label = Windows
- table = /dev/hda
- # Windows bootable partition config ends
复制代码
这样是可以用了,但是我还想自己修改,制作自己喜欢的图片,现在没时间了,以后吧……
另外补充重装Windows后grub和lilo的修复方法:
首先进入Grub界面
使用grub for dos 或者其它可以进入dos或grub的软件进入grub启动界面(原来我通常使用grub for dos,但是这个我一般通过软驱使用,但后来使用grub_climbing_v4.exe,感觉这个东西很不错,主要是简便,不过单单这里用可能有些浪费了,直接使用grub for dos本身的功能就可以不用软驱了,只是需要自己设置一下,设置方法为:复制grub020p(grub for dos)中的grldr文件到C:\下,然后修改C:\boot.ini添加一行:
Grub
格式:
- grub>root (hdx,y)
- grub>setup (hdx)
复制代码
在这里我的分别为:
- grub>root (hd0,2)
- grub>setup (hd0)
复制代码
Lilo
我的步骤为:
- grub>kernel (hd0,0)/slkboot/bzImage root=/dev/hda1
- ......
- grub>initrd (hd0,0)/slkboot/initrd.img
- ......
- grub>boot
- ......
- login:root
- sh-***#mount /dev/hda3 /mnt
- sh-***#cd /mnt/sbin
- sh-***#lilo -C /mnt/etc/lilo.conf
- ......
复制代码
补充Lilo Graphical说明 from Linuxquestions.org
Post by shilo@Linuxquestions.org
Going Graphical
11) Configure LILO for graphical login. I like LILO. It just makes sense to me. Maybe because that's what Slackware uses, so that's what I learned how to use. The big thing I think that turns people on about other boot loaders like GRUB is the cool graphics. Well wouldn't you know it, you can get some cool graphics for LILO, too. I sure prefer the graphics to the boring red LILO menu.
Here's what I do: Edit lilo.conf, save your changes, and run /sbin/lilo. Easy, huh? Of course it helps to know what you should edit in lilo.conf to make this work, so here is mine.
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hda
#compact # faster, but won't work on all systems.
prompt
timeout = 600
# VESA framebuffer console @ 800x600x64k
vga=788
# ramdisk = 0 # paranoia setting
map = /boot/map-bmp
install=/boot/boot-bmp.b
bitmap = /boot/logo64a.bmp
bmp-colors = 15,,0;5,,15
bmp-table = 59,5,1,18,
bmp-timer= 66,28,6,8,0
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz-2.6.5
root = /dev/hda2
label = Slackware-2.6.5
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends
# DOS bootable partition config begins
other = /dev/hda1
label = WindowsME
table = /dev/hda
# DOS bootable partition config ends
Fire up your favorite text editor and open up /etc/lilo.conf. Most of the stuff probably already looks similar to mine. The interesting part is the line that starts "map=" through the end of the LILO global section. Now it's not going to work if you don't have the files that are being reference, namely /boot/map-bmp, /boot/boot-bmp.b, and /boot/logo64a.bmp. I'm going off of memory here, but I believe they were all already on my system after a complete install. If they aren't in your /boot directory, use slocate to find them and copy them over to the /boot directory. Edit up that /etc/lilo.conf file and run "/sbin/lilo". No errors, right? Well then, reboot and check out your cool new boot screen.
A side note, I got my /boot/logo64a.bmp file from the Internet. The one that comes with LILO just didn't float my boat. I downloaded the one here http://users.adelphia.net/~lswysocki/downloads/lilo.bmp an renamed it /boot/logo64a.bmp. A little note if you want to use your own, make sure that the bmp file is 640X480 and has a color depth of 16. Here's some references to some others that should work, in case you wanna check them out: http://pub84.ezboard.com/fpwnz3rslu...topicID=1.topic http://www.research.rutgers.edu/~mt...-bootscreen.bmp . I haven't tried them, but they look like they should work. I always save whichever one I'm gonn use as /boot/logo64a.bmp. Saves me the trouble of having to edit /etc/lilo. I always like to run /sbin/lilo before I reboot, too. Can't run /sbin/lilo too many time, ya know!
Now seems like as good a time as any to change my default run level. I use the graphical login as well as the graphical LILO. Why? Well I prefer to boot to console, myself. But if you're like me, you're not the only one using the computer. My friends and family that have never even heard of Linux before regularly use Linux on my computer without any problems. I think they would have been a little less willing to try out Linux if I had it booting to console. Maybe I'm wrong, but, whatever.
原文地址:http://www.linuxquestions.org/qu ... amp;threadid=174447 |
|