Sun Microsystems System Administration Guide, Volume 1 (2000) - page 12

 

  Index      Manuals     Sun Microsystems System Administration Guide, Volume 1 (2000)

 

Search            copyright infringement  

 

 

 

 

 

 

 

 

 

 

 

Content      ..     10      11      12      13     ..

 

 

 

Sun Microsystems System Administration Guide, Volume 1 (2000) - page 12

 

 

SPARC: How to Connect a System Disk and Boot
This procedure assumes that the system is shut down.
1. Disconnect the damaged system disk from the system.
2. Make sure the disk you are adding has a different target number than the other
devices on the system.
You will often find a small switch located at the back of the disk for this purpose.
3. Connect the replacement system disk to the system and check the physical
connections.
Refer to the disk’s hardware installation guide for installation details.
4. Follow the instructions in the table below depending on whether you are
booting from a local or remote Solaris CD.
If You Are Booting From ...
Then ...
A Solaris CD from a local CD-ROM drive
1. Make sure the CD is in the CD-ROM drive.
2. Boot from the CD to single-user mode:
ok boot cdrom -s
A Solaris CD from a CD-ROM drive over
Boot from the net to single-user mode:
the network
ok boot net -s
After a few minutes, the root prompt (#) is displayed.
Where to Go From Here
After you boot the system, you can create slices and a disk label on the disk. Go to
“SPARC: How to Create Disk Slices and Label a Disk” on page 367.
SPARC: How to Connect a Secondary Disk and
Boot
1. Become superuser.
2. If the disk type is unsupported by the Solaris software, add the device driver
for the disk by following the instructions included with the hardware.
SPARC: Adding a Disk (Tasks)
365
If necessary, see “How to Create a format.dat Entry” on page 353 for
information on creating a format.dat entry for the disk.
3. Create the /reconfigure file that will be read when the system is booted.
# touch /reconfigure
The /reconfigure file will cause the SunOS software to check for the presence
of any newly installed peripheral devices when you power on or boot your
system later.
4. Shut down the system.
# shutdown -i0 -g30 -y
-i0
Brings the system down to init state 0 (zero), the power-down state.
-gn
Notifies logged-in users that they have n seconds before the system
begins to shut down.
-y
Specifies the command should run without user intervention.
The ok or > prompt is displayed after the operating environment is shut down.
5. Turn off power to the system and all external peripheral devices.
6. Make sure the disk you are adding has a different target number than the other
devices on the system.
You will often find a small switch located at the back of the disk for this purpose.
7. Connect the disk to the system and check the physical connections.
Refer to the disk’s hardware installation guide for installation details.
8. Turn on the power to all external peripherals.
9. Turn on the power to the system.
The system will boot and display the login prompt.
Where to Go From Here
After you boot the system, you can create slices and a disk label on the disk. Go to
“SPARC: How to Create Disk Slices and Label a Disk” on page 367.
366
SPARC: How to Create Disk Slices and Label a
Disk
1. Become superuser.
2. Start the format(1M) utility.
# format
A list of available disks is displayed.
3. Enter the number of the disk that you want to repartition from the list
displayed on your screen.
Specify disk (enter its number): disk-number
Is the number of the disk that you want to repartition.
disk-number
4. Go into the partition menu (which lets you set up the slices).
format> partition
5. Display the current partition (slice) table.
partition> print
6. Start the modification process.
partition> modify
7. Set the disk to all free hog.
Choose base (enter number) [0]? 1
See “Using the Free Hog Slice” on page 335 for more information about the free
hog slice.
8. Create a new partition table by answering y when prompted to continue.
SPARC: Adding a Disk (Tasks)
367
Do you wish to continue creating a new partition table based on
above table[yes]? y
9. Identify the free hog partition (slice) and the sizes of the slices when prompted.
When adding a system disk, you must set up slices for:
root (slice 0) and swap (slice 1) and/or
/usr (slice 6)
After you identify the slices, the new partition table is displayed.
10. Make the displayed partition table the current partition table by answering y
when asked.
Okay to make this the current partition table[yes]? y
If you don’t want the current partition table and you want to change it, answer
no and go to Step 6 on page 367.
11. Name the partition table.
Enter table name (remember quotes): "partition-name"
Is the name for the new partition table.
partition-name
12. Label the disk with the new partition table when you have finished allocating
slices on the new disk.
Ready to label disk, continue? yes
13. Quit the partition menu.
partition> q
14. Verify the disk label using the verify command.
format> verify
368
15. Quit the format menu.
format> q
SPARC: Example—Creating Disk Slices and Labeling a System
Disk
The following example uses the format utility to divide a 1-Gbyte disk into three
slices: one for the root (/) file system, one for the swap area, and one for the /usr
file system.
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t1d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@1,0
1. c0t3d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@3,0
Specify disk (enter its number): 0
selecting c0t1d0
[disk formatted]
format> partition
partition> print
partition> modify
Select partitioning base:
0. Current partition table (original)
1. All Free Hog
Choose base (enter number) [0]? 1
Part
Tag
Flag
Cylinders
Size
Blocks
0
root
wm
0
0
(0/0/0)
0
1
swap
wu
0
0
(0/0/0)
0
2
backup
wu
0 - 2035
1002.09MB
(2036/0/0) 2052288
3 unassigned
wm
0
0
(0/0/0)
0
4 unassigned
wm
0
0
(0/0/0)
0
5 unassigned
wm
0
0
(0/0/0)
0
6
usr
wm
0
0
(0/0/0)
0
7 unassigned
wm
0
0
(0/0/0)
0
Do you wish to continue creating a new partition
table based on above table[yes]? yes
Free Hog partition[6]? 6
Enter size of partition ‘0’ [0b, 0c, 0.00mb]: 200mb
Enter size of partition ‘1’ [0b, 0c, 0.00mb]: 200mb
Enter size of partition ‘3’ [0b, 0c, 0.00mb]:
Enter size of partition ‘4’ [0b, 0c, 0.00mb]:
Enter size of partition ‘6’ [0b, 0c, 0.00mb]:
Enter size of partition ‘7’ [0b, 0c, 0.00mb]:
Part
Tag
Flag
Cylinders
Size
Blocks
0
root
wm
0 -
406
200.32MB
(407/0/0)
410256
1
swap
wu
407 -
813
200.32MB
(407/0/0)
410256
2
backup
wu
0 - 2035
1002.09MB
(2036/0/0) 2052288
(continued)
SPARC: Adding a Disk (Tasks)
369
(Continuation)
3 unassigned
wm
0
0
(0/0/0)
0
4 unassigned
wm
0
0
(0/0/0)
0
5 unassigned
wm
0
0
(0/0/0)
0
6
usr
wm
814 - 2035
601.45MB
(1222/0/0) 1231776
7 unassigned
wm
0
0
(0/0/0)
0
Okay to make this the current partition table[yes]? yes
Enter table name (remember quotes): "disk0"
Ready to label disk, continue? yes
partition> quit
format> verify
format> quit
SPARC: Example—Creating Disk Slices and Labeling a
Secondary Disk
The following example uses the format utility to divide a 1-Gbyte disk into one
slice for the /export/home file system.
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t1d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@1,0
1. c0t3d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@3,0
Specify disk (enter its number): 0
selecting c0t1d0
[disk formatted]
format> partition
partition> print
partition> modify
Select partitioning base:
0. Current partition table (original)
1. All Free Hog
Choose base (enter number) [0]? 1
Part
Tag
Flag
Cylinders
Size
Blocks
0
root
wm
0
0
(0/0/0)
0
1
swap
wu
0
0
(0/0/0)
0
2
backup
wu
0 - 2035
1002.09MB
(2036/0/0) 2052288
3 unassigned
wm
0
0
(0/0/0)
0
4 unassigned
wm
0
0
(0/0/0)
0
5 unassigned
wm
0
0
(0/0/0)
0
6
usr
wm
0
0
(0/0/0)
0
7 unassigned
wm
0
0
(0/0/0)
0
Do you wish to continue creating a new partition
table based on above table[yes]? y
(continued)
370
(Continuation)
Free Hog partition[6]? 7
Enter size of partition ’0’ [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition ’1’ [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition ’3’ [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition ’4’ [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition ’5’ [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition ’6’ [0b, 0c, 0.00mb, 0.00gb]:
Part
Tag
Flag
Cylinders
Size
Blocks
0
root
wm
0
0
(0/0/0)
0
1
swap
wu
0
0
(0/0/0)
0
2
backup
wu
0 - 2035
1002.09MB
(2036/0/0) 2052288
3 unassigned
wm
0
0
(0/0/0)
0
4 unassigned
wm
0
0
(0/0/0)
0
5 unassigned
wm
0
0
(0/0/0)
0
6
usr
wm
0
0
(0/0/0)
0
7 unassigned
wm
0 - 2035
1002.09MB
(2036/0/0) 2052288
Okay to make this the current partition table[yes]? yes
Enter table name (remember quotes): "home"
Ready to label disk, continue? y
partition> q
format> verify
format> q
#
Where to Go From Here
After you create disk slices and label the disk, you can create file systems on the
disk. Go to “SPARC: How to Create File Systems” on page 371.
SPARC: How to Create File Systems
1. Become superuser.
2. Create a file system for each slice with the newfs(1M) command.
# newfs /dev/rdsk/cwtxdysz
Raw device for the file system to be created.
/dev/rdsk/cwtxdysx
See Chapter 35 for more information about the newfs command.
3. Verify the new file system by mounting it on an unused mount point.
SPARC: Adding a Disk (Tasks)
371
# mount /dev/dsk/cwtxdysz /mnt
# ls
lost+found
Where to Go From Here
If You Are Adding A ...
Then ...
System Disk
You need to restore the root (/) and /usr file systems on the
disk. Go to Chapter 44.
After the root (/) and /usr file systems are restored, install
the boot block. Go to “SPARC: How to Install a Boot Block
on a System Disk” on page 372.
Secondary Disk
You might need to restore file systems on the new disk. Go
to Chapter 44.
If you are not restoring file systems on the new disk, you are
finished adding a secondary disk. See Chapter 36 for
information on making the file systems available to users.
SPARC: How to Install a Boot Block on a System
Disk
1. Become superuser.
2. Install a boot block on a system disk using the installboot(1M) command.
# installboot /usr/platform/‘uname -i‘/lib/fs/ufs/bootblk /dev/rdsk/cwtxdys0
/usr/platform/‘uname -i‘/lib/fs /ufs/
Boot block code.
bootblk
/dev/rdsk/cwtxdys0
Raw device of the root (/) file
system.
3. Verify the boot blocks are installed by rebooting the system to run level 3.
372
# init 6
SPARC: Example—Installing a Boot Block on a System Disk
The following example installs the boot block on a SPARCstation 10.
# installboot /usr/platform/sun4m/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0s0
SPARC: Adding a Disk (Tasks)
373
374
CHAPTER
31
IA: Adding a Disk (Tasks)
This chapter provides the procedures for adding a disk on an IA based system. This
is a list of the step-by-step instructions in this chapter.
“IA: How to Connect a System Disk and Boot” on page 377
“IA: How to Connect a Secondary Disk and Boot” on page 378
“IA: How to Create a Solaris fdisk Partition” on page 379
“IA: How to Create Disk Slices and Label a Disk” on page 386
“IA: How to Create File Systems” on page 388
“IA: How to Install a Boot Block on a System Disk” on page 389
For overview information about disk management, see Chapter 28. For step-by-step
instructions on adding a disk to a SPARC based system, see Chapter 30.
IA: About System and Secondary Disks
A system disk contains the root (/) or /usr file systems, or both. If the disk
containing either of these file systems becomes damaged, you have two ways to
recover:
You can reinstall the entire Solaris environment.
Or, you can replace the system disk and restore your file systems from a backup
medium.
A secondary disk doesn’t contain the root (/) and /usr file systems. It usually
contains space for user files. You can add a secondary disk to a system for more disk
space or you can replace a damaged secondary disk. If you replace a secondary disk
on a system, you can restore the old disk’s data on the new disk.
375
IA: Adding a System or Secondary Disk
Task Map
TABLE 31-1
IA: Adding a System or Secondary Disk Task Map
Task
Description
For Instructions, Go To
1. Connect the Disk and Boot
System Disk
“IA: How to Connect a System
Disk and Boot” on page 377
Connect the new disk and boot from a local
or remote Solaris CD.
Secondary Disk
“IA: How to Connect a
Secondary Disk and Boot” on
Connect the new disk and perform a
page 378
reconfiguration boot, so the system will
recognize the disk.
2. Create Slices and Label
Create disk slices and label the disk if it has
“IA: How to Create a Solaris
the Disk
not already been done by the disk
fdisk Partition” on page 379
manufacturer.
and “IA: How to Create Disk
Slices and Label a Disk” on
page 386
3. Create File Systems
Create UFS file systems on the disk slices
“IA: How to Create File
with the newfs command. You must create
Systems” on page 388
the root (/) or /usr file system (or both) for
a system disk.
4. Restore File Systems
Restore the root (/) or /usr file system (or
Chapter 44
both) on the system disk. If necessary, restore
file systems on the secondary disk.
5. Install Boot Block
System Disk Only. Install the boot block on the
“IA: How to Install a Boot
root (/) file system, so the system can boot.
Block on a System Disk” on
page 389
IA: Guidelines for Creating an fdisk Partition
Follow these guidelines when setting up the fdisk partition.
376
The disk can be divided into a maximum of four fdisk partitions. One of these
partitions must be a Solaris partition.
The Solaris partition must be made the active partition on the disk. The active
partition is the one whose operating system will be booted by default at system
start-up.
Solaris fdisk partitions must begin on cylinder boundaries.
Solaris fdisk partitions must begin at cylinder 1, not cylinder 0, on the first disk
because additional boot information, including the master boot record, is written
in sector 0.
The Solaris fdisk partition can be the entire disk or you might want to make it
smaller to allow room for a DOS partition. You can also make a new fdisk
partition on a disk without disturbing existing partitions (if there is enough room
to create a new one).
x86 platform only - Solaris slices are sometimes called partitions. This user guide
uses the term slice, but some Solaris documentation and programs might refer to a
slice as a partition. To avoid confusion, Solaris documentation tries to distinguish
between fdisk partitions (which are supported only on SolarisTM (Intel Platform
Edition) and the divisions within the Solaris fdisk partition, which might be called
slices or partitions.
IA: How to Connect a System Disk and Boot
This procedure assumes that the system is down.
1. Disconnect the damaged system disk from the system.
2. Make sure the disk you are adding has a different target number than the other
devices on the system.
You will often find a small switch located at the back of the disk for this purpose.
3. Connect the replacement system disk to the system and check the physical
connections.
Refer to the disk’s hardware installation guide for installation details. Also, refer
to the Solaris
8
(Intel Platform Edition) Device Configuration Guide about
hardware configuration requirements specific to the disk.
4. Follow steps a-e if you are booting from a local or remote Solaris CD.
If you are booting from the network, skip step a.
a. Insert the Solaris installation CD into the CD-ROM drive.
b. Insert the Solaris boot diskette into the primary diskette drive (DOS drive
A).
IA: Adding a Disk (Tasks)
377
c. Press any key to reboot the system if the system displays the Type any
key to reboot prompt. Or, use the reset button to restart the system if the
system is shut down.
The Boot Solaris screen is displayed after a few minutes.
d. Select the CD-ROM drive or net(work) as the boot device from the Boot
Solaris screen.
The Current Boot Parameters screen is displayed.
e. Boot the system in single-user mode.
Select the type of installation: b -s
After a few minutes, the root prompt (#) is displayed.
IA: Where to Go From Here
After you boot the system, you can create slices and a disk label on the disk. Go to
“IA: How to Create Disk Slices and Label a Disk” on page 386.
IA: How to Connect a Secondary Disk and Boot
1. Become superuser.
2. If the disk is unsupported by the Solaris software, add the device driver for the
disk by following the instructions included with the hardware.
3. Create the /reconfigure file that will be read when the system is booted.
# touch /reconfigure
The /reconfigure file will cause the SunOS software to check for the presence
of any newly installed peripheral devices when you power on or boot your
system later.
4. Shut down the system.
# shutdown -i0 -g30 -y
378
Brings the system down to init state 0 (zero), the power-down state.
i0
Notifies logged-in users that they have n seconds before the system
gn
begins to shut down.
Specifies the command should run without user intervention.
y
The Type any key to reboot prompt is displayed.
5.
Turn off power to the system and all external peripheral devices.
6.
Make sure the disk you are adding has a different target number than the other
devices on the system.
You will often find a small switch located at the back of the disk for this purpose.
7.
Connect the disk to the system and check the physical connections.
Refer to the disk’s hardware installation guide for installation details. Also, refer
to the Solaris
8
(Intel Platform Edition) Device Configuration Guide for hardware
configuration requirements specific to the disk.
8.
Turn on the power to all external peripherals.
9.
Turn on the power to the system.
The system will boot and display the login prompt.
IA: Where to Go From Here
After you boot the system, you can create slices and a disk label on the disk. Go to
“IA: How to Create Disk Slices and Label a Disk” on page 386.
IA: How to Create a Solaris fdisk Partition
1. Make sure you have read “IA: Guidelines for Creating an fdisk Partition” on
page 376.
2. Become superuser.
3. Start the format(1M) utility.
# format
IA: Adding a Disk (Tasks)
379
4. Enter the number of the disk on which to create a Solaris fdisk partition from
the list displayed on your screen.
Specify disk (enter its number): disk-number
disk-number
Is the number of the disk on which to create a Solaris fdisk
partition.
5. Go into the fdisk menu.
format> fdisk
The fdisk menu displayed is dependent upon whether the disk has existing
fdisk partitions. Determine the next step using the following table.
If You Want To ...
Go To ...
See ...
Create a Solaris fdisk partition to
Step 6
“IA: Example—Creating a
span the entire disk.
Solaris fdisk Partition That
Spans the Entire Drive” on
page 383
Create a Solaris fdisk partition
Step 7
“IA: Example—Creating a
and preserve existing non-Solaris
Solaris fdisk Partition and
fdisk partition(s).
Preserving an Existing fdisk
Partition” on page 384
Create a Solaris fdisk partition
Step 7
“IA: Example—Creating a
and additional non-Solaris fdisk
Solaris fdisk Partition and an
partition(s).
Additional fdisk Partition” on
page 385
6. Create and activate a Solaris fdisk partition spanning the entire disk by
specifying y at the prompt. Then go to step 14.
The recommended default partitioning for your disk is:
a 100% ‘‘SOLARIS System’’ partition.
(continued)
380
(Continuation)
To select this, please type ‘‘y’’. To partition your disk
differently, type ‘‘n’’ and the ‘‘fdisk’’ program will
let you select other partitions. y
7. Specify n at the prompt if you do not want the Solaris fdisk partition to span
the entire disk.
To select this, please type "y". To partition your disk
differently, type "n" and the "fdisk" program will let you
select other partitions. n
Total disk size is 2694 cylinders
Cylinder size is 765 (512 byte) blocks
Cylinders
Partition
Status
Type
Start
End
Length
%
=========
======
========
=====
===
======
===
THERE ARE NO PARTITIONS CURRENTLY DEFINED SELECT ONE OF THE
FOLLOWING:
1.
Create a partition
2.
Change Active (Boot from) partition
3.
Delete a partition
4.
Exit (Update disk configuration and exit)
5.
Cancel (Exit without updating disk configuration)
Enter Selection:
8. Select option 1, Create a partition, to create an fdisk partition.
Total disk size is 2694 cylinders
Cylinder size is 765 (512 byte) blocks
Cylinders
Partition
Status
Type
Start
End
Length
%
=========
======
========
=====
===
======
===
THERE ARE NO PARTITIONS CURRENTLY DEFINED SELECT ONE OF THE
FOLLOWING:
1.
Create a partition
2.
Change Active (Boot from) partition
3.
Delete a partition
4.
Exit (Update disk configuration and exit)
5.
Cancel (Exit without updating disk configuration)
(continued)
IA: Adding a Disk (Tasks)
381
(Continuation)
Enter Selection: 1
9. Create a Solaris fdisk partition by selecting 1(=Solaris).
Indicate the type of partition you want to create
(1=SOLARIS, 2=UNIX, 3=PCIXOS, 4=Other, 8=DOSBIG)
(5=DOS12, 6=DOS16, 7=DOSEXT, 0=Exit) ? 1
10. Identify the percentage of disk to be reserved for the Solaris fdisk partition.
Keep in mind the size of any existing fdisk partitions when calculating this
percentage.
Indicate the percentage of the disk you want this partition
to use (or enter "c" to specify in cylinders). nn
11. Activate the Solaris fdisk partition by typing y at the prompt.
Do you want this to become the Active partition? If so, it will be
activated each time you reset your computer or when you turn it on
again. Please type "y" or "n". y
The Enter Selection: prompt is displayed after the fdisk partition is
activated.
12. Select option 1, Create a partition, to create another fdisk partition.
See steps 9-11 for instructions on creating an fdisk partition.
13. Update the disk configuration and exit the fdisk menu from the selection
menu.
382
Selection: 4
14. Relabel the disk using the label command.
WARNING: Solaris fdisk partition changed - Please relabel the disk
format> label
Ready to label disk, continue? yes
format>
15. Quit the format menu.
format> quit
IA: Where to Go From Here
After you create a Solaris fdisk partition on the disk, you can create slices on the
disk. Go to “IA: How to Create Disk Slices and Label a Disk” on page 386.
IA: Example—Creating a Solaris fdisk Partition That Spans
the Entire Drive
The following example uses the format’s utility’s fdisk option to create a Solaris
fdisk partition that spans the entire drive.
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0d0 <DEFAULT cyl 2466 alt 2 hd 16 sec 63>
/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
1. c0d1 <DEFAULT cyl 522 alt 2 hd 32 sec 63>
/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0
2. c1d0 <DEFAULT cyl 13102 alt 2 hd 16 sec 63>
/pci@0,0/pci-ide@7,1/ide@1/cmdk@0,0
Specify disk (enter its number): 0
selecting c0d0
Controller working list found
[disk formatted]
format> fdisk
The recommended default partitioning for your disk is:
a 100% "SOLARIS System" partition.
(continued)
IA: Adding a Disk (Tasks)
383
(Continuation)
To select this, please type "y". To partition your disk
differently, type "n" and the "fdisk" program will let you
select other partitions. y
WARNING: Solaris fdisk partition changed - Please relabel the disk
format> label
Ready to label disk, continue? yes
format> quit
IA: Example—Creating a Solaris fdisk Partition and
Preserving an Existing fdisk Partition
The following example describes how to create a Solaris fdisk partition on a disk
that has an existing DOS-BIG fdisk partition.
format> fdisk
Total disk size is 2694 cylinders
Cylinder size is 765 (512 byte) blocks
Cylinders
Partition
Status
Type
Start End
Length
%
=========
======
========
=====
===
====== ===
1
DOS-BIG
1
538
538
20
SELECT ONE OF THE FOLLOWING:
1.
Create a partition
2.
Change Active (Boot from) partition
3.
Delete a partition
4.
Exit (Update disk configuration and exit)
5.
Cancel (Exit without updating disk configuration)
Enter Selection: 1
Indicate the type of partition you want to create
(1=SOLARIS, 2=UNIX, 3=PCIXOS, 4=Other, 8=DOSBIG)
(5=DOS12, 6=DOS16, 7=DOSEXT, 0=Exit) ?1
Indicate the percentage of the disk you want this partition
to use (or enter "c" to specify in cylinders). 80
Do you want this to become the Active partition? If so, it will be
activated each time you reset your computer or when you turn it
on
again. Please type "y" or "n". y
Partition 2 is now the Active partition Total disk size is 2694
cylinders
Cylinder size is 765 (512 byte) blocks
Cylinders
Partition
Status
Type
Start
End
Length
%
=========
======
========
=====
===
======
===
1
DOS-BIG
1
538
538
20
2
Active
SOLARIS
539
2693
2155
80
SELECT ONE OF THE FOLLOWING:
1.
Create a partition
2.
Change Active (Boot from) partition
(continued)
384
(Continuation)
3.
Delete a partition
4.
Exit (Update disk configuration and exit)
5.
Cancel (Exit without updating disk configuration)
Enter Selection: Selection: 4
WARNING: Solaris fdisk partition changed - Please relabel the disk
format> label
Ready to label disk, continue? yes
format> q
IA: Example—Creating a Solaris fdisk Partition and an
Additional fdisk Partition
This following example describes how to create a Solaris fdisk partition and a
DOSBIG fdisk partition.
format> fdisk
The recommended default partitioning for your disk is:
a 100% "SOLARIS System" partition.
To select this, please type "y". To partition your disk
differently, type "n" and the "fdisk" program will let you
select other partitions. n
Total disk size is 2694 cylinders
Cylinder size is 765 (512 byte) blocks
Cylinders
Partition
Status
Type
Start
End
Length
%
=========
======
========
=====
===
======
===
THERE ARE NO PARTITIONS CURRENTLY DEFINED SELECT ONE OF THE FOLLOWING:
1.
Create a partition
2.
Change Active (Boot from) partition
3.
Delete a partition
4.
Exit (Update disk configuration and exit)
5.
Cancel (Exit without updating disk configuration)
Enter Selection: 1
Indicate the type of partition you want to create
(1=SOLARIS, 2=UNIX, 3=PCIXOS, 4=Other, 8=DOSBIG)
(5=DOS12, 6=DOS16, 7=DOSEXT, 0=Exit) ?8
Indicate the percentage of the disk you want this partition
to use (or enter "c" to specify in cylinders). 20
Do you want this to become the Active partition? If so, it will be
activated each time you reset your computer or when you turn it on
again. Please type "y" or "n". n
Total disk size is 2694 cylinders
Cylinder size is 765 (512 byte) blocks
Cylinders
Partition
Status
Type
Start
End
Length
%
=========
======
========
=====
===
======
===
1
DOS-BIG
1
538
538
20
SELECT ONE OF THE FOLLOWING:
(continued)
IA: Adding a Disk (Tasks)
385
(Continuation)
1.
Create a partition
2.
Change Active (Boot from) partition
3.
Delete a partition
4.
Exit (Update disk configuration and exit)
5.
Cancel (Exit without updating disk configuration)Enter
Selection: 1
Indicate the type of partition you want to create
(1=SOLARIS, 2=UNIX, 3=PCIXOS, 4=Other, 8=DOSBIG)
(5=DOS12, 6=DOS16, 7=DOSEXT, 0=Exit) ?1
Indicate the percentage of the disk you want this partition
to use (or enter "c" to specify in cylinders). 80
Do you want this to become the Active partition? If so, it will be
activated each time you reset your computer or when you turn it on
again. Please type "y" or "n". y
Partition 2 is now the Active partition Total disk size is 2694
cylinders
Cylinder size is 765 (512 byte) blocks
Cylinders
Partition
Status
Type
Start
End
Length
%
=========
======
========
=====
===
======
===
1
DOS-BIG
1
538
538
20
2
Active
SOLARIS
539
2693
2155
80
SELECT ONE OF THE FOLLOWING:
1.
Create a partition
2.
Change Active (Boot from) partition
3.
Delete a partition
4.
Exit (Update disk configuration and exit)
5.
Cancel (Exit without updating disk configuration)
Enter Selection: 4
format> q
IA: How to Create Disk Slices and Label a Disk
1. Become superuser.
2. Start the format utility.
# format
3. Enter the number of the disk that you want to repartition from the list
displayed on your screen.
Specify disk (enter its number): disk-number
386
disk-number
Is the number of the disk that you want to repartition.
4. Go into the partition menu (which lets you set up the slices).
format> partition
5. Display the current partition (slice) table.
partition> print
6. Start the modification process.
partition> modify
7. Set the disk to all free hog.
Choose base (enter number) [0]? 1
See “Using the Free Hog Slice” on page 335 for more information about the free
hog slice.
8. Create a new partition table by answering yes when prompted to continue.
Do you wish to continue creating a new partition
table based on above table[yes]? yes
9. Identify the free hog partition (slice) and the sizes of the slices when prompted.
When adding a system disk, you must set up slices for:
root (slice 0) and swap (slice 1) and/or
/usr (slice 6)
After you identify the slices, the new partition table is displayed.
10. Make the displayed partition table the current partition table by answering
yes when asked.
IA: Adding a Disk (Tasks)
387
Okay to make this the current partition table[yes]? yes
If you don’t want the current partition table and you want to change it, answer
no and go to Step 6 on page 387.
11. Name the partition table.
Enter table name (remember quotes): "partition-name"
Is the name for the new partition table.
partition-name
12. Label the disk with the new partition table when you have finished allocating
slices on the new disk.
Ready to label disk, continue? yes
13. Quit the partition menu.
partition> quit
14. Verify the new disk label with verify command.
format> verify
15. Quit the format menu.
format> quit
IA: Where to Go From Here
After you create disk slices and label the disk, you can create file systems on the
disk. Go to “IA: How to Create File Systems” on page 388.
IA: How to Create File Systems
1. Become superuser.
2. Create a file system for each slice with the newfs(1M) command.
388
# newfs /dev/rdsk/cwtxdysz
/dev/rdsk/cwtxdysz
Raw device for the file system to be created.
See Chapter 36 for more information about the newfs command.
3. Verify the new file system by mounting it on an unused mount point.
# mount /dev/dsk/cwtxdysz /mnt
# ls /mnt
lost+found
IA: Where to Go From Here
If You Are Adding A ...
Then ...
System Disk
You need to restore the root (/) and /usr file systems on the
disk. Go to Chapter 44.
After the root (/) and /usr file systems are restored, install
the boot block. Go to “IA: How to Install a Boot Block on a
System Disk” on page 389.
Secondary Disk
You might need to restore file systems on the new disk. Go
to Chapter 44.
If you are not restoring file systems on the new disk, you are
finished adding a secondary disk. See Chapter 36 for
information on making the file systems available to users.
IA: How to Install a Boot Block on a System Disk
1. Become superuser.
2. Install the boot block.
IA: Adding a Disk (Tasks)
389
# installboot /usr/platform/‘uname -i‘/lib/fs/ufs/pboot /usr/platform/‘uname -i‘
/lib/fs/ufs/bootblk /dev/rdsk/cwtxdys2
/usr/platform/‘uname -i‘/lib/ Is the partition boot file.
fs/ufs/pboot
Is the boot block code.
/usr/platform/‘uname -i‘/lib/
fs/ufs/bootblk
Is the raw device name that represents the
/dev/rdsk/cwtxdys2
whole disk.
3. Verify the boot blocks are installed by rebooting the system to run level 3.
# init 6
IA: Example—Installing a Boot Block on a System Disk
# installboot /usr/platform/i86pc/lib/fs/ufs/pboot
/usr/platform/i86pc/lib/fs/ufs/bootblk /dev/rdsk/c0t6d0s2
390
CHAPTER
32
The format Utility (Reference)
This chapter describes the format utility’s menu and commands.
This is a list of the overview information in this chapter.
“Requirements or Restrictions for Using the format Utility” on page 391
“Format Menu and Command Descriptions” on page 392
“Files Used by format (format.dat)” on page 399
“Associated format Man Pages” on page 406
“Rules for Input to format Commands” on page 404
See Chapter 28 for a conceptual overview of when to use the format utility.
Requirements or Restrictions for Using
the format Utility
You must be superuser to use the format utility. If you are not superuser, you will
see the following error message when you try to use format.
% format
Searching for disk...done
No permission (or no disk found)!
391
Recommendations for Preserving
Information When Using format
Back up all files on the disk drive before doing anything else.
Save all your defect lists in files by using format’s dump command. The file name
should include the drive type, model number, and serial number.
Save the paper copies of the manufacturer’s defect list shipped with your drive.
Format Menu and Command
Descriptions
The format main menu looks like the following:
FORMAT MENU:
disk
- select a disk
type
- select (define) a disk type
partition
- select (define) a partition table
current
- describe the current disk
format
- format and analyze the disk
repair
- repair a defective sector
label
- write label to the disk
analyze
- surface analysis
defect
- defect list management
backup
- search for backup labels
verify
- read and display labels
save
- save new disk/partition definitions
inquiry
- show vendor, product and revision
volname
- set 8-character volume name
quit
format>
The table below describes the format main menu items.
392
TABLE 32-1
The format Main Menu Item Descriptions
Command or
Item
Menu?
Allows You To ...
disk
Command
Choose the disk that will be used in subsequent
operations (known as the current disk). All of the
system’s drives are listed.
type
Command
Identify the manufacturer and model of the current
disk. A list of known drive types is displayed.
Choose the Auto configure option for all SCSI-2
disk drives.
partition
Menu
Create and modify slices. See “The partition
Menu” on page 394 for more information.
current
Command
Display the following information about the current
disk:
Device name and type
Number of cylinders, alternate cylinders, heads
and sectors
Physical device name
format
Command
Format the current disk, using one of these sources
of information in this order:
1. Information found in the format.dat file
2. Information from the automatic configuration
process
3. Information you enter at the prompt if there is
no format.dat entry
fdisk
Menu
Run the fdisk program to create a Solaris fdisk
partition.
repair
Command
Repair a specific block on the disk.
label
Command
Write a new label to the current disk.
analyze
Menu
Run read, write, compare tests. See “The analyze
Menu” on page 396 for more information.
defect
Menu
Retrieve and print defect lists. See “The defect
Menu” on page 398 for more information.
backup
Command
Search for backup labels.
The format Utility (Reference)
393
TABLE 32-1
The format Main Menu Item Descriptions
(continued)
Command or
Item
Menu?
Allows You To ...
Command
Print the following information about the disk:
verify
Device name and type
Number of cylinders, alternate cylinders, heads
and sectors
Partition table
save
Command
Save new disk and partition information.
inquiry
Command
Print the vendor, product name, and revision level
of the current drive (SCSI disks only).
volname
Command
Label the disk with a new eight-character volume
name.
quit
Command
Exit the format menu.
The partition Menu
The partition menu looks like this.
format> partition
PARTITION MENU:
0
- change ‘0’ partition
1
- change ‘1’ partition
2
- change ‘2’ partition
3
- change ‘3’ partition
4
- change ‘4’ partition
5
- change ‘5’ partition
6
- change ‘6’ partition
7
- change ‘7’ partition
select - select a predefined table
modify - modify a predefined partition table
name
- name the current table
print
- display the current table
label
- write partition map and label to the disk
quit
partition>
The table below describes the partition menu items.
394
TABLE 32-2
The partition Menu Item Descriptions
The Command ...
Allows You To ...
change ‘x’ partition
Specify new slice:
Identification tag
Permission flags
Starting cylinder
Size
select
Choose a predefined slice table.
modify
Change all the slices in the slice table. This command is
preferred over the individual changex partition
commands.
name
Specify a name for the current slice table.
print
View the current slice table.
label
Write the slice map and label to the current disk.
quit
Exit the partition menu.
IA: The fdisk Menu
The fdisk menu appears on IA based systems only and looks like this.
format> fdisk
Total disk size is 1855 cylinders
Cylinder size is 553 (512 byte) blocks
Cylinders
Partition
Status
Type
Start
End
Length
%
=========
======
========
=====
===
======
===
1
DOS-BIG
0
370
371
20
2
Active
SOLARIS
370
1851
1482
80
SELECT ONE OF THE FOLLOWING:
1.
Create a partition
2.
Change Active (Boot from) partition
3.
Delete a partition
4.
Exit (Update disk configuration and exit)
5.
Cancel (Exit without updating disk configuration)
(continued)
The format Utility (Reference)
395
(Continuation)
Enter Selection:
The table below describes the fdisk menu items.
TABLE 32-3
IA: The fdisk Menu Item Descriptions
The Command ...
Allows You To ...
Create a partition
Create an fdisk partition. You must create a separate
partition for each operating environment such as Solaris or
DOS. There is a maximum of 4 partitions per disk. You will
be prompted for the size of the fdisk partition as a
percentage of the disk.
Change Active
Specify which partition will be used for booting. This
partition
identifies where the first stage boot program will look for the
second stage boot program.
Delete a previously created partition. This command will
Delete a partition
destroy all the data in the partition.
Exit
Write a new version of the partition table and exit the fdisk
menu.
Cancel
Exit the fdisk menu without modifying the partition table.
The analyze Menu
The analyze menu looks like this.
format> analyze
ANALYZE MENU:
read
- read only test
(doesn’t harm SunOS)
refresh
- read then write
(doesn’t harm data)
test
- pattern testing
(doesn’t harm data)
write
- write then read
(corrupts data)
compare
- write, read, compare (corrupts data)
purge
- write, read, write
(corrupts data)
verify
- write entire disk, then verify (corrupts data)
(continued)
396
(Continuation)
print
- display data buffer
setup
- set analysis parameters
config
- show analysis parameters
quit
analyze>
The table below describes the analyze menu items.
TABLE 32-4
The analyze Menu Item Descriptions
The Command ...
Allows You To ...
read
Read each sector on this disk. Repairs defective blocks as a default.
refresh
Read then write data on the disk without harming the data. Repairs
defective blocks as a default.
test
Write a set of patterns to the disk without harming the data. Repairs
defective blocks as a default.
write
Write a set of patterns to the disk then read the data on the disk back.
Destroys existing data on the disk. Repairs defective blocks as a default.
Write a set of patterns to the disk, read the data back, and compare it to
compare
the data in the write buffer. Destroys existing data on the disk. Repairs
defective blocks as a default.
purge
Remove all data from the disk so that the data can’t be retrieved by
any means. Data is removed by writing three distinct patterns over the
entire disk (or section of the disk), then writing an hex-bit pattern if the
verification passes.
Repairs defective blocks as a default.
verify
Write unique data to each block on the entire disk in the first pass.
Read and verify the data in the next pass. Destroys existing data on the
disk. Repairs defective blocks as a default.
print
View the data in the read/write buffer.
The format Utility (Reference)
397

 

 

 

 

 

 

 

Content      ..     10      11      12      13     ..