某个开机自启的服务无法启动导致系统无法启动故障解决
2017-05-11 22:22
369 查看
cd /etc/init.d/ vim testsrv 输入以下内容 #!/bin/bash #chkconfig:2345 99 00 #description:this service is used for test case $1 in start) echo 'the service is started' touch /root/testsrv ;; stop) echo 'the service is stopped' rm -f /boot/testsrv ;; status) [ -f /boot/testsrv ] && echo 'service testsrv is running...'||echo 'service testrv is stopped' ;; *) echo 'Usage start|stop|status' 注意#chkconfig:2345 99 00这里开机启动的序号不能大于99 #给执行权限 chmod +x testsrv chkconfig --add testsrv chkconfig testsrv --level 1 on 修改启动时间 reboot #!/bin/bash #chkconfig:12345 00 00 #description:this service is used for test case $1 in start) echo 'the service is started' sleep 100000 touch /root/testsrv ;; 由于启动序号设置太小,网络服务还没起来,无法连接xshell,而单用户模式也设置了开机启动,所以需要按照如下方法修复 开机按回车进入内核选则项 按a 在quite后添加 init=/bin/bash(默认为/sbin/init) 此时开机进入bash以后根目录是以只读方式挂载的,需要重新挂载 mount -o remount,rw / chkconfig --level 12345 testsrv off exit reboot
相关文章推荐
- 重装虚拟机导致虚拟系统中的Oracle监听服务无法启动解决办法
- 内存故障导致系统无法安装解决方法
- 故障解决:无法加载站点/服务的所有 ISAPI 筛选器。因此启动中止。
- 解决:SQL帐户的原因导致系统无法启动 推荐
- “mysql服务无法启动 发生系统错误1067”的解决办法
- 关于烧写开机logo之后导致无法启动系统的问题
- Windows系统中无法启动Lync Server音频测试服务的解决方法图解
- [计算机故障]笔记本无法启动,开机启动出现“Operating System Not Found”无法进系统
- VMWare workstation 9 启动虚拟系统开机速度过快以至无法按F2进入BIOS解决办法
- win7开机自动诊断修复无法进入系统重启无效的故障解决
- 删除Linux分区导致系统无法启动的解决办法
- AWE设置导致SQL Server Agent服务无法启动的解决方法
- Ubuntu Grub Rescue 解决Windows分区导致Ubuntu 12.10无法启动的问题以及设定双系统的优先引导顺序
- 解决Tomcat6解压版在64位windows系统上无法启动服务的问题
- SQL Server 2000服务无法启动,提示“系统找不到指定的文件”解决方法及sp4安装不上
- Linux文件系统破坏,导致系统无法启动解决办法
- 解决无法启动was服务的办法(找不到系统路径)
- 【操作系统】linux--系统管理-fstab错误导致无法开机的解决办法
- grub rescue 方法,解决重装windows系统导致的linux无法启动问题
- RHEL5因开机服务报错停滞无法启动系统