« OpenSSL 升级中的一些问题 | 首 页 | 懒,超级懒 »

2005 年 06 月 09 日

Boot Linux: 关于启动 Linux 的各种配置纪录

| 分类: 服务器技术 Server Tech. |

  • 测试环境:
    以下设置都是基于 Red Hat Linux 9.0 或 Redhat Enterprise Linux 等版本。
  • /boot 分区的有无和 /etc/grub.conf 的不同内容

    如果你创建了单独的 /boot 分区,到内核与 initrd 映像的路径是相对于 /boot 分区而言的。 ————《Red Hat Linux 9: Red Hat Linux 定制指南 30. 升级内核》

    1) 有 /boot 分区时的 /etc/grub.conf 文件

    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You have a /boot partition. This means that
    # all kernel and initrd paths are relative to /boot/, eg.
    # root (hd0,0)
    # kernel /vmlinuz-version ro root=/dev/hda3
    # initrd /initrd-version.img
    #boot=/dev/hda
    default=0
    timeout=10
    splashimage=(hd0,0)/grub/splash.xpm.gz
    title Red Hat Enterprise Linux ES (2.4.9-e.12)
    root (hd0,0)
    kernel /vmlinuz-2.4.9-e.12 ro root=/dev/hda3
    initrd /initrd-2.4.9-e.12.img

    2) 没有 /boot 分区时的 /etc/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,0)
    # kernel /boot/vmlinuz-version ro root=/dev/sda1
    # initrd /boot/initrd-version.img
    #boot=/dev/sda
    default=0
    timeout=10
    splashimage=(hd0,0)/boot/grub/splash.xpm.gz
    title The Linux Kernel (2.6.10)
    root (hd0,0)
    kernel /boot/bzImage-2.6.10 ro root=LABEL=/
    initrd /boot/initrd-2.6.10.img
  • 要创建引导盘
    要创建引导盘,在 shell 提示下登录为根用户,然后键入以下命令:
    /sbin/mkbootdisk `uname -r`
  • (END)

    引用

    引用本文的 URL:
    http://weblog.kreny.com/cgi-bin/mt/mt-tb.cgi/232.

    发表评论

    (如果您还为在此成功留言,也许是因为需要管理员逐一审核留言内容后放可看到您的评论。请稍后并感谢您的耐心等待。)

    阅览更多文章请访问 首页过去的存档