LinuxSir.cn,穿越时空的Linuxsir!

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

如何用lilo引导红旗4.0?

[复制链接]
发表于 2004-10-3 17:02:14 | 显示全部楼层 |阅读模式
我的红旗4.0安装在hda9,现想用lilo进行引导:help
发表于 2004-10-3 20:16:26 | 显示全部楼层
红旗4.0只提供grub吧,将它安装至MBR就行了。如果确实只想用lilo,那可以找redhat8.0/9.0的盘来安装该软件包即可。
 楼主| 发表于 2004-10-4 17:17:14 | 显示全部楼层
最初由 lanche 发表
红旗4.0只提供grub吧,将它安装至MBR就行了。如果确实只想用lilo,那可以找redhat8.0/9.0的盘来安装该软件包即可。

这我知道,我的意思是说,因为装了其它发行版,变成了lilo如何让它把红旗所在分区引导起来!
发表于 2004-10-4 21:10:29 | 显示全部楼层
用lilo启动你另外的那个Linux,然后修改/etc/lilo.conf文件,加入如下一段:
[php]
image=/boot/vmlinux-2.4.20-8
      label="Red Flag Desktop 4.0"
      root=/dev/hda9
      initrd=/boot/initrd-2.4.20-8.img
      read-only
[/php]
然后运行lilo,更新在MBR上的lilo(如果你的lilo不是要安装在MBR上那就用-b参数指定安装位置)。

如果需要打开framebuffer就加一行vga=788。
 楼主| 发表于 2004-10-5 08:11:03 | 显示全部楼层
最初由 lanche 发表
用lilo启动你另外的那个Linux,然后修改/etc/lilo.conf文件,加入如下一段:
[php]
image=/boot/vmlinux-2.4.20-8
      label="Red Flag Desktop 4.0"
      root=/dev/hda9
      initrd=/boot/initrd-2.4.20-8.img
      read-only
[/php]
然后运行lilo,更新在MBR上的lilo(如果你的lilo不是要安装在MBR上那就用-b参数指定安装位置)。

如果需要打开framebuffer就加一行vga=788。

好像不行!
root@debian:~# lilo
Added Debian
Skipping /vmlinuz.old
Added Windows98(hda1)
Added Windows(hda5)
Added Windows(hda6)
Added Windows(hda7)
Added Windows(hda8)
Fatal: open /boot/vmlinux-2.4.20-8: No such file or directory
root@debian:~#
 楼主| 发表于 2004-10-5 08:13:58 | 显示全部楼层

现在的lilo.conf如下:

vga=791
# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)',
# ---------------       `install-mbr(8)', `/usr/share/doc/lilo/',
#                       and `/usr/share/doc/mbr/'.

# +---------------------------------------------------------------+
# |                        !! Reminder !!                         |
# |                                                               |
# | Don't forget to run `lilo' after you make changes to this     |
# | conffile, `/boot/bootmess.txt', or install a new kernel.  The |
# | computer will most likely fail to boot if a kernel-image      |
# | post-install script or you don't remember to run `lilo'.      |
# |                                                               |
# +---------------------------------------------------------------+

# Support LBA for large hard disks.
#
lba32

# Overrides the default mapping between harddisk names and the BIOS'
# harddisk order. Use with caution.
#disk=/dev/hde
#    bios=0x81

#disk=/dev/sda
#    bios=0x80

# Specifies the boot device.  This is where Lilo installs its boot
# block.  It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
#
boot=/dev/hda

# Specifies the device that should be mounted as root. (`/')
#
root=/dev/hda11

# Enable map compaction:
# Tries to merge read requests for adjacent sectors into a single
# read request. This drastically reduces load time and keeps the
# map smaller.  Using `compact' is especially recommended when
# booting from a floppy disk.  It is disabled here by default
# because it doesn't always work.
#
# compact

# Installs the specified file as the new boot sector
# You have the choice between: bmp, compat, menu and text
# Look in /boot/ and in lilo.conf(5) manpage for details
#
install=/boot/boot-menu.b

# Specifies the location of the map file
#
map=/boot/map

