SCO UNIX 环境下不同容量硬盘的对拷
点击次数:26 次 发布日期:2008-11-29 16:28:18 作者:源代码网
|
源代码网推荐
在不同容量硬盘之间拷贝安装UNIX的方法:
源代码网整理以下 在开始硬盘对拷之前,首先应将已安装好系统的源盘和空白目标盘分别设置跳线,安装在计算机上。开机,进入CMOS设置两块硬盘的参数,然后进入源盘的超级用户root,就可以开始拷贝了。
以下是在digitalP200微机上,SCOOpenServerRelease5环境下进行硬盘对拷的过程。
1.增加一块硬盘
#mkdevhd10
YourrootharddiskisattachedtoanIDEcontroller.
Pickoneofthechoicesbeloworyoumayquitand
Invokemkdevhd-uforadetailusagemessage.
1)AddaharddisktoIDEcontroller
2)AddaharddisktoSCSIcontroller
3)AddaharddisktoanIDAcontroller(EISA)
Enter1,2,3,orenter"q"toquit:(输入1)
……
Ifyouwishtoexittheentireinstallationatthismenu,
Pressthe<DEL>key.
HardDiskDrive1Configuration
1.Displaycurrentdiskparameters
2.Modifycurrentdiskparameters
3.Selectdefaultdiskparameters
Enteranoptionor"q"toquit:
(这是dkinit程序的菜单。在此可以选1显示目标硬盘参数,如不符要求,可选2进行修改,然后输入q继续)
……
1.DisplayPartitionTable
2.UseEntireDiskforUNIX
3.UseRestofDiskforUNIX
4.CreateUNIXPartition
5.ActivatePartition
6.DeletePartition
7.CreatePartition
Enteryourchoiceor"q"toquit:
(这是fdisk程序的菜单。在此可以对目标硬盘按需要进行分区,然后输入q继续)
……
1.PrintCurrentBadTrackTable
2.ScanDisk(YoumaychooseRead-OnlyorDestructivelater)
3.AddEntriestoCurrentBadTrackTablebyCylinder/HeadNumber
4.AddEntriestoCurrentBadTrackTablebySectorNumber
5.DeleteEntriesIndividuallyfromCurrentBadTrackTable
6.DeleteAllEntriesfromBadTrackTablePleaseenteryourchoiceor"q"t廯t:
(这是badtrk程序的菜单,选择2可以扫描查找硬盘上有问题的磁道,并对应到硬盘别处的正常磁道上,另外还建立一个坏道表。输入q继续)
Enterthenumberofbadtrackstoallocatespacefor
(orpress<return>tousetherecommendedvalueof15):
(回车)
Thereare2110657blocksintheUNIXarea.
Pleaseenterthenumberoffilesystemsyouwantthisarea
Tobedividedinto,orpress<Return>togetthedefaultof2filesystem(s).
(回车)
Thelayoutofthefilesystemsandswapareaisnowprepared.
Doyouwishtomakeanymanualadjustmentstothesizesor
namesofthefilesystemsorswapareabeforetheyarecreated
ontheharddisk?(y/n)
(输入n)
Makingfilesystems
Harddiskinitializationprocedurecompleted.
2.用dd命令将SCOUNIX硬盘自举程序从源盘拷入目标盘
#ddif=/dev/hd0aof=/dev/hdlabs=1024count=40
3.用divvy命令在目标盘上建立可安装的文件系统
#divvy-im/dev/rhdla
Thereare2095537lkblocksintheUNIXarea.
Between16000and512000lkblocksshouldbereservedfortheswaparea.
Pleaseentertheswap-spaceallocation,orpress<Return>
Togetthedefaultallocationof24000lkblocks:
(回车)
Thereare2095537lkblocksintheUNIXarea.
Between15000and64000lkblocksshouldbereservedforthebootfilesystem.
Pleaseentertheboot-spaceallocation,orpress<Return>
Togetthedefaultallocationof20000lkblocks:
(回车)
Doyouwantaseparate/ufilesystem?(y/n)
(输入n)
Thelayoutofthefilesystemsandswapareaisnowprepared.
Doyouwishtomakeanymanualadjustmentstothesizesor
namesofthefilesystemsorswapareabeforetheyarecreated
ontheharddisk?(y/n)
(输入n)
Makingfilesystems
4.用divvy命令查看并修改内分区(division)名
#divvy/dev/rhdla
NameTypeNewFS#FirstBlock
LastBlockdll50 EAFS no 0
019999
d1151NONFs no 1 20000
43999
HTFS no 2 44000
2045725
NotUSED no 3 -
-
NotUSED no 4 -
-
NotUSED no 5 -
-
recoverNONFS no 6 2045726
2045735
hdlaWHOLE DISK no 7 0
2061831
2045736lkblocksfordivisions,16096lkblocksreservedforthesystem.
n[ame]Nameorrenameadivision.
c[reate]Createanewfilesystemonthisdivision.
t[ype]Selectorchangefilesystemtypeonnewfilesystems.
p[revent]Preventanewfilesystemfrombeingcreatedon
this.
s[tart]Startadivisiononadifferentblock.
e[nd]Endadivisiononadifferentblock.
r[estore]Restoretheoriginaldivisiontable.
Pleaseenteryourchoiceor"q"toquit:
(输入n修改内分区名。在此分别将0,1,2内分区名修改为rb,rs,rr)
i[nstall]Installthedivisionset-upshown.
r[eturn]Returntothepreviousmenu.
e[xit]Exitwithoutinstallingadivisiontable.
Pleaseenteryourchoice:
(输入i将内分区情况安装在目标盘上)
Makingfilesystems.
5.将目标盘引导文件系统安装到源盘上,并拷贝其内容
#mount/dev/rb/mnt
#cd/stand
#find.-print|cpio-pdumv/mnt
#umount/mnt
6.将目标盘根文件系统安装到源盘上,并拷贝其内容
#mount/dev/rr/mnt
#find/-mountprint|cpio-pdumv/mnt
7.建立目标盘根文件系统中的文件系统安装点
#cd/mnt
#mkdirmntstand;chmod755mntstand;chgrpbinmntstand
#umount/mnt
至此,拷贝完毕。
源代码网供稿. |