linux startup management


1, centos6 start management


1.1 significance of operation level


1.2 view operation level

[root@localhost log]# runlevel

3 5     //It means 5 at present, 3 before. If it's N, it means direct power on to enter 5


1.3. Set the default startup operation level

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



2, Start the boot program grub

grub is the boot program of the system after power on. It provides the menu of which system to enter when power on.


2.1 grub configuration file

[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


default=0               //Start the first system by default

timeout=5             //Wait for five seconds.

splashimage=(hd0,0)/grub/splash.xpm.gz                     //Background image file

hiddenmenu                    //Hide startup selection screen similarwinMust pressf12To select a startup item

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

        root (hd0,0)

        kernel /vmlinuz-2.6.32-642.el6.x86_64                 //Loading kernel

     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                   //Load simulation kernel



2.2 grub encryption


2.2.1. When linux starts, press e to enter grub editing mode, which is not safe


2.2.2. To set password for editing mode

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

Password: 123456

Retype password: 123456


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



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


2.2.3. When linux starts again, you must press p and enter the password to enter e editing mode



Keywords: Linux vim Anaconda CentOS

Added by Katanius on Mon, 06 Jan 2020 19:34:06 +0200