|
| 以 PDF 格式下载本书
Managing File Systems on an x86 System
8
- This chapter describes how to format diskettes for use with ufs, pcfs, and DOS file systems. Restoring ufs file systems is also described.
- Use this table to proceed directly to the task-oriented sections.
-
x86 Additional x86 Disk-Based File Systems
- x86 systems provides support for the following file system types in addition to the file systems listed in File System Administration.
-
-
pcfs - The Solaris 2.x pcfs file system supports Primary and Extended DOS partitions on hard disks in addition to the diskette-based DOS file systems.
-
s5fs - System V file system which supports pre-existing Intel(R) System V file systems with 512, 1024, or 2048 byte blocks.
x86 Formatting Diskette Devices
- The fdformat command is used to format diskette devices. By default, the fdformat command formats the diskette to the configured capacity of the diskette drive.
-
Table 8-1 identifies the diskette drives available on x86 systems and the fdformat option used to achieve the resulting formatted capacities.
-
Table 8-1
| A drive type and capacity of | using a diskette type of | and these fdformat options | will result in a formatted capacity of... |
| 5.25 (360 Kbytes) | Double (DD) |
| Default (D) | 360 Kbytes |
| 5.25 (1.2 Mbytes) | High (HD) |
| Default (H) | 1.2 Mbytes |
| Double (DD) |
| D | 360 Kbytes |
| 3.5 (720 Kbytes) | Double (DD) |
| Default (D) | 720 Kbytes |
| 3.5 (1.44 Mbytes) | High (HD) |
| Default (H) | 1.44 Mbytes |
| Double (DD) |
| D | 720 Kbytes |
| 3.5 (2.88 Mbytes) | Extended (ED) |
| Default (E) | 2.88 Mbytes |
| High (HD) |
| H | 1.44 Mbytes |
| Double (DD) |
| D, L | 720 Kbytes |
- See the fdformat(1) manual page for additional information on formatting diskettes. The following sections provide examples of using the fdformat command.
x86 Creating File Systems
- x86 Creating a File System on a Diskette
-
x86 How to Format a Diskette for Use With a ufs File System
- Use double-sided high-density 3.5-inch or 5.25-inch diskettes (diskettes are marked "DS, HD").
-
Caution - Reformatting destroys any files already on the diskette.
-
-
Check the diskette to make sure that it is not write-protected.
A 3.5-inch diskette is write-protected if you can see through a square hole in the lower left corner of the diskette. A 5.25-inch diskette is write-protected if the notch near the upper right corner is covered. To protect 3.5-inch diskettes, turn the diskette over and push the plastic write-protect switch toward the top of the diskette.
-
Insert a DS, HD diskette in the diskette drive.
-
Type fdformat /vol/dev/aliases/floppyn and press Return. A message similar to the following is displayed:
-
Formatting 1.44 MB in /vol/dev/aliases/floppy0
Press return to start formatting floppy.
|
-
x86 - If there is a file system on the diskette and the diskette is mounted, you will get an error from fdformat. You must unmount the diskette using umount and run fdformat again or use the fdformat command with the -U option to umount any file system on the floppy and reformat it.
-
-
Press Return.
While the diskette is being formatted, a series of dots (...) is displayed. Bad spots in a cylinder cause an "e" to be displayed. Do not use the diskette. When formatting is complete, the prompt is redisplayed.
-
Example
-
pluto% fdformat /vol/dev/aliases/floppy0
Formatting 1.44 MB in /vol/dev/aliases/floppy0
Press return to start formatting floppy.
...............................................................
.................
pluto%
|
-
x86 How to Format a Diskette That Can Be Read on a DOS System
-
Caution - Reformatting destroys any files already on the diskette.
-
-
Insert a DS, HD diskette in the diskette drive.
-
Type fdformat -t dos /vol/dev/aliases/floppyn and press Return.
The configuration and the message Press return to start formatting floppy are displayed.
-
Press Return.
While the diskette is being formatted, a series of dots (...) is displayed. Bad spots in a cylinder cause an "e" to be displayed. Do not use the diskette. When formatting is complete, the prompt is redisplayed.
-
Example
-
pluto% fdformat -t dos /vol/dev/aliases/floppy0
Formatting 1.44 MB in /vol/dev/aliases/floppy0
Press return to start formatting floppy.
...............................................................
.................
pluto%
|
-
x86 Creating a pcfs File System on a Disk Partition
- You need to create pcfs or MS-DOS file systems only if you want to boot MS-DOS instead of Solaris on your system.
- Solaris can define or allocate an fdisk partition for a Primary DOS and an Extended DOS partition only. The partition can be BIG-DOS (greater than 32 Mbytes in size) or have 12-bit or 16-bit FATs. The MS-DOS fdisk command must be used to define or allocate logical drives within the Extended DOS partition. The MS-DOS format command must be used to complete the file system creation on the Primary DOS partition and each logical drive.
- Refer to your MS-DOS user's guide for details on using the DOS version of fdisk and format.
x86 Mounting and Unmounting File Systems
-
x86 How to Mount a pcfs File System From a Diskette
- Use the following procedure to mount a pcfs file system from a diskette:
-
-
Type the volcheck command and press Return. The pcfs file system will be mounted automatically.
- Use the following procedure to mount a pcfs file system from a diskette if you are not running Volume Manager.
-
-
Become superuser.
-
Create the mount point for the file system, if necessary.
-
-
-
Type the following mount command and press Return.
-
# mount -F pcfs /dev/diskette /pcfs
|
-
x86 How to Mount a pcfs File System From a Hard Disk
- To mount a pcfs file system from the hard disk, you must specify the block device name of the disk, the DOS logical drive, and the mount point for the file system.
-
-
devicename - specifies the special block device file for the whole disk (for example, /dev/dsk/c0t0d0p0).
-
logical-drive - specifies either the DOS logical drive letter (c through z) or a drive number 1 through 24. Drive c is equivalent to drive 1 and represents the Primary DOS partition on the drive; all other letters or numbers represent DOS logical drives within the Extended DOS partition.
-
mount-point - specifies where the file system is mounted.
- Note that the devicename and logical-drive must be separated by a colon.
- Use the following procedure to mount a pcfs file system from a hard disk.
-
-
Become superuser.
-
Type mount -F pcfs /dev/dsk/device-name:logical-drive mount-point and press Return.
- In this example, the logical drive in the Primary DOS partition is mounted on the /pcfs/c directory:
-
pluto% su
Password:
# mount -F pcfs /dev/dsk/c0t0d0p0:c /pcfs/c
|
- In this example, the first logical drive in the Extended DOS partition on the disk is mounted on /pcfs/d:
-
# mount -F pcfs /dev/dsk/c0t0d0p0:2 /pcfs/d
|
-
x86 How to Mount an s5fs File System With Default Options
- To mount an s5fs file system with the default options, you must specify the block device name of the partition from the /dev/dsk directory and the mount point for the file system.
-
-
device-name - specifies the special block device file for the disk partition holding the file system (for example, /dev/dsk/c0t3d0s7).
-
mount-point - specifies where the file system is mounted.
- Use the following steps to mount an s5fs file system with default options.
-
-
Become superuser.
-
Type mount -F s5fs /dev/dsk/devicename mount-point and press Return.
The file system is mounted.
- In this example, /dev/dsk/c0t3d0s7 is mounted on the /files1 directory:
-
# mount -F s5fs /dev/dsk/c0t3d0s7 /files1
|
-
x86 How to Mount an s5fs File System With Additional Options
- You can mount an s5fs file system with different mount options shown in Table 8-2. If you specify multiple options, separate them with commas (no spaces), for example, -o rw,remount.
-
Table 8-2
| Option | Description |
| f | Fake an entry in /etc/mnttab, but don't really mount any file systems. |
| n | Mount the file system without making an entry in /etc/mnttab. |
| nosuid | Disallow setuid execution. The default is to allow setuid execution. |
| rw | Read/write. |
| ro | Read only. If you do not specify this option, the default is read/write. |
| remount | Used with rw to remount a file system read/write. |
- See the mount_s5fs(1M) man page for a complete list of options.
- Use the following step to mount an s5fs file system with additional options.
-
* Type mount -o options /dev/dsk/device-name mount-point and press Return.
- The file system is mounted using the options you specify.
x86 Restoring File Systems
- Restoring a damaged root (/) or /usr file system from a backup tape is not like other types of restore operations because the programs you need to run are in the damaged file system. You must boot the system from the installation CD-ROM and reload the file system or connect the drive to another system and reload the file system from there.
- Substitute the device name of the file systems to be repaired for the devicename variable identified in the procedures below. Refer to Chapter 5, "Accessing Devices on an x86 System," if you need help identifying your device names.
-
x86 How to Restore the root and /usr File Systems
-
-
Boot from the Solaris 2.x installation CD (or the network) to single-user mode using steps a-g.
If you are booting from the network, skip steps a and b.
a. Insert the Solaris 2.x installation CD into the CD caddy. b. Insert the CD caddy into the CD-ROM drive.
c. Insert the Solaris boot diskette into the primary diskette drive (DOS drive A).
d. 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 Multiple Device Boot Subsystem menu is displayed after a few minutes.
e. Select the CD-ROM drive or net(work) as the boot device from the Multiple Device Boot menu. Press Return.
The Secondary Boot Subsystem menu is displayed.
f. Type b -s at the Select the type of installation: prompt and press Return.
After a few minutes, the single-user mode # prompt is displayed.
-
Use the format utility to repair and reallocate slices on the disk.
a. Locate and fix any bad blocks.
- See Peripherals Administration for information on using format to repair a disk.
-
b. Divide the disk into slices with the format command.
-
-
Make a new file system with the newfs command and check the file system with the fsck command for each slice except swap.
-
# newfs /dev/rdsk/devicename
# fsck /dev/rdsk/devicename
|
-
-
Type mount /dev/dsk/devicename /mnt and press Return. The file system is mounted on a temporary mount point.
-
x86 - To mount the file system, you specify the block device directory (/dev/dsk), not the raw device directory.
-
-
Type cd /mnt and press Return.
You have changed to the mount-point directory.
-
Type tapes and press Return.
This command creates the tape device entries.
-
Write-protect the tapes for safety.
-
Type ufsrestore rvf /dev/rmt/unit and press Return. The level 0 tape is restored.
-
Remove the tape and load the next level tape in the drive.
Always restore tapes starting with 0 and continuing from lowest to highest until you reach the highest level.
-
-
Type ufsrestore rvf /dev/rmt/unit and press Return. The next level tape is restored.
-
-
Repeat steps 8 and 10 for each additional tape.
-
Type rm restoresymtable and press Return. Removes the restoresymtable file that is created and used by ufsrestore to check point the restore.
-
Type cd / and press Return.
-
-
Type umount /mnt and press Return.
The root file system is unmounted.
-
Type fsck /dev/rdsk/devicename and press Return. The restored file system is checked for consistency.
-
Insert a new tape in the tape drive.
-
Type ufsdump 0uf /dev/rmt/unit /dev/rdsk/devicename and press Return.
A level 0 backup is performed. Always do an immediate backup of a newly created file system because ufsrestore repositions the files and changes the inode allocation.
-
Repeat steps 4 through 18 for the /usr file system, if necessary.
-
Type init 6 and press Return.
The system is rebooted.
|
|