1.
rm -fr /boot/*
v1:网络引导rescue
v2:chroot /mnt/sysimage/
v3:grub2-install /dev/vda
v4:添加vmli文件
v5:添加init文件
2.
systemctl set-default poweroff.target
v1:按e进入 ro。。。。。改为 rw rd.break
v2:chroot /sysroot
v3:rm -fr default.target
v4:ln -s /usr/lib/systemd/system/graphical.target /etc/systemd/system/default.target
v5:exit
3.
缺少vmli和init文件
v1:进入网络引导
v2:复制vml文件到/boot/
v3:mkinit 将init文件重做在/boot/
v4:boor
4.
引导出现问题
grub2-install /dev/vda1
5.
缺少cfg文件
grub2-mkconfig 》 /boot/grub2/grub.cfg
6.
chroot /mnt/sysimage进不去
cp /bin/bash /mnt/sysimage/bin/bash
#####################访问网络文件共享####################
1.
yum install samba-client
smbclient -L //172.25.254.x
smbclient //172.25.254.x/xxxxx
mount //172.25.254.x/xxxxx /mnt/ -o username=guest
2.NFS
是由linux、UNIX及其他类似操作系统使用的互联网标准协议,可作为它们的本地网络文件系统。它三一种活动扩展之下的开放标准,可支持本地linux权限和文件系统功能
有两种方法来确定由服务器提供的NFS导出,或叫做文件共享。
yum install nfs-utils -y
[root@localhost ~]# showmount -e 172.25.254.250
Export list for 172.25.254.250:
/nfsshare/nfs5 *
/nfsshare/nfs4 *
/nfsshare/nfs3 *
/nfsshare/nfs2 *
/nfsshare/nfs1 *
/content 172.25.0.0/255.255.0.0
mount 172.25.254.250:/nfsshare/nfs1 /mnt/
[root@localhost ~]# vim /etc/fstab
[root@localhost ~]# mount -a
自动挂载:
v1:
yum install autofs
*systemctl start autofs
[root@localhost ~]# cd /net/
[root@localhost net]# cd 172.25.254.250/
[root@localhost 172.25.254.250]# cd nfsshare/nfs1
vim /etc/autofs.conf ----> 时间为默认卸载时间
systemctl restart autofs
v2:
[root@localhost westos]# vim /etc/auto.master
/mnt /etc/auto.mnt
[root@localhost ~]# vim /etc/auto.mnt
westos 172.25.254.250:/nfsshare/nfs1
systemctl restart autofs
[root@localhost westos]# touch file1
[root@localhost westos]# ls
1 file1
[root@localhost westos]# df
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/vda1 10473900 3913604 6560296 38% /
devtmpfs 922264 0 922264 0% /dev
tmpfs 942660 80 942580 1% /dev/shm
tmpfs 942660 17048 925612 2% /run
tmpfs 942660 0 942660 0% /sys/fs/cgroup
172.25.254.250:/nfsshare/nfs1 100221952 77230080 22991872 78% /mnt/westos
如此这般之后,/mnt将被占用,无法在里面创建文件,当服务关闭之后,且卸载,该目录又恢复原样。