LinuxSir.cn,穿越时空的Linuxsir!

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

问题频出啊. :( grub和lilo的问题

[复制链接]
发表于 2004-11-16 23:43:12 | 显示全部楼层 |阅读模式
我装的gentoo和win2000双系统, 用lilo引导, 发现有时在退出win2000重启时, 会出现lilo引导失败, 提示LIL, 本以为是lilo损坏呢. 很是奇怪, 后来按reset键重启又好了. 不知道什么原因.

还是, 想换成grub,总是提示要指定initrd, 可是安装手册上并没有说明啊. 是不是要自己mkinitrd一个?
 楼主| 发表于 2004-11-18 10:36:15 | 显示全部楼层
编辑了一下, 再顶起来, 还请大家赐教.
发表于 2004-11-18 10:48:29 | 显示全部楼层

回复: grub和lilo的疑问

最初由 无花果 发表
还是, 想换成grub,总是提示要指定initrd, 可是安装手册上并没有说明啊. 是不是要自己mkinitrd一个?

你是自己编的kernel还是用genkernel的?
 楼主| 发表于 2004-11-18 11:02:53 | 显示全部楼层
自己编译的.
发表于 2004-11-18 11:06:44 | 显示全部楼层
自己编的可以不用initrd的。
请贴出grub.conf和fstab看看。
 楼主| 发表于 2004-11-18 11:40:48 | 显示全部楼层
win2000在hd0,0上, gentoo在dh0,5上

grub.conf:


  1. #
  2. # Sample boot menu configuration file
  3. #

  4. # Boot automatically after 30 secs.
  5. timeout 30

  6. # By default, boot the first entry.
  7. default 0

  8. # Fallback to the second entry.
  9. fallback 1

  10. # For booting Gentoo Linux
  11. title  Gentoo Linux
  12. root (hd0,5)
  13. kernel /boot/kernel-2.4.25-gentoo root=/dev/hda5
  14. #initrd /initrd.img

  15. # For booting Windows 2000
  16. title Windows 2000
  17. rootnoverify (hd0,0)
  18. makeactive
  19. chainloader  +1

  20. # Change the colors.
  21. title Change the colors
  22. color light-green/brown blink-red/blue

复制代码
 楼主| 发表于 2004-11-18 17:54:49 | 显示全部楼层
/etc/fstab:


  1. # /etc/fstab: static file system information.
  2. # $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.14 2003/10/13 20:03:38 azarah Exp $
  3. #
  4. # noatime turns off atimes for increased performance (atimes normally aren't
  5. # needed; notail increases performance of ReiserFS (at the expense of storage
  6. # efficiency).  It's safe to drop the noatime options if you want and to
  7. # switch between notail and tail freely.

  8. # <fs>                  <mountpoint>    <type>          <opts>                      <dump/pass>

  9. # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
  10. #/dev/BOOT                /boot                ext2                noauto,noatime                1 1
  11. #/dev/ROOT                /                xfs                noatime                        0 0
  12. #/dev/SWAP                none                swap                sw                        0 0
  13. #/dev/cdroms/cdrom0        /mnt/cdrom        iso9660        noauto,ro                0 0
  14. #/dev/fd0                /mnt/floppy        auto                noauto                        0 0

  15. /dev/hda6                /                ext3                noatime                        0 0
  16. /dev/hda7                none                swap                sw                        0 0
  17. /dev/cdroms/cdrom0        /mnt/cdrom                auto                noauto,user                0 0
  18. /dev/cdroms/cdrom1        /mnt/cdrom1        auto                noauto,user                0 0

  19. # NOTE: The next line is critical for boot!
  20. none                        /proc                proc                defaults                0 0

  21. # glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
  22. # POSIX shared memory (shm_open, shm_unlink).
  23. # (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
  24. #  use almost no memory if not populated with files)
  25. # Adding the following line to /etc/fstab should take care of this:

  26. none                        /dev/shm        tmpfs                defaults                0 0

  27. # none                        /proc/bus/usb        usbfs                defaults                0 0
复制代码
 楼主| 发表于 2004-11-18 17:57:26 | 显示全部楼层
lilo.conf  , lilo使用没问题.


  1. boot=/dev/hda             # Install LILO in the MBR
  2. prompt                    # Give the user the chance to select another section
  3. timeout=30                # Wait 5 (five) seconds before booting the default section
  4. default=win2000            # When the timeout has passed, boot the "gentoo" section
  5. # Only if you use framebuffer. Otherwise remove the following line:
  6. vga=788                   # Framebuffer setting. Adjust to your own will

  7. image=/boot/kernel-2.4.25-gentoo
  8.   label=gentoo            # Name we give to this section
  9.   read-only               # Start with a read-only root. Do not alter!
  10.   root=/dev/hda6          # Location of the root filesystem

  11. other=/dev/hda1
  12.   label=win2000

复制代码
发表于 2004-11-18 19:53:47 | 显示全部楼层
你的grub应该是
kernel /boot/kernel-2.4.25-gentoo root=/dev/hda6
 楼主| 发表于 2004-11-18 21:23:05 | 显示全部楼层


晕死了,,,, 犯这种低级错误, 现在好了.

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

本版积分规则

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