- 论坛徽章:
- 0
|
jinru /boot
# ls ---列出所有kernel ,
# cp initrd-2.4.21-47.ELsmp.img(当前kernel名称) initrd-2.4.21-47.ELsmp.img.bak
(kernel备份文件 名称)
[email=root@utidbanvil01]root[/email]
# cd grub 进入 grub 目录
[root@utidbanvil01 grub]# ls
device.map fat_stage1_5 grub.conf jfs_stage1_5 minix_stage1_5 splash.xpm.gz stage2 xfs_stage1_5
e2fs_stage1_5 ffs_stage1_5 grub.conf.bak menu.lst reiserfs_stage1_5 stage1 vstafs_stage1_5
[root@ grub]# ls -l
total 212
-rw-r--r-- 1 root root 89 Apr 18 2007 device.map
-rw-r--r-- 1 root root 7840 Apr 18 2007 e2fs_stage1_5
-rw-r--r-- 1 root root 7536 Apr 18 2007 fat_stage1_5
-rw-r--r-- 1 root root 6880 Apr 18 2007 ffs_stage1_5
-rw------- 1 root root 1354 Aug 8 23:17 grub.conf
-rw------- 1 root root 1146 Aug 8 22:52 grub.conf.bak
-rw-r--r-- 1 root root 8448 Apr 18 2007 jfs_stage1_5
lrwxrwxrwx 1 root root 11 Apr 18 2007 menu.lst -> ./grub.conf
-rw-r--r-- 1 root root 7072 Apr 18 2007 minix_stage1_5
-rw-r--r-- 1 root root 9440 Apr 18 2007 reiserfs_stage1_5
-rw-r--r-- 1 root root 11182 Sep 11 2003 splash.xpm.gz
-rw-r--r-- 1 root root 512 Apr 18 2007 stage1
-rw-r--r-- 1 root root 104028 Apr 18 2007 stage2
-rw-r--r-- 1 root root 6528 Apr 18 2007 vstafs_stage1_5
-rw-r--r-- 1 root root 9352 Apr 18 2007 xfs_stage1_5
[root@grub]# vi 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/Volume00/LogVol00
# initrd /initrd-version.img
#boot=/dev/cciss/c0d0
default=2 缺省的启动选项 注意第一个选项是0 b不是1
timeout=30
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux AS (2.4.21-57.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-57.EL ro root=/dev/Volume00/LogVol00 hda=ide-scsi
initrd /initrd-2.4.21-57.EL.img
title Red Hat Enterprise Linux AS (2.4.21-57.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.4.21-57.ELsmp ro root=/dev/Volume00/LogVol00 hda=ide-scsi
initrd /initrd-2.4.21-57.ELsmp.img
title Red Hat Enterprise Linux AS (2.4.21-47.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.4.21-47.ELsmp ro root=/dev/Volume00/LogVol00 hda=ide-scsi
initrd /initrd-2.4.21-47.ELsmp.img
title Red Hat Enterprise Linux AS (2.4.21-47.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.4.21-47.ELsmp.bak ro root=/dev/Volume00/LogVol00 hda=ide-scsi
initrd /initrd-2.4.21-47.ELsmp.img.bak
title Red Hat Enterprise Linux AS-up (2.4.21-47.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-47.EL ro root=/dev/Volume00/LogVol00 hda=ide-scsi
initrd /initrd-2.4.21-47.EL.img
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/78721/showart_1190404.html |
|