分类: SOLARIS
2013-06-14 14:49:09
solaris下,如果metadb信息被破坏,系统将无法boot;此时在无需外界启动盘的情况下,可以通过某些命令骗过系统对mirror的检查,让系统从裸盘启动;然后重建meta信息;
{1} ok
{1} ok boot disk0 -a #进入诊断模式;
Boot device: /pci@1f,700000/scsi@2/disk@0,0 File and args: -a
Enter filename [kernel/sparcv9/unix]:直接回车
Enter default directory for modules [/platform/SUNW,Netra-440/kernel /platform/sun4u/kernel /kernel /usr/kernel]: 直接回车
Name of system
file [etc/system]: etc/ftpd/ftpusers 输入这个命令,可以骗过系统,如果还用etc/system,系统还会从mirror启动。但是由于mirror信息已经损坏,所以系统起不来;ftpsuers中的信息都会因为格式错误而被系统忽略。然后系统默认从裸盘启动;
WARNING: unknown command 'daemon' on line 1 of etc/ftpd/ftpusers
WARNING: unknown command 'bin' on line 2 of etc/ftpd/ftpusers
WARNING: unknown command 'sys' on line 3 of etc/ftpd/ftpusers
WARNING: unknown command 'adm' on line 4 of etc/ftpd/ftpusers
WARNING: unknown command 'lp' on line 5 of etc/ftpd/ftpusers
WARNING: unknown command 'uucp' on line 6 of etc/ftpd/ftpusers
WARNING: unknown command 'nuucp' on line 7 of etc/ftpd/ftpusers
WARNING: unknown command 'listen' on line 8 of etc/ftpd/ftpusers
WARNING: unknown command 'nobody' on line 9 of etc/ftpd/ftpusers
WARNING: unknown command 'noaccess' on line 10 of etc/ftpd/ftpusers
WARNING: unknown command 'nobody4' on line 11 of etc/ftpd/ftpusers
WARNING: unknown command 'smmsp' on line 12 of etc/ftpd/ftpusers
SunOS Release 5.9 Version Generic_122300-21 64-bit
Copyright 1983-2003 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
root filesystem type [ufs]: 直接过车
Enter physical name of root device
[/pci@1f,700000/scsi@2/disk@0,0:a]: ju
Hardware watchdog enabled
SC unretrieved msg APR 20 05:43:35 2009 UTC [CRITICAL ALARM is set]
configuring IPv4 interfaces: ce0 ce3 ce4 ce5.
System will come
into single user mode.
#将更分区mount为可读格式;
#mount –o rw,remount
/dev/dsk/c1t0d0s0 /
#mount var
# mount /dev/dsk/c1t0d0s4 /var
#此处可以运行修复性的命令;
好了,系统修复完毕;