I'd find out why it crashed first, might be as simple as fsck or repairing the boot block from one of the backup blocks. ufsrestore opens up a whole nother can of worms that by your question you are not going to like...
Read up on fsck for repaing boot blocks.
fsck [-F ufs] -o b=32 /dev/rdsk/yourrootdrive
I'd say using "dd" would be a better option. Back in the day, when there were no flash archives, etc -- a lot of disk duplication would occur via dd. Normally it would be disk-to-disk. But I don't see why you cannot use a file instead of a disk to dump your output (of=myarchive.dd)
[[The limitations of dd would apply of course...]]
Of course you'd have to make sure the disk onto which you would restore your "dd" image had the same geometry as the failed drive.
If you were merely interested in something like Disaster recovery, investigate Flash Archives to restore your OS (I think with Solaris 10, you can restore LVM'ed images via flash as well).
Thanks everyone for the replies. This is a hypothetical question. I'm trying to explore the ufsdump option. Please help me out if you have time :-) Appreciate it.
I'm trying to do a ufsdump say the root partition over a network. This is what I have done so far:
--> on the machine where I'm getting the data from
share slice --> vi /etc/dfs/dfstab
share -F nfs -d "root" /
/etc/init.d/nfs.server start
then
--> on the machine I'm trying to dump to
mount /dev/dsk/c0t1d0s3 /restore
mount 192.168.0.72:/ /root
So far so good.
--> Now i try to dump root to /restore:
ufsdump 0f - /root | (cd /restore; ufsrestore xf -)
and i get the following:
DUMP: `/root' is not on a locally mounted filesystem
DUMP: The ENTIRE dump is aborted.
Any ideas what I can do?
Thanks
Guess what a google search of "ufsdump across network"
got me?
http://www.sunmanagers.org/archives/1997/1265.html
http://supportforum.sun.com/network/index.php?t=msg&th=916&start=0& rid=0
http://unix.derkeiler.com/Mailing-Lists/SunManagers/2005-05/0340.html
HTH