LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 847|回复: 3

如何去掉lilo中的菜单显示?

[复制链接]
发表于 2005-5-28 17:15:45 | 显示全部楼层 |阅读模式
我的lilo时22.5.9,每次启动时会出现一个红色的菜单,以前就是LILO:请问如何在启动时不显示红色菜单,而是文字模式。谢谢
发表于 2005-5-28 17:30:48 | 显示全部楼层
/etc/lilo.conf
你自己看着改吧
回复 支持 反对

使用道具 举报

发表于 2005-5-28 18:00:24 | 显示全部楼层
由于我现在用的是 GRUB 了,所以 LILO 兄弟所说的问题还真的是没有什么注意过。如果兄弟有时间,看看这篇文章,或者是 MAN 应该能知道的。

http://www.acm.uiuc.edu/workshops/linux_install/lilo.html

LILO - The Linux Loader.
From the LILO README:

LILO is a versatile boot loader for Linux.  It does not depend on a
specific file system, can boot Linux kernel images from floppy disks
and hard disks, and can even boot other operating systems.  One of up
to sixteen differernt images can be selected at boot time.  Various
parameters, such as the root device, can be set indepenantly for each
kernel.  LILO can even be used as the master boot record.

This slide will talk about using LILO as the master boot record.
The master boot record is the first sector of your hard disk. This is where your computer's BIOS will look for instuctions on how to load an operating system. If you just had Win95 or DOS installed it would just be an instruction to load that one OS. As stated above, LILO gives us the versitility to load more then one OS.

You can configure LILO by manually editing the lilo.conf file. We'll take a look at my lilo.conf and see what each line does.


lilo.conf
When you first install Linux, the install program usually steps you through the process of automatically generating a lilo.conf file. It works well most of the time, but I have found reason to edit mine from time to time. This is one of the most important things that you must make sure never to screw up. If you screw this up, you won't be able to boot unless you made a disk with a linux kernel on it or have a DOS/Win95 boot disk.
# LILO configuration file
# for copper.isdn.uiuc.edu

These are just comments for anyone who would look at the file. All lines that start with # are ignored by your lilo.conf.
# Start LILO global section
boot = /dev/hda   # The boot device.  In this case, the first harddrive
delay = 50        # Delay in tenths of seconds between LILO prompt
                  # and loading of default image.
vga = normal      # Force sane state of video. (80x25)
ramdisk = 0       # Paranoia setting (We don't need one so we'll make sure
                  # one isn't created.  Only if using distrib boot disks.)
read-only         # All Linux filesystems should be read-only for the fsck
                  # at boot time.
root = /dev/hdc1  # Everytime I boot Linux it will be on the same root
                  # filesystem.
# End LILO global section

These are global settings that will go over all of the various kernel images. You can override settings by putting a replacement line in the individual kernel parameters.
# Linux default bootable partition config begins
image = /vmlinuz.2.0.24
  label = linux
# Linux bootable partition config ends
# Linux old kernel partition config begins
image = /vmlinuz.2.0.23
  label = old
# Linux old kernel bootable partition config ends

Here's where the real important things happen. These are two different kernel images. When I recompile a kernel I usually make my new one the default and keep the old one around and bootable just in case. (There was a time when Linux was famous for being unstable.)
For each one image is the list of the kernel image that you are to load and label is what it will be called. Label is important so you can load other kernels/OS's from the LILO: prompt.

# Win95 bootable partition config begins
other = /dev/hda1
  label = win95
  table = /dev/hda
# Win95 bootable partition config ends

This is what I use to boot, when needed (for games mostly), to Win95. This will work for DOS as well, since they use approxamtely the same boot loader. In this case table = tells LILO where to look for the partition table information. This is important if the other OS to be loaded needs to have information about which partition it was booted off of. (DOS does not need this information, but I usually present it as a matter of form.)
It is important to note that the first image = or other = that is in the lilo.conf will be the default OS/kernel image to be loaded. In the case of this lilo.conf linux is the default image to be used, and therefor Linux is the default OS. If you wanted DOS or Win95 to be the default OS

To get Linux to be happy with stuff such as WinNT come by a LUG meeting or mail lug@uiuc.edu to get in touch with the Linux Buddies.

Run LILO
The next step is to run lilo so it can write out your lilo.conf and make your system bootable. All it takes is to run lilo from the boot prompt. When I do it using the above lilo.conf I get this nice output:
root ttyp2 ~ [251]:lilo
Added linux *
Added old
Added win95
root ttyp2 ~ [252]:

The * next to the first item (linux) signifies the image that will be booted at boot time.
If there is an error in your lilo.conf it will show up here. And you can go in and re-edit your lilo.conf, to fix the problems. Luckily Linux takes mere moments to boot, so even if you do something to your lilo.conf that you don't like, you can fix it in a matter of minutes instead of hours.

Removing LILO
Should the day ever come and you want to remove Linux and LILO (perish the though) you'll need something to make LILO totally go away. The easiest way to do this is to use DOS/Win95's fdisk program. You'll need to use the flag that replaces the master boot record (/mbr).

C:\STUFF>fdisk /mbr


Unfortunately, fdisk doesn't give you any output to tell you it did it correctly. Just reboot and you'll go straight into DOS/Win95, with lilo all removed.
--------------------------------------------------------------------------------
top
--------------------------------------------------------------------------------
k-garner@uiuc.edu
回复 支持 反对

使用道具 举报

发表于 2005-5-28 18:36:29 | 显示全部楼层
是不是把/etc/lilo.conf里message这一行注销掉就可以了?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表