?? 757.shtml
字號:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>SCO UNIX 環境下不同容量硬盤的對拷 - fanqiang.com</title>
<style type="text/css">
body,th,input,select,textarea,select,checkbox{font:12pt 宋體}
A:link { text-decoration:underline; color:#E6A306}
A:visited { text-decoration:underline; color:#E6A306}
A:hover { text-decoration:underline; color:#FFFF00}
body { font-family: "宋體", "serif"; font-size: 12pt}
td { font-family: "宋體", "serif"; font-size: 12pt}
p { font-size: 9pt; line-height: 150%}
</style>
</head>
<body text="#ffffff" bgcolor="#000000" background="/images/bline.gif" topmargin=5 marginheight=5 leftmargin=0 marginwidth=0 onLoad="setTailPosition()">
<center>
<table border="0" width="750" cellspacing="0" cellpadding="0">
<tr>
<td height="45"><p align="center"><img src="/images/title.gif" alt="[ 永遠的UNIX::UNIX技術資料的寶庫 ]"> </td>
</tr>
<tr>
<tr>
<td align=left height="40" valign=bottom align=left><small><a href="/">首頁</a> > 系統管理 > <a href=/system/sco/index.shtml>SCO</a> > 正文</small></td>
</tr>
<tr>
<td width="100%" height="2" colspan="5" bgcolor="#D09F0D"><img src="/images/c.gif" width=1 height=1></td>
</tr>
</table>
<table width=750 border=0 cellspacing=0 cellpadding=0>
<tr><td valign=top align=center >
<br>
<table width=90% border=0 cellspacing=0 cellpadding=0 align=center>
<tr><th class=f24><h1>SCO UNIX 環境下不同容量硬盤的對拷</h1></th></tr>
<tr><td height=20 align=center><font color=#999999><small> 本文出自: 作者: 江山 (2001-07-05 22:08:01)</small></font></td></tr>
<tr><td ><br>
<script type="text/javascript"><!--
google_ad_client = "pub-0052768304011480";
google_alternate_color = "000000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_channel ="5959447789";
google_color_border = "000000";
google_color_bg = "666666";
google_color_link = "FFFFFF";
google_color_url = "FF9900";
google_color_text = "CCCCCC";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td></tr>
<tr><td height=15></td></tr>
<tr><td class=l17><font id="zoom" class=f14>
<font color=#cccccc>
<!-- 正文begin -->
<!--HTML_BEGIN-->
<table width="744" border="0" cellspacing="0" cellpadding="0" height="76">
<tr>
<td>
<p><font face=宋體> 貴刊1999年第10期《技術交流》欄目介紹了兩種UNIX操作系統的快速安裝法,對金融系統為解決2000年問題而進行的系統換版很有幫助。但是,使用這兩種方法安裝UNIX都存在一個缺點,即要求復制硬盤(目標盤)比被復制硬盤(源盤)容量大或者兩者相等,這樣在目標盤容量比源盤大時,就會造成目標盤容量的浪費。筆者在系統換版過程中摸索出一套可以在不同容量硬盤之間拷貝安裝UNIX的方法,現介紹如下。<br>
在開始硬盤對拷之前,首先應將已安裝好系統的源盤和空白目標盤分別設置跳線,安裝在計算機上。開機,進入CMOS設置兩塊硬盤的參數,然后進入源盤的超級用戶root,就可以開始拷貝了。<br>
以下是在digital P200微機上,SCO Open Server Release 5環境下進行硬盤對拷的過程。<br>
1.增加一塊硬盤<br>
#mkdev hd 1 0<br>
Your root hard disk is attached to an IDE controller.<br>
Pick one of the choices below or you may quit and<br>
Invoke mkdev hd -u for a detail usage message.<br>
1)Add a hard disk to IDE controller<br>
2)Add a hard disk to SCSI controller<br>
3)Add a hard disk to an IDA controller(EISA)<br>
Enter 1,2,3,or enter 'q' to quit:(輸入1)<br>
……<br>
If you wish to exit the entire installation at this menu,<br>
Press the <DEL>key.<br>
Hard Disk Drive 1 Configuration<br>
1.Display current disk parameters<br>
2.Modify current disk parameters<br>
3.Select default disk parameters<br>
Enter an option or 'q' to quit:<br>
(這是dkinit程序的菜單。在此可以選1顯示目標硬盤參數,如不符要求,可選2進行修改,然后輸入q繼續)<br>
……<br>
1.Display Partition Table<br>
2.Use Entire Disk for UNIX<br>
3.Use Rest of Disk for UNIX<br>
4.Create UNIX Partition<br>
5.Activate Partition<br>
6.Delete Partition<br>
7.Create Partition<br>
Enter your choice or 'q' to quit:<br>
(這是fdisk程序的菜單。在此可以對目標硬盤按需要進行分區,然后輸入q繼續)<br>
……<br>
1.Print Current Bad Track Table<br>
2.Scan Disk (You may choose Read-Only or Destructive later)<br>
3.Add Entries to Current Bad Track Table by Cylinder/Head Number<br>
4.Add Entries to Current Bad Track Table by Sector Number<br>
5.Delete Entries Individually from Current Bad Track Table<br>
6.Delete All Entries from Bad Track Table Please enter your choice
or 'q' t 廯 t:<br>
(這是badtrk程序的菜單,選擇2可以掃描查找硬盤上有問題的磁道,并對應到硬盤別處的正常磁道上,另外還建立一個壞道表。輸入q繼續)<br>
Enter the number of bad tracks to allocate space for<br>
(or press<return>to use the recommended value of 15):<br>
(回車)<br>
There are 2110657 blocks in the UNIX area.<br>
Please enter the number of file systems you want this area<br>
To be divided into,or press<Return>to get the default of 2 file
system(s).<br>
(回車)<br>
The layout of the filesystems and swap area is now prepared.<br>
Do you wish to make any manual adjustments to the sizes or<br>
names of the filesystems or swap area before they are created<br>
on the hard disk?(y/n)<br>
(輸入n)<br>
Making filesystems<br>
Hard disk initialization procedure completed.<br>
2.用dd命令將SCO UNIX硬盤自舉程序從源盤拷入目標盤<br>
#dd if=/dev/hd0a of=/dev/hdla bs=1024 count=40<br>
3.用divvy命令在目標盤上建立可安裝的文件系統<br>
#divvy-im /dev/rhdla<br>
There are 2095537 lk blocks in the UNIX area.<br>
Between 16000 and 512000 lk blocks should be reserved for the swap
area.<br>
Please enter the swap-space allocation ,or press <Return><br>
To get the default allocation of 24000 lk blocks:<br>
(回車)<br>
There are 2095537 lk blocks in the UNIX area.<br>
Between 15000 and 64000 lk blocks should be reserved for the boot
filesystem.<br>
Please enter the boot-space allocation,or press <Return><br>
To get the default allocation of 20000 lk blocks:<br>
(回車)<br>
Do you want a separate /u filesystem?(y/n)<br>
(輸入n)<br>
The layout of the filesystems and swap area is now prepared.<br>
Do you wish to make any manual adjustments to the sizes or<br>
names of the filesystems or swap area before they are created<br>
on the hard disk?(y/n)<br>
(輸入n)<br>
Making filesystems<br>
4.用divvy 命令查看并修改內分區(division)名<br>
#divvy/dev/rhdla<br>
Name Type New FS # First Block<br>
Last Block dll50 EAFS no 0<br>
0 19999<br>
d1151 NON Fs no 1 20000<br>
43999<br>
HTFS no 2 44000<br>
2045725<br>
Not USED no 3 -<br>
-<br>
Not USED no 4 -<br>
-<br>
Not USED no 5 -<br>
-<br>
recover NON FS no 6 2045726<br>
2045735<br>
hdla WHOLE DISK no 7 0<br>
2061831<br>
2045736 lk blocks for divisions,16096 lk blocks reserved for the system.<br>
n[ame] Name or rename a division.<br>
c[reate] Create a new file system on this division.<br>
t[ype] Select or change filesystem type on new filesystems.<br>
p[revent] Prevent a new file system from being created on<br>
this.<br>
s[tart] Start a division on a different block.<br>
e[nd] End a division on a different block.<br>
r[estore] Restore the original division table.<br>
Please enter your choice or 'q' to quit:<br>
(輸入n修改內分區名。在此分別將0,1,2內分區名修改為rb ,rs,rr)<br>
i[nstall] Install the division set-up shown.<br>
r[eturn] Return to the previous menu.<br>
e[xit] Exit without installing a division table.<br>
Please enter your choice:<br>
(輸入i將內分區情況安裝在目標盤上)<br>
Making filesystems.<br>
5.將目標盤引導文件系統安裝到源盤上,并拷貝其內容<br>
#mount/dev/rb/mnt<br>
#cd/stand<br>
#find.-print|cpio-pdumv /mnt<br>
#umount/mnt<br>
6.將目標盤根文件系統安裝到源盤上,并拷貝其內容<br>
# mount/dev/rr/mnt<br>
#find/-mount print|cpio-pdumv/mnt<br>
7.建立目標盤根文件系統中的文件系統安裝點<br>
#cd /mnt<br>
#mkdir mnt stand;chmod 755 mnt stand;chgrp bin mnt stand<br>
#umount /mnt<br>
至此,拷貝完畢。□</font></p>
<p align=left><span
class=zz>江山(中國建設銀行湖南省株洲市分行科技處 (湖南株洲412000))</span></p>
</td>
</tr>
</table>
<!--HTML_END-->
<br>
<!-- 正文end -->
<br>
(http://www.fanqiang.com)<br>
</font>
<br>
<font color=#999999><small></small></font>
<br>
</td></tr>
</table>
<br>
</td></tr>
</table>
<table width=750 border=0 cellpadding=0 cellspacing=0>
<tr><td width=620 align=center>
<table width=562 border=0 cellspacing=0 cellpadding=0>
<tr><td width=562>
<table width=562 border=0 cellspacing=0 cellpadding=0>
<tr><td >
</td></tr>
<tr><td height=10></td></tr>
</table>
<!--結束:底部-->
<table border=0 width=750>
<tr>
<td width="100%" height="2" colspan="5" bgcolor="#D09F0D"><img src="/images/c.gif" width=1 height=1></td>
</tr>
<tr>
<td width="100%" height="40" colspan="5" valign=top><p align="center"><font color=#ffffff>★ 樊強制作 歡迎分享 ★ </font></p></td>
</tr>
</table>
</center>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -