Solaris Tips: Repairing the Boot Archive (ZT)

http://www.seedsofgenius.net/solaris/solaris-tips-repairing-the-boot-archive

注意以下是系统盘非镜像情况下的操作,如果系统盘有镜像,需要先拆除镜像再按以下操作。

The Solaris boot archive, introduced in Solaris 10 10/08 (update 6) on SPARC (it’s in the X86 version since the 1/06 release), is similar to the initrd in Linux. It is “a collection of core kernel modules and configuration files packed in either UFS or ISOFS format.”

The boot archive is managed by two services:

svc:/system/boot-archive:default
svc:/system/boot-archive-update:default

The first checks, during boot, the contents of the boot archive against the files in the root filesystem. If there are any inconsistencies, the service drops to maintenance mode, preventing a full boot. While this can often be ignored, it may be necessary to re-create the boot archive from scratch (see below).

The second service updates the boot archive during a graceful shutdown or reboot, ensuring it is consistent with the equivalent files in the root filesystem for the next boot. A sudden or non-graceful shutdown is likely to leave the boot archive out of sync, resulting in the boot-archive service dropping to maintenance mode on the next boot.

If the contents of the boot archive do not match the files on the root filesystem, the following warning is displayed:

WARNING: The following files in / differ from the boot archive:

…along with a list of culprit files. If the list is empty, there may be some other problem, but in most cases, the archive simply needs to be updated. You can try ignoring the issue with the command # svcadm  clear boot-archive and on next shutdown the archive will be updated automatically, but the best way to deal with this issue is to recreate the boot archive while booted from alternate media; either from Failsafe mode, cd/dvd media, or a network image in single user mode.

ok boot -F failsafe
ok boot cdrom -s
ok boot net -s

1) Mount the root filesystem if it is not mounted already

# mount /dev/dsk/c0t0d0s0 /a

2) Remove the old archive (important, since simply updating the archive may not be sufficient for successful boot)

# rm -f /a/platform/`uname -i`/boot_archive

3) Finally, recreate it

# /usr/sbin/bootadm -R /a update-archive

4) Reboot

# init 6

转载于:https://www.cnblogs.com/cqubityj/p/3237598.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值