Chinaunix首页 | 论坛 | 博客
  • 博客访问: 384343
  • 博文数量: 104
  • 博客积分: 652
  • 博客等级: 上士
  • 技术积分: 1477
  • 用 户 组: 普通用户
  • 注册时间: 2012-07-04 15:20
文章分类

全部博文(104)

文章存档

2019年(1)

2015年(8)

2014年(6)

2013年(59)

2012年(30)

分类: LINUX

2013-02-11 22:35:41

vim /boot/grub/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/sda5
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu

password redhat ---- 此为进入grub编辑菜单所要输入的密码
title CentOS (2.6.18-238.el5PAE)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-238.el5PAE ro root=LABEL=/
        initrd /initrd-2.6.18-238.el5PAE.img

        password --md5 $1$QmPy11$tqMQJBpVBvh/F8KZ1Y32./ ---- 进入某个内核或者某个操作系统所要输入的密码


生成md5加密密码:

[root@localhost ~]# grub-md5-crypt 
Password: 
Retype password: 
$1$QmPy11$tqMQJBpVBvh/F8KZ1Y32./



/boot/grub/grub.conf文件丢失处理办法:

启动进入grub后

grub> root (hd0,0) ---- 指定内核所在分区

grub> kernerl /vmlinuz-2.6.18-164.img 指定内核文件,可用tab键补全

grub> initrd /initrd-2.6.18-164.img 指定initrd文件

grub> boot 启动grub

阅读(714) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~