Bo's Oracle Station

查看: 1694|回复: 0

课程第13次

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2019-8-6 20:27:32 | 显示全部楼层 |阅读模式
按照启动时,所执行功能的多少顺序来排序:
rd.break<systemd.unit=emergency.target<systemd.unit=rescue.target

rd.break是在内存根文件系统中,
emergency.target已经在硬盘根文件系统中了(xfs/ext4/ext3......),但是刚刚切换进去,硬盘根文件系统还是只读的,
rescue.target是emergency.target加上:

  1. mount  -o remount,rw /
复制代码
只要是硬盘根就要密码,所以要初始化root的密码,必须进入rd.break。

--------------------------
1. rd.break
2. chroot /sysroot
3. mount -o remount,rw /
4. passwd
5. touch /.autorelabel
6. exit
7. reboot
--------------------------------------如果selinux策略出问题:/etc/selinux/config  permisive

---------------------------------------RHEL7里的/sbin/init:
  1. [root@server3 grub2]# vim grub.cfg
  2. [root@server3 grub2]# ls -l /sbin/init
  3. lrwxrwxrwx. 1 root root 22 Jun 29 05:06 /sbin/init -> ../lib/systemd/systemd
  4. [root@server3 grub2]#
复制代码
4 a. A ke rnel and i n itra mfs are loaded from disk.
9 b. All units for the default targ et are started.
3 c. The boot loader presents the user with a menu.
5 d. The ke rnel initial izes and lau nches /sbin/init from the initra mfs.
1 e. The system firmware loads the boot loader.
7 f. The system root file system is mou nted read-on ly on /sys root.
6 g. Basic hardwa re initial ization takes place.
8 h. The root fi le system is switched, and control is passed ove r to a new systemd insta nce.
2 i. The boot loader loads its configuration from disk.
----------------------------------------------------------------------------用以下命令破坏bios+mbr的引导头:
  1. [root@desktop3 ~]# dd if=/dev/zero of=/dev/sda bs=446 count=1
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-12-4 16:20 , Processed in 0.042675 second(s), 24 queries .

快速回复 返回顶部 返回列表