linux启动管理

 

一、centos6启动管理

 

1.1、运行级别意义

 

1.2、查看运行级别

[root@localhost log]# runlevel

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

 

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

[root@localhost log]# vim /etc/inittab

 

 

二、启动引导程序grub

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

 

2.1、grub配置文件

[root@localhost  /]# 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编辑模式,不安全

 

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

[root@localhost ~]# grub-md5-crypt

Password: 123456

Retype password: 123456

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

[root@localhost ~]# vi /boot/grub/grub.conf

default=0

timeout=5

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

 

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

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

情绪零碎碎

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值