免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1183 | 回复: 2
打印 上一主题 下一主题

inittab文件被vi编辑坏了!想恢复!(谢谢) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-12-01 15:25 |只看该作者 |倒序浏览
偶想改一下inittab文件.由于对vi不熟悉!文件被损坏!如何修复!
ps:现在可以进入系统!不过有错误提示!
求inittab的原文件!是否可替换?
请指教!谢谢!

论坛徽章:
0
2 [报告]
发表于 2004-12-01 15:46 |只看该作者

inittab文件被vi编辑坏了!想恢复!(谢谢)

应该可以的,这是我RH9.0的/etc/inittab,可以比较一下:
#
# inittab       This file describes how the INIT process should set up
#               the system in a certain run-level.
#
# Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>;
#               Modified for RHS Linux by Marc Ewing and Donnie Barnes
#
                                                                                                                          
# Default runlevel. The runlevels used by RHS are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:
                                                                                                                          
# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit
                                                                                                                          
l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
                                                                                                                          
# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
                                                                                                                          
# When our UPS tells us power has failed, assume we have a few minutes
# of power left.  Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly.
pf::powerfail:/sbin/shutdown -f -h +2 "ower Failure; System Shutting Down"

# If power was restored before the shutdown kicked in, cancel it.
pr:12345:powerokwait:/sbin/shutdown -c "ower Restored; Shutdown Cancelled"
                                                                                                                          
                                                                                                                          
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
                                                                                                                          
# Run xdm in runlevel 5
x:5:respawn:/etc/X11/prefdm -nodaemon

论坛徽章:
0
3 [报告]
发表于 2004-12-01 16:07 |只看该作者

inittab文件被vi编辑坏了!想恢复!(谢谢)

偶试试!感谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP