一、centos6启动管理

 

1.1、运行级别意义

linux启动管理

 

1.2、查看运行级别

[[email protected] log]# runlevel

3 5     //表示目前是5,之前是3,如果是N表示直接开机进入5

 

1.3、设置默认开机运行级别

[[email protected] log]# vim /etc/inittab

 

 

二、启动引导程序grub

grub是开机后的系统引导程序,提供开机时选择进入具体哪个系统的菜单

 

2.1、grub配置文件

[[email protected]  /]# vi  /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/sda2

#          initrd /initrd-[generic-]version.img

#boot=/dev/sda

default=0               //默认启动第一个title

timeout=5             //等待五秒

splashimage=(hd0,0)/grub/splash.xpm.gz                     //背景图像文件

hiddenmenu                    //隐藏启动选择界面类似win必须按f12才能选择启动项

title CentOS 6 (2.6.32-642.el6.x86_64)

        root (hd0,0)

        kernel /vmlinuz-2.6.32-642.el6.x86_64                 //加载内核

     ro root=UUID=d918b26f-fa87-4403-91c3-b27ae7c36640 rd_NO_LUKS

KEYBOARDTYPE=pc  KEYTABLE=us rd_NO_MD crashkernel=auto LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM rhgb quiet

        initrd /initramfs-2.6.32-642.el6.x86_64.img                   //加载模拟内核

 

 

2.2、grub加密

 

2.2.1、linux启动时按 e 进入grub编辑模式,不安全

linux启动管理

 

2.2.2、如需给编辑模式设置密码

[[email protected] ~]# grub-md5-crypt

Password: 123456

Retype password: 123456

$1$JnGVz/$bYexR/Ba/zYzg8IxDBhzX0.

[[email protected] ~]# vi /boot/grub/grub.conf

default=0

timeout=5

password --md5 $1$JnGVz/$bYexR/Ba/zYzg8IxDBhzX0

 

2.2.3、linux再次启动时必须先按p,输入密码才能进入e编辑模式

linux启动管理

 

 

相关文章:

  • 2021-09-27
  • 2021-08-08
  • 2021-12-20
  • 2021-06-23
  • 2021-06-07
  • 2021-09-23
  • 2022-12-23
猜你喜欢
  • 2022-01-17
  • 2022-12-23
  • 2021-07-11
  • 2021-06-01
  • 2022-12-23
  • 2021-09-18
相关资源
相似解决方案