- 论坛徽章:
- 0
|
\r\n\r\ndd后换盘,从镜像盘启动系统的一种简便方法2-1 标题:dd后换盘,从镜像盘启动系统的一种简便方法\r\n作者;小民\r\n背景:\r\n有2块光纤硬盘,分别是系统盘c1t1d1和镜像盘c2t2d2;\r\n计划用dd工具给系统盘作镜像,把镜像盘和系统盘交换槽位,从镜像盘启动系统。\r\n网上有关光纤硬盘的资料操作步骤过于繁复,很容易出错,笔者至今还未试验成功。\r\n笔者另辟蹊径,只需修改镜像盘里/dev/dsk/c1t1d1和/dev/rdsk/c1t1d1相关的链接即可,未知有什么负面影响,请达人指教。\r\n\r\n以下是笔者的具体操作步骤。\r\nLast login: Wed May 7 10:28:51 2008 from 192.168.176.136\r\nSun Microsystems Inc. SunOS 5.10 Generic January 2005\r\n$ su\r\n口令:\r\n# uname -a\r\nSunOS No12webser 5.10 Generic_127111-09 sun4u sparc SUNW,Sun-Fire-880\r\n#\r\n# format\r\nSearching for disks...done\r\n\r\nAVAILABLE DISK SELECTIONS:\r\n 0. c1t1d1 <SUN72G cyl 14087 alt 2 hd 24 sec 424>\r\n /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010373291,0\r\n 1. c2t2d2 <SUN72G cyl 14087 alt 2 hd 24 sec 424>\r\n /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0\r\nSpecify disk (enter its number): ^C\r\n#\r\n# dd if=/dev/rdsk/c1t1d1s2 of=/dev/rdsk/c2t2d2s2 bs=8192k\r\n#\r\n# mkdir /mnt/c2t2d2\r\n# mount /dev/dsk/c2t2d2s0 /mnt/c2t2d2/\r\n# ls -l /dev/dsk/c2t2*\r\nlrwxrwxrwx 1 root root 70 4月 7日 16:57 /dev/dsk/c2t2d2s0 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:a\r\nlrwxrwxrwx 1 root root 70 4月 7日 16:57 /dev/dsk/c2t2d2s1 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:b\r\nlrwxrwxrwx 1 root root 70 4月 7日 16:57 /dev/dsk/c2t2d2s2 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:c\r\nlrwxrwxrwx 1 root root 70 4月 7日 16:57 /dev/dsk/c2t2d2s3 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:d\r\nlrwxrwxrwx 1 root root 70 4月 7日 16:57 /dev/dsk/c2t2d2s4 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:e\r\nlrwxrwxrwx 1 root root 70 4月 7日 16:57 /dev/dsk/c2t2d2s5 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:f\r\nlrwxrwxrwx 1 root root 70 4月 7日 16:57 /dev/dsk/c2t2d2s6 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:g\r\nlrwxrwxrwx 1 root root 70 4月 7日 16:57 /dev/dsk/c2t2d2s7 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:h\r\n#\r\n# ls -l /mnt/c2t2d2/dev/dsk/c2t2*\r\nlrwxrwxrwx 1 root root 70 4月 7日 16:57 /mnt/c2t2d2/dev/dsk/c2t2d2s0 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:a\r\nlrwxrwxrwx 1 root root 70 4月 7日 16:57 /mnt/c2t2d2/dev/dsk/c2t2d2s1 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:b\r\nlrwxrwxrwx 1 root root 70 4月 7日 16:57 /mnt/c2t2d2/dev/dsk/c2t2d2s2 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:c\r\nlrwxrwxrwx 1 root root 70 4月 7日 16:57 /mnt/c2t2d2/dev/dsk/c2t2d2s3 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:d\r\nlrwxrwxrwx 1 root root 70 4月 7日 16:57 /mnt/c2t2d2/dev/dsk/c2t2d2s4 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:e\r\nlrwxrwxrwx 1 root root 70 4月 7日 16:57 /mnt/c2t2d2/dev/dsk/c2t2d2s5 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:f\r\nlrwxrwxrwx 1 root root 70 4月 7日 16:57 /mnt/c2t2d2/dev/dsk/c2t2d2s6 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:g\r\nlrwxrwxrwx 1 root root 70 4月 7日 16:57 /mnt/c2t2d2/dev/dsk/c2t2d2s7 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:h\r\n#\r\n | \r\n\r\n\r\ndd后换盘,从镜像盘启动系统的一种简便方法2-2 #\r\n# ls -l /dev/dsk/c1t1*\r\nlrwxrwxrwx 1 root root 70 2007 9月 7 /dev/dsk/c1t1d1s0 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010373291,0:a\r\nlrwxrwxrwx 1 root root 70 2007 9月 7 /dev/dsk/c1t1d1s1 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010373291,0:b\r\nlrwxrwxrwx 1 root root 70 2007 9月 7 /dev/dsk/c1t1d1s2 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010373291,0:c\r\nlrwxrwxrwx 1 root root 70 2007 9月 7 /dev/dsk/c1t1d1s3 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010373291,0:d\r\nlrwxrwxrwx 1 root root 70 2007 9月 7 /dev/dsk/c1t1d1s4 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010373291,0:e\r\nlrwxrwxrwx 1 root root 70 2007 9月 7 /dev/dsk/c1t1d1s5 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010373291,0:f\r\nlrwxrwxrwx 1 root root 70 2007 9月 7 /dev/dsk/c1t1d1s6 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010373291,0:g\r\nlrwxrwxrwx 1 root root 70 2007 9月 7 /dev/dsk/c1t1d1s7 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010373291,0:h\r\n#\r\n# ls -l /mnt/c2t2d2/dev/dsk/c1t1*\r\nlrwxrwxrwx 1 root root 70 2007 9月 7 /mnt/c2t2d2/dev/dsk/c1t1d1s0 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010373291,0:a\r\nlrwxrwxrwx 1 root root 70 2007 9月 7 /mnt/c2t2d2/dev/dsk/c1t1d1s1 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010373291,0:b\r\nlrwxrwxrwx 1 root root 70 2007 9月 7 /mnt/c2t2d2/dev/dsk/c1t1d1s2 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010373291,0:c\r\nlrwxrwxrwx 1 root root 70 2007 9月 7 /mnt/c2t2d2/dev/dsk/c1t1d1s3 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010373291,0:d\r\nlrwxrwxrwx 1 root root 70 2007 9月 7 /mnt/c2t2d2/dev/dsk/c1t1d1s4 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010373291,0:e\r\nlrwxrwxrwx 1 root root 70 2007 9月 7 /mnt/c2t2d2/dev/dsk/c1t1d1s5 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010373291,0:f\r\nlrwxrwxrwx 1 root root 70 2007 9月 7 /mnt/c2t2d2/dev/dsk/c1t1d1s6 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010373291,0:g\r\nlrwxrwxrwx 1 root root 70 2007 9月 7 /mnt/c2t2d2/dev/dsk/c1t1d1s7 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010373291,0:h\r\n#\r\n# rm -rf /mnt/c2t2d2/dev/dsk/c2t2*\r\n# ls -l /mnt/c2t2d2/dev/dsk/c2t2*\r\n/mnt/c2t2d2/dev/dsk/c2t2*: 无此文件或目录\r\n# rm -rf /mnt/c2t2d2/dev/dsk/c1t1*\r\n# ls -l /mnt/c2t2d2/dev/dsk/c1t1*\r\n/mnt/c2t2d2/dev/dsk/c1t1*: 无此文件或目录\r\n#\r\n# ln -s../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:a/mnt/c2t2d2/dev/dsk/c1t1d1s0\r\n# ln -s../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:b/mnt/c2t2d2/dev/dsk/c1t1d1s1\r\n# ln -s../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:c/mnt/c2t2d2/dev/dsk/c1t1d1s2\r\n# ln -s../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:d/mnt/c2t2d2/dev/dsk/c1t1d1s3\r\n# ln -s../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:e/mnt/c2t2d2/dev/dsk/c1t1d1s4\r\n# ln -s../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:f/mnt/c2t2d2/dev/dsk/c1t1d1s5\r\n# ln -s../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:g/mnt/c2t2d2/dev/dsk/c1t1d1s6\r\n# ln -s../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:h/mnt/c2t2d2/dev/dsk/c1t1d1s7\r\n#\r\n# ls -l /mnt/c2t2d2/dev/dsk/c1t1*\r\nlrwxrwxrwx 1 root root 70 5月 7日 11:06 /mnt/c2t2d2/dev/dsk/c1t1d1s0 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:a\r\nlrwxrwxrwx 1 root root 70 5月 7日 11:07 /mnt/c2t2d2/dev/dsk/c1t1d1s1 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:b\r\nlrwxrwxrwx 1 root root 70 5月 7日 11:07 /mnt/c2t2d2/dev/dsk/c1t1d1s2 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:c\r\nlrwxrwxrwx 1 root root 70 5月 7日 11:08 /mnt/c2t2d2/dev/dsk/c1t1d1s3 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:d\r\nlrwxrwxrwx 1 root root 70 5月 7日 11:08 /mnt/c2t2d2/dev/dsk/c1t1d1s4 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:e\r\nlrwxrwxrwx 1 root root 70 5月 7日 11:08 /mnt/c2t2d2/dev/dsk/c1t1d1s5 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:f\r\nlrwxrwxrwx 1 root root 70 5月 7日 11:08 /mnt/c2t2d2/dev/dsk/c1t1d1s6 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:g\r\nlrwxrwxrwx 1 root root 70 5月 7日 11:08 /mnt/c2t2d2/dev/dsk/c1t1d1s7 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:h\r\n#\r\n# rm -rf /mnt/c2t2d2/dev/rdsk/c2t2d2s?\r\n# rm -rf /mnt/c2t2d2/dev/rdsk/c1t1d1s?\r\n# ls -l /mnt/c2t2d2/dev/rdsk/c2t2d2s?\r\ndev/rdsk/c2t2d2s?: 无此文件或目录\r\n# ls -l /mnt/c2t2d2/dev/rdsk/c1t1d1s?\r\n/mnt/c2t2d2/dev/rdsk/c1t1d1s?: 无此文件或目录\r\n#\r\n# ln -s../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:a,raw/mnt/c2t2d2/dev/rdsk/c1t1d1s0\r\n# ln -s../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:b,raw/mnt/c2t2d2/dev/rdsk/c1t1d1s1\r\n# ln -s../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:c,raw/mnt/c2t2d2/dev/rdsk/c1t1d1s2\r\n# ln -s../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:d,raw/mnt/c2t2d2/dev/rdsk/c1t1d1s3\r\n# ln -s../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:e,raw/mnt/c2t2d2/dev/rdsk/c1t1d1s4\r\n# ln -s../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:f,raw/mnt/c2t2d2/dev/rdsk/c1t1d1s5\r\n# ln -s../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:g,raw/mnt/c2t2d2/dev/rdsk/c1t1d1s6\r\n# ln -s../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:h,raw/mnt/c2t2d2/dev/rdsk/c1t1d1s7\r\n#\r\n# ls -l /mnt/c2t2d2/dev/rdsk/c1t1d1s?\r\nlrwxrwxrwx 1 root root 74 5月 8日 09:15 /mnt/c2t2d2/dev/rdsk/c1t1d1s0 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:a,raw\r\nlrwxrwxrwx 1 root root 74 5月 8日 09:15 /mnt/c2t2d2/dev/rdsk/c1t1d1s1 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:b,raw\r\nlrwxrwxrwx 1 root root 74 5月 8日 09:15 /mnt/c2t2d2/dev/rdsk/c1t1d1s2 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:c,raw\r\nlrwxrwxrwx 1 root root 74 5月 8日 09:15 /mnt/c2t2d2/dev/rdsk/c1t1d1s3 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:d,raw\r\nlrwxrwxrwx 1 root root 74 5月 8日 09:15 /mnt/c2t2d2/dev/rdsk/c1t1d1s4 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:e,raw\r\nlrwxrwxrwx 1 root root 74 5月 8日 09:15 /mnt/c2t2d2/dev/rdsk/c1t1d1s5 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:f,raw\r\nlrwxrwxrwx 1 root root 74 5月 8日 09:15 /mnt/c2t2d2/dev/rdsk/c1t1d1s6 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:g,raw\r\nlrwxrwxrwx 1 root root 74 5月 8日 09:15 /mnt/c2t2d2/dev/rdsk/c1t1d1s7 ->../../devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01036d021,0:h,raw\r\n#\r\n# umount /mnt/c2t2d2/\r\n# sync;sync;sync\r\n# init 5#\r\n# 挂起\r\n拔除c2t2d2和c1t1d1硬盘交换插槽;\r\n加电启动机器,看到登录界面。\r\n\r\n | \n\n[ 本帖最后由 amin 于 2008-5-9 10:22 编辑 ] |
|