# You can set a password here, and uncomment the `restricted' lines
# in the image definitions below to make it so that a password must
# be typed to boot anything but a default configuration.  If a
# command line is given, other than one specified by an `append'
# statement in `lilo.conf', the password will be required, but a
# standard default boot will not require one.
#
# This will, for instance, prevent anyone with access to the
# console from booting with something like `Linux init=/bin/sh',
# and thus becoming `root' without proper authorization.
#
# Note that if you really need this type of security, you will
# likely also want to use `install-mbr' to reconfigure the MBR
# program, as well as set up your BIOS to disallow booting from
# removable disk or CD-ROM, then put a password on getting into the
# BIOS configuration as well.  Please RTFM `install-mbr(8)'.
#
# password=tatercounter2000

# Specifies the number of deciseconds (0.1 seconds) LILO should
# wait before booting the first image.
#
delay=20

# You can put a customized boot message up if you like.  If you use
# `prompt', and this computer may need to reboot unattended, you
# must specify a `timeout', or it will sit there forever waiting
# for a keypress.  `single-key' goes with the `alias' lines in the
# `image' configurations below.  eg: You can press `1' to boot
# `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'.
#
# message=/boot/bootmess.txt
prompt
timeout=150
#        prompt
#        single-key
#        delay=100
#        timeout=100

# Kernel command line options that apply to all installed images go
# here.  See: The `boot-prompt-HOWO' and `kernel-parameters.txt' in
# the Linux kernel `Documentation' directory.
#
# append=""
append="hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi apm=power-off nomce"

# Boot up Linux by default.
#
default=Linux

image=/boot/vmlinuz-2.4.20-xfs
        label=Debian
        initrd=/boot/initrd.gz
        read-only
#        restricted
#        alias=1

image=/vmlinuz.old
        label=LinuxOLD
        read-only
        optional
#        restricted
#        alias=2

# If you have another OS on this machine to boot, you can uncomment the
# following lines, changing the device name on the `other' line to
# where your other OS' partition is.
#
# other=/dev/hda4
#        label=HURD
#        restricted
#        alias=3
other=/dev/hda1
  label="Windows98(hda1)"

other=/dev/hda5
  label="Windows(hda5)"

other=/dev/hda6
  label="Windows(hda6)"

other=/dev/hda7
  label="Windows(hda7)"

other=/dev/hda8
  label="Windows(hda8)"

image=/boot/vmlinux-2.4.20-8
      label="Red Flag Desktop 4.0"
      root=/dev/hda9
      initrd=/boot/initrd-2.4.20-8.img
      read-only
发表于 2004-10-5 08:27:25 | 显示全部楼层
启动你的Debain,挂上红旗所在的分区检查一下内核和initrd的位置及名称;确认红旗的根分区是否/dev/hda9。
 楼主| 发表于 2004-10-5 09:24:59 | 显示全部楼层
检查了,没错!
 楼主| 发表于 2004-10-5 09:27:09 | 显示全部楼层

请看红旗的grub.conf:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,8)
#          kernel /boot/vmlinuz-version ro root=/dev/hda9
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,8)/boot/grub/splash.xpm.gz
title Red Flag Linux (2.4.20-8)
        root (hd0,8)
        kernel /boot/vmlinuz-2.4.20-8 ro root=/dev/hda9 vga=785 console=/dev/null CONSOLE=/dev/tty2 acpi=off hdc=ide-scsi
        initrd /boot/initrd-2.4.20-8.img

title Windows98
        rootnoverify (hd0,0)
        chainloader +1

title slackware10
                     root (hd0,10)
                     kernel /boot/vmlinuz ro root=/dev/hda11

title Red Flag Linux (Safe Mode)
        root (hd0,8)
        kernel /boot/vmlinuz-2.4.20-8 root=/dev/hda9 acpi=off 4 hdc=ide-scsi
        initrd /boot/initrd-2.4.20-8.img
title Red Flag Linux (Console Mode)
        root (hd0,8)
        kernel /boot/vmlinuz-2.4.20-8 root=/dev/hda9 acpi=off 3 hdc=ide-scsi
        initrd /boot/initrd-2.4.20-8.img
发表于 2004-10-5 13:44:29 | 显示全部楼层
你的红旗4.0内核确实位于/dev/hda9的/boot/目录下,且名为vmlinuz-2.4.20-8没错。Debain的lilo不能引导它可能是因为它不能引导位于硬盘8G之后的系统吧,也许就是这个老问题,可以试着为红旗分一个几十兆的/boot分区,但要在硬盘比较靠前的位置上。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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