当前位置: 首页 > Linux

linuxroot------系统故障排除

时间:2023-04-06 21:48:33 Linux

diskbootfileerrorerrorreasonddif=/dev/zeroof=/dev/vdabs=446count=1reboot虚拟机关机时需要配置修改-->apply-->troubleshooting-->rescueahathat企业linux系统-->continue-->ok-->oksh-4.2#dfsh-4.2#chroot/mnt/sysimage/bash-4.2#grub2-install/dev/vdabash-4.2#exitsh-4.2#exit进入硬盘启动退出两次,系统会自动启动。磁盘引导文件丢失错误原因rm-rf/boot/grub2/grub.cfgreboot纠正内核引导文件丢失错误原因rm-rf/boot/vmlinuz-3.10.0-123.el7.x86_64reboot纠正丢失原因内核初始化文件/initramfs-$(uname-r).img$(uname-r)退出两次进入硬盘启动rebootsystemd初始化文件链接错误错误原因:[root@localhostDesktop]#ln-snf/usr/lib/systemd/system/poweroff.target/etc/systemd/system/default.target#默认程序软链接到关机程序[root@localhostDesktop]#重启修正:按[e]上下加5ctrl+x[root@localhostDesktop]#systemctlset-defaultgraphical.target如果忘记超级用户密码,上下按[e]ctrl+xro替换为rwrd.breakswitch_root:/#chroot/sys根目录/echowestos|passwd--stdinroottouch/.autorelabelexitex