免费注册 查看新帖 |

Chinaunix

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

[SCO UNIX] 在SCOUnix5 内添加一块硬盘具体步骤 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-04-26 15:20 |只看该作者 |倒序浏览
大家好,
        经过本人多次试验,总结下来的步骤,供大家共享:在这里本人添加是一个IDE类型的硬盘,
注意!操作不当会毁掉操作系统!操作之前先备份重要的文件。
   
1. 为机器挂好第二硬盘,可挂接在Primary Slave或Secondary Master/Slave上。使用文件虚拟机的,也可以在Vm->Setting菜单里增加硬盘。

2. 超级用户运行 mkdev hd,选择1,SCO 505以上版本是可以自动检测到新的硬盘的,可能会显示一行新的硬盘设备信息,例如:
   %disk     0x01F0-0x01F7  14   -  type=W0 unit=1 cyls=520 hds=128 secs=63
   
   早先版本的SCO会要求你输入硬盘挂接的接口,Primary/Secondary Master/Slave。

Your root hard disk is attached to an IDE controller.

Pick one of the choices below or you may quit and
invoke mkdev hd -u for a detailed usage message.

                1) Add a hard disk to IDE controller
                2) Add a hard disk to SCSI controller
                3) Add a hard disk to an IDA controller (EISA).

Enter 1, 2, 3 or enter 'q' to quit: 1

During installation you may choose to overwrite all
or part of the present contents of your hard disk.

Do you wish to continue? (y/n) y

   
3. mkdev 程序会自动调用/etc/kdinit,这一步基本上什么都不做,接受操作系统给出的缺省值

The hard disk installation program will now invoke /etc/dkinit.
Entering 'q' at the following menu will exit /etc/dkinit,
and the hard disk installation will continue.

If you wish to exit the entire installation at this menu,
press the <DEL> key.


Hard Disk Drive 1 Configuration

        1. Display current disk parameters
        2. Modify current disk parameters
        3. Select default disk parameters

Enter your choice or q to quit: q

The hard disk installation program will now invoke two disk
preparation utilities: fdisk and badtrk.
Selecting 'q' at the main menu for each utility will exit
that utility and continue with the hard disk installation.

To exit the entire installation at these menus, press the <DEL> key.

4. mkdev 会接着调用/etc/fdisk为硬盘分区,这一步和手工调用 fdisk -f /dev/rhd10作用是一样的(rhd00是根硬盘,rhd10是第二硬盘, rhd20是第三硬盘...)。首先查看一下分区,确定是刚刚挂接上去的没有分区过的空硬盘

The hard disk installation program will now invoke /etc/fdisk.
Entering 'q' at the following menu will exit /etc/fdisk,
and the hard disk installation will continue.

If you wish to exit the entire installation at this menu,
press the <DEL> key.


        1. Display Partition Table
        2. Use Entire Disk for UNIX
        3. Use Rest of Disk for UNIX
        4. Create UNIX Partition
        5. Activate Partition
        6. Delete Partition
        7. Create Partition

Enter your choice or 'q' to quit: 1

Current Hard Disk Drive: /dev/rdsk/1s0

        +-------------+----------+-----------+---------+---------+---------+
        | Partition   | Status   | Type      |   Start |     End |    Size |
        +-------------+----------+-----------+---------+---------+---------+
        +-------------+----------+-----------+---------+---------+---------+

Total disk size: 66560 tracks (129 reserved for masterboot and diagnostics)

Press <Return> to continue

        1. Display Partition Table
        2. Use Entire Disk for UNIX
        3. Use Rest of Disk for UNIX
        4. Create UNIX Partition
        5. Activate Partition
        6. Delete Partition
        7. Create Partition

Enter your choice or 'q' to quit: 2

Current Hard Disk Drive: /dev/rdsk/1s0

        +-------------+----------+-----------+---------+---------+---------+
        | Partition   | Status   | Type      |   Start |     End |    Size |
        +-------------+----------+-----------+---------+---------+---------+
        | 1           | Active   | UNIX      |       1 |   66431 |   66431 |
        +-------------+----------+-----------+---------+---------+---------+

Total disk size: 66560 tracks (129 reserved for masterboot and diagnostics)

Press <Return> to continue

        1. Display Partition Table
        2. Use Entire Disk for UNIX
        3. Use Rest of Disk for UNIX
        4. Create UNIX Partition
        5. Activate Partition
        6. Delete Partition
        7. Create Partition

Enter your choice or 'q' to quit: q

        1. Print Current Bad Track Table
        2. Scan Disk (You may choose Read-Only or Destructive later)
        3. Add Entries to Current Bad Track Table by Cylinder/Head Number
        4. Add Entries to Current Bad Track Table by Sector Number
        5. Delete Entries Individually from Current Bad Track Table
        6. Delete All Entries from Current Bad Track Table

Enter your choice or q to quit: q

0 bad tracks have been identified.
Enter the number of bad tracks to allocate space for
(or press <Return> to use the recommended value of 15):


There are 2088576 blocks in the UNIX area.
Please enter the number of file systems you want this area
to be divided into, or press <Return> to get the default of 1 file system(s)


The layout of the filesystems and swap area is now prepared.

Do you wish to make any manual adjustments to the sizes or
names of the filesystems or swap area before they are created
on the hard disk? (y/n) n

Making filesystems

Hard disk initialization procedure completed.

5. 此时硬盘上的已经出现了一个可挂接的新的文件系统,名字通常是d1150之类的,如果愿意,也可以运行divvy为硬盘的文件系统设备改名,注意,运行divvy时,需要带有硬盘设备参数,/dev/hd10为第二硬盘,/dev/hd20为第三硬盘...

# divvy /dev/hd10
+-------------------+------------+--------+---+-------------+------------+
| Name              | Type       | New FS | # | First Block | Last Block |
+-------------------+------------+--------+---+-------------+------------+
| d1150             | HTFS       |  no    | 0 |            0|     2088575|
|                   | NOT USED   |  no    | 1 |            -|           -|
|                   | NOT USED   |  no    | 2 |            -|           -|
|                   | NOT USED   |  no    | 3 |            -|           -|
|                   | NOT USED   |  no    | 4 |            -|           -|
|                   | NOT USED   |  no    | 5 |            -|           -|
|                   | NOT USED   |  no    | 6 |            -|           -|
| d1157all          | WHOLE DISK |  no    | 7 |            0|     2092575|
+-------------------+------------+--------+---+-------------+------------+
2088576 1K blocks for divisions, 4000 1K blocks reserved for the system

n[ame]       Name or rename a division.
c[reate]     Create a new file system on this division.
d[elete]     Delete a file system on this division.
t[ype]       Select or change filesystem type on new filesystems.
p[revent]    Prevent a new file system from being created on this division.
s[tart]      Start a division on a different block.
e[nd]        End a division on a different block.
r[estore]    Restore the original division table.

Enter your choice or q to quit: n
which division? (0 through 7)?0
what do you want to call it? u
+-------------------+------------+--------+---+-------------+------------+
| Name              | Type       | New FS | # | First Block | Last Block |
+-------------------+------------+--------+---+-------------+------------+
| u                 | HTFS       |  no    | 0 |            0|     2088575|
|                   | NOT USED   |  no    | 1 |            -|           -|
|                   | NOT USED   |  no    | 2 |            -|           -|
|                   | NOT USED   |  no    | 3 |            -|           -|
|                   | NOT USED   |  no    | 4 |            -|           -|
|                   | NOT USED   |  no    | 5 |            -|           -|
|                   | NOT USED   |  no    | 6 |            -|           -|
| d1157all          | WHOLE DISK |  no    | 7 |            0|     2092575|
+-------------------+------------+--------+---+-------------+------------+
2088576 1K blocks for divisions, 4000 1K blocks reserved for the system

n[ame]       Name or rename a division.
c[reate]     Create a new file system on this division.
d[elete]     Delete a file system on this division.
t[ype]       Select or change filesystem type on new filesystems.
p[revent]    Prevent a new file system from being created on this division.
s[tart]      Start a division on a different block.
e[nd]        End a division on a different block.
u[ndo]       Undo the last change.
r[estore]    Restore the original division table.

Enter your choice or q to quit: q


i[nstall]      Install the division set-up shown
r[eturn]       Return to the previous menu
e[xit]         Exit without installing a division table

Please enter your choice: i

6. 将新的文件系统挂到根文件系统树上:
# mkdev fs

Filesystem Initialization Program

This program performs maintenance tasks required to add or delete
an existing filesystem. Would you like to:

        1. Add a new filesystem to system.
        2. Remove a filesystem.

Select an option or enter q to quit: 1

Enter a device name and press <Return> or q to quit: /dev/u

Enter a directory name and press <Return> or q to quit: /u

Reserving slots in lost+found directory ...

When entering multiuser mode:
        1. Always mount /dev/u.
        2. Never mount /dev/u.
        3. Prompt before mounting /dev/u.

Select an option: 1

Do you want to allow users to mount this file system?  (y/n) y

Updating system files ...

Filesystem has been successfully added.

这样做完以后,下次重启机器,/u文件系统就出现了,也可以现在手工挂一下试试看:

# mount /dev/u /u
# df -vk
Mount Dir  Filesystem              blocks      used      free   %used
/          /dev/root              1870582   1246134    624448    67%
/stand     /dev/boot                15360      9947      5413    65%
/u         /dev/u                 2088576     65565   2023011     4%
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP