Linux GRUB 方式切换启动级别(runlevel)
事因修改了某个配置文件,导致系统启动某个服务的时候hold住了,系统启动不起来。这种情况下常常通过修改表启动级别,切换到非xwindow模式下重新启动,一般选取启动级别runlevel为3即可。
参考环境:Redhat Enterprise Linux AS 4
步骤:
1.当Linux启动时,按 e 进去参数选择编辑界面:
2.移动光标选中系统(Red Hat Enterprise Linux AS (2.6.9-55.ELsmp)),按 e:
3.移动光标选中(kernel /vmlinuxz-2.6.9-55.ELsmp ro root=LABEL=/ rhgb quiet):
4.修改rhgb为3,然后按enter键:
5.选中(kernel /vmlinuxz-2.6.9-55.ELsmp ro root=LABEL=/ 3 quiet),按 b, 系统则进去启动程序。
注,当系统reboot时,会自动切换到xwindows启动方式的runlevel(5);
另,如果能进去系统, 或者能启动sshd服务,则通过修改/etc/inittab 文件更改runlevel。
遗憾的是暂时无法上传图片,各个步骤的截图只能搁下了~~
参考:
Runlevel System State
0 Halt the system
1 Single user mode
2 Basic multi user mode
3 Multi user mode
5 Multi user mode with GUI
6 Reboot the system
S, s Single user mode
相关文档:
Linux C + + Training
Syllabus
________________________________________
1, Linux Operating System
System Environment: Ubuntu GNU / Linux, RedHat Linux AS5,
FreeBSD
Course Requirements: proficient use of commonly used Linux
/ UNIX commands.
Time: 1 week.
______________________________ ......
SUSE Linux 维护笔记 一
1. Linux时间更新设置
时区设定:
#主要文件
/etc/sysconfig/clock
#用北京时间的正确内容应该是
TIMEZONE="Asia/Beijing"
DEFAULT_TIMEZONE="Asia/Beijing"
#同时确保 /etc/localtime文件是/usr/share/zoneinfo/Asia/Beijing的拷贝
保持更新:
在/etc/crontab中加入一 ......
平滑迁移的技巧和技术
文档选项
<tr
valign="top"><td width="8"><img alt="" height="1" width="8"
src="//www.ibm.com/i/c.gif"/></td><td width="16"><img alt="" width="16"
heig ......
关于epoll使用方法:
参照: http://linux.die.net/man/4/epoll
实例代码:(来自网上某论坛)
#include <pthread.h>
#include <stdio.h>
#include <sys/timeb.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/epoll.h> ......