免费注册 查看新帖 |

Chinaunix

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

ufsdump 后系统不能够从备份盘启动 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-05-09 12:33 |只看该作者 |倒序浏览
sun F280 2*73g fc硬盘,原来从disk1启动,现在0盘有故障需要更换,用ufsdump从disk0 ufsrestore到disk0,执行了installboot 修改了vfstab但是却不能从disk0启动

[ 本帖最后由 jollyfu 于 2006-5-9 12:37 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2006-05-09 12:39 |只看该作者
0} ok boot disk0
Boot device: /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@0,0  File and args:
The file just loaded does not appear to be executable.
{0} ok

论坛徽章:
0
3 [报告]
发表于 2006-05-09 13:51 |只看该作者
建议你看一下SUN的系统手册,里面有更换光纤盘的具体说明...挺麻烦的...我记性不大好.想不起来了...

论坛徽章:
0
4 [报告]
发表于 2006-05-09 13:58 |只看该作者
http://bbs.chinaunix.net/viewthr ... &extra=page%3D2
用这个脚本,肯定没问题
#!/bin/sh
# Original Script written by Constantin Ionescu
# Modified by Carlo Cosolo
# Modified by Peter Baer Galvin
# Modified by John West
# Use and distribute freely

# Define variables for use in the script
# ! Important, these must be set correctly !

# The root disk to duplicate (leave off slice numbers and path)
SRC=c0t0d0

# The empty disk to duplicate it to (leave off slice numbers and path)
DEST=c0t1d0

# The directory to mount destination partitions on while duplicating
MOUNTDIR=/dup_0

# The file name of this script, to rename it on the destination to avoid execution
SCRIPT=/opt/local/etc/rootcopy

# The slices that should be copied
SLICES="s0 s3 s4 s6 s7"

echo ====================================
echo Disk Copy script started `date`
echo

# Make sure the mount point for duplicate partitions exists
if [ ! -d $MOUNTDIR ]; then
  mkdir $MOUNTDIR
  chmod 700 $MOUNTDIR
fi

# Partition the duplicate disk, make filesystems, make it bootable
prtvtoc /dev/rdsk/${SRC}s2 > /tmp/vtoc
fmthard -s /tmp/vtoc /dev/rdsk/${DEST}s2
installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/${DEST}s0

# Modify the following loop to handle any special cases
for fs in $SLICES
do
  newfs /dev/dsk/${DEST}${fs} < /dev/null; mount /dev/dsk/${DEST}${fs} ${MOUNTDIR};
  ufsdump 0f - /dev/dsk/${SRC}${fs}|(cd ${MOUNTDIR}; ufsrestore rf -);
  if [ $fs = "s0" ]; then
    sed 's/${SRC}/${DEST}/g' /etc/vfstab > ${MOUNTDIR}/etc/vfstab;
    mv ${MOUNTDIR}/${SCRIPT} ${MOUNTDIR}/${SCRIPT}.DONTRUN;
  fi
  umount ${MOUNTDIR}
done

echo
echo Disk Copy script ended `date`
echo ====================================
echo

论坛徽章:
2
双鱼座
日期:2014-02-23 12:10:03操作系统版块每日发帖之星
日期:2015-12-17 06:20:00
5 [报告]
发表于 2006-05-09 14:42 |只看该作者
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP