自己也遇到这个问题,从网上找到了这个问题的一个方法,让自己留住,也同大家分享
(我的问题是突然断电引起的,『或者是强行关机』)
Solaris的boot-archive问题
今天碰到一个奇怪事情,莫名其妙启动的时候显示:
SunOS Release 5.10 Version Generic_120012-14 64-bit
Copyright 1983-2007 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Warning - The following files in / differ from the boot archive:
The recommended action ist to reboot and select "Solaris failsafe"
option from the boot menu. Then follow prompts to update the
boot archive.
To continue booting at your own risk, clear the service:
# svcadm clear system/boot-archive
Dec 25 10:00:05 svc.start[7]: svc:/system/boot-archive:default: Method "/lib/
svc/method/boot-archive" failed with exit status 95.
[ system/boot-archive:default failed fatally (see ?svcs -x? for details) ]
Requesting System Maintenance Mode
(see /lib/svc/share/README for more information.)
Console login service(s) cannot run
Root password for system maintenance (control-d to bypass):
然后回忆了一下之前的操作,一个是对/etc/system的修改,一个是在/dev下面添加了null的link,但是在重启之前,系统已经自动更新了boot-archive,因此应该不会有这个错误提示。
先按照普通过程试试,一般针对此错误有两个方法:
一是去FailSafe模式,此模式下root分区被mount在/a,因此使用bootadm update-archive -R /a可以重建boot-archive,重启后即可;
二是在上面提示的位置输入管理员密码,然后:svcadm clear system/boot-archive
这样系统将忽略上面的错误,按正常启动,启动后root分区将mount为rw。
然后:bootadm update-archive
这样,重启后也可以解决此问题。
但是多次使用上面的方法,却一直无法解决,每次重启仍然会有错误提示,而且仔细看可以发现在提示中“Warning - The following files in / differ from the boot archive:”后面是空白的,根本不知道是哪个文件与boot archive中不同。
因此,考虑之前的两个操作,对/etc/system的修改应该没有问题,难道是/dev/null的问题?可这该如何解决呢?试探性的让系统自己重新扫描一下devices,所以在/下:touch reconfigure,然后启动,启动后会报错,然后敲root密码进入Maintenance模式,而后svcadm clear...进入正常模式,这时,可以发现系统开始Reconfigure devices...,结束后进入#,这时再bootadm update-archive一下,而后重启,发现问题解决。
折腾了半天,居然是因为/dev的cache没有更新。