免费注册 查看新帖 |

Chinaunix

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

Solaris 里reboot 与 init 6有什么不同? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-05-06 16:43 |只看该作者 |倒序浏览
Solaris 里reboot 与 init 6有什么不同?

论坛徽章:
0
2 [报告]
发表于 2004-05-06 21:21 |只看该作者
From the user point of view, we may think that for solaris.

  init 6 = reboot

But it is not true.

there are two main difference between init 6 and /usr/sbin/reboot cmd:

1. /usr/sbin/reboot do not call the script in rc0 that execute the kill cmd.
2. /usr/sbin/reboot do not notified user while it is about to restart system.

I remerber that these things are explained in detail in SUN book SA238. Check it yourself and may you get more...

论坛徽章:
0
3 [报告]
发表于 2004-05-07 03:57 |只看该作者
Thanks for swift response. Would you mind let\'s go beyond SA238 a little bit?

Like you said, \'init 6\' calls any shutdown scripts (/etc/rc0.d/K*) to bring the system down sanely; \'reboot\' bypassses those. But I \'init 6\'  doesn\'t broadcast warning messages either. (that is why shutdown is recommended)

Actually  I am more interested in what happens exactly after shutting down the system. according to man, \'init 6\' stops OS then brings system to the state defined by initdefault entry in /etc/inittab; \'reboot\' simply performs a sync operation on disks then initiates a multi-user reboot.

I am wondering
1. do both commands bring the system down to firmware state (before starting up)?  I mean is it true that to the same extent both commands reset the system?

2. do both commands start the system up the same way?
I thought they are same, but recently I found when executing \'reboot\' those startup scripts in /etc/rc2.d are not performed. weird?

Thanks.

论坛徽章:
0
4 [报告]
发表于 2004-05-07 11:47 |只看该作者
You can reference SA 238 Chapter 13: System Boot Process

UNIX system is designed for continuous running, so there is a little complex to explain the boot process. In brief, as for my comprehension

最初由 lazyoracle 发布
[B]I am wondering
1. do both commands bring the system down to firmware state (before starting up)?  I mean is it true that to the same extent both commands reset the system?
[/B]


Yes

最初由 lazyoracle 发布
[B]2. do both commands start the system up the same way?
I thought they are same, but recently I found when executing 'reboot' those startup scripts in /etc/rc2.d are not performed. weird?
[/B]




[B]The reboot command performs an immediate shutdown and brings the system to run level 3 by default.[/B]

Look at this pic, you will get what you want.

sa238-18-5.jpg

32.41 KB, 下载次数: 1536

论坛徽章:
0
5 [报告]
发表于 2004-05-07 13:27 |只看该作者
[B]The reboot command performs an immediate shutdown and brings the system to run level 3 by default.[/B]

Thanks again for coming back. This is just where I don\'t get it. Since \'reboot\' brings to run level 3, /sbin/rc2 and /sbin/rc3 will be called, /etc/rc2.d/* are supposed to be performed, right? but this did not happen to my box.

论坛徽章:
0
6 [报告]
发表于 2004-05-08 23:43 |只看该作者
最初由 lazyoracle 发布
[B]
Thanks again for coming back. This is just where I don\'t get it. Since \'reboot\' brings to run level 3, /sbin/rc2 and /sbin/rc3 will be called, /etc/rc2.d/* are supposed to be performed, right? but this did not happen to my box. [/B]


Startup scripts in /etc/rc3.d is for run level 3.

When you get into run level 3, all ther services in /etc/rc2.d and /etc/rc3.d are started.

for your problem, does all the script in rc2.d don\'t start or only some? just something related some specific script...

GOOD LUCK!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP