The Solaris 8 software release includes new removable media functionality.
For the most current man pages, use the man command. The Solaris 8 Update release man pages include new feature information that is not in the Solaris 8 Reference Manual Collection.
This functionality is updated for the Solaris 8 6/00 and the documentation updated again in the 10/00 software release.
Volume management features have been improved in the Solaris 8 6/00 software release to fully support removable media. This improvement means that DVD-ROMs, Iomega and Universal Serial Bus (USB) Zip drives and Jaz drives, CD-ROMs, and diskettes are mounted and available for reading when they are inserted.
Both the Common Desktop Environment (CDE) volume management and Solaris command-line features have been updated in this release. The information here adds to information on managing removable media in "Guidelines for Using CDs and Diskettes (Overview)" in System Administration Guide, Volume 1. For information on using File Manager to administer this feature, see "Using Removable Media Manager" in Solaris 8 User Supplement.
With the volume management improvements, you can:
Format, label, and set read or write software protection on removable media with the new rmformat command. This command replaces the fdformat command for formatting removable media.
Create and verify a PCFS file system on removable media with the mkfs_pcfs and fsck_pcfs commands.
Create an fdisk partition and a PCFS file system on removable media on a SPARC system to facilitate data transfers to IA systems.
Guidelines for using removable media are:
Use UDFS and PCFS to transfer data between DVD media.
Use the tar or cpio commands to transfer files between rewritable media such as a PCMCIA memory card or diskette with a UFS file system. A UFS file system that is created on a SPARC system is not identical to a UFS file system on PCMCIA or to a diskette that is created on an IA system.
Set write protection to protect important files on Jaz or Zip drives or diskettes. Apply a password to Iomega media.
You can access information on removable media with or without using volume manager. For information on accessing information on removable media with File Manager, see "Using Removable Media Manager" in Solaris 8 User Supplement.
Starting in the Solaris 8 6/00 release, volume manager (vold) actively manages all removable media devices. This means any attempt to access removable media with device names such as /dev/rdsk/cntndnsn or /dev/dsk/cntndnsn will be unsuccessful.
By using CDE's Removable Media Manager or the volume manager path names such as /cdrom0, /floppy, /rmdisk, /jaz0, or /zip0, you can access the devices when the volume manager, vold, is running.
You can also access removable media by their entries in the /vol/dev directory. For example:
/vol/dev/rdiskette0/volume-name
for a diskette, or
/vol/dev/rdsk/cntndn/volume-name
for a CD-ROM or removable hard disk.
If a removable media device contains a removable medium, its alias appears in the /vol/dev/aliases directory as a symbolic link to its path in the /vol/dev directory. For example, if a diskette that is labeled test is in diskette drive 0 and a CD that is labeled test is in the CD-ROM drive at /dev/rdsk/c2t1d0, you see the following output:
$ ls -l /vol/dev/aliases lrwxrwxrwx 1 root root 30 May 11 12:58 cdrom0 -> /vol/dev/rdsk/c2t1d0/test lrwxrwxrwx 1 root root 30 May 11 12:58 floppy0 -> /vol/dev/rdiskette0/test |
If you are unsure which device name to choose, use the eject -n command to display device names for all removable media devices. For example, use the device name on the right side of eject -n output to determine which device name to use with the fsck, mkfs, or newfs commands.
Use the appropriate device name to access information by using the command-line interface. You can use the volume manager's nickname from the command line by running the volcheck command before you access the removable media. See rmformat(1) for an explanation of device names.
To access information on a diskette, use:
$ volcheck $ ls /floppy myfile |
To access information on a Jaz drive, use:
$ volcheck $ ls /rmdisk jaz0/ jaz1/ |
To access information on a CD-ROM, use:
$ volcheck $ ls /cdrom solaris_8_sparc/ |
You can determine whether accessing your Jaz or Zip drives changes from previous Solaris releases, depending on whether you upgrade or install the Solaris 8 6/00 release:
If you are upgrading to the Solaris 8 6/00 release from a previous Solaris release, you can continue to access your Jaz drives and Zip drives in the same way as in previous releases.
If you are freshly installing the Solaris 8 6/00 release, you cannot access your Jaz drives and Zip drives in the same way as in previous Solaris releases.
Follow the next procedure if you want to access your Jaz and Zip drives the same way as in previous Solaris releases.
Become superuser.
Comment the following line in the /etc/vold.conf file by inserting a pound (#) sign at the beginning of the text, like this:
# use rmdisk drive /dev/rdsk/c*s2 dev_rmdisk.so rmdisk%d |
Reboot the system.
# init 6 |
You can use the rmformat command to format removable media, including the following types of diskettes:
Double-density - 720 Kbytes (3.5 inch)
High-density - 1.44 Mbytes (3.5 inch)
The rmformat command is a non-superuser utility that can format and protect rewritable removable media. The rmformat command has three formatting options:
quick - This option formats removable media without certification or with limited certification of certain tracks on the media.
long - This option formats removable media completely. For some devices using this option might include the certification of the whole media by the drive itself.
force - This option formats completely without user confirmation. For media with a password-protection mechanism, this option clears the password before formatting. This feature is useful when a password is forgotten. On media without password protection, this option forces a long format.
The rmformat command formats the media and by default creates two partitions on the media: partition 0 and partition 2 (the whole media).
Verify that the volume manager is running, which means you can use the shorter nickname for the device name.
$ ps -ef | grep vold root 212 1 0 Nov 03 ? 0:01 /usr/sbin/vold |
See System Administration Guide, Volume 1 for information on determining removable media device names and starting volume manager if it is not running.
Format the removable media.
$ rmformat -F [ quick | long | force ] device-name |
See the previous section for more information on rmformat formatting options.
If the rmformat output indicates bad blocks, see the following procedure for repairing bad blocks.
(Optional) Label the removable media with an 8-character label to be used in the Solaris environment.
$ rmformat -b label device-name |
See mkfs_pcfs(1M) for information on creating a DOS label.
This example formats a diskette.
$ rmformat -F quick /dev/rdiskette Formatting will erase all the data on disk. Do you want to continue? (y/n) y ......................................................................... |
This example formats a Zip drive.
$ rmformat -F quick zip0 Formatting will erase all the data on disk. Do you want to continue? (y/n) y ......................................................................... |
Format the media.
$ rmformat -F quick device-name |
(Optional) Create an alternate Solaris partition table.
$ rmformat -s slice-file device-name |
A sample slice file looks like the following:
slices: 0 = 0, 30MB, "wm", "home" : 1 = 30MB, 51MB : 2 = 0, 94MB, "wm", "backup" : 6 = 81MB, 13MB |
See System Administration Guide, Volume 1 for information on creating an alternate Solaris partition table.
Become superuser.
Determine the appropriate file-system type and select one of the following:
The following example formats a diskette and creates a UFS file system.
$ rmformat -F quick /dev/rdiskette Formatting will erase all the data on disk. Do you want to continue? (y/n)y $ su # newfs /dev/rdiskette newfs: construct a new file system /dev/rdiskette: (y/n)? y /dev/rdiskette: 2880 sectors in 80 cylinders of 2 tracks, 18 sectors 1.4MB in 5 cyl groups (16 c/g, 0.28MB/g, 128 i/g) super-block backups (for fsck -F ufs -o b=#) at: 32, 640, 1184, 1792, 2336, # |
Format the removable media.
$ rmformat -F quick device-name |
Become superuser.
(Optional) Create an alternate Solaris fdisk partition table.
# fdisk device-name |
See System Administration Guide, Volume 1 for information on creating an fdisk partition.
Create a PCFS file system.
# mkfs -F pcfs device-name |
This example includes how to create an alternate fdisk partition.
$ rmformat -F quick /dev/rdsk/c0t4d0s2:c Formatting will erase all the data on disk. Do you want to continue? (y/n)y $ su # fdisk /dev/rdsk/c0t4d0s2:c # mkfs -F pcfs /dev/rdsk/c0t4d0s2:c Construct a new FAT file system on /dev/rdsk/c0t4d0s2:c: (y/n)? y # |
This example describes how to create a PCFS file system without an fdisk partition.
$ rmformat -F quick /dev/rdiskette Formatting will erase all the data on disk. Do you want to continue? (y/n)y $ su # mkfs -F pcfs -o nofdisk,size=2 /dev/rdiskette Construct a new FAT file system on /dev/rdiskette: (y/n)? y # |
# fsck -F pcfs /dev/rdsk/c0t4d0s2 ** /dev/rdsk/c0t4d0s2 ** Scanning file system meta-data ** Correcting any meta-data discrepancies 1457664 bytes. 0 bytes in bad sectors. 0 bytes in 0 directories. 0 bytes in 0 files. 1457664 bytes free. 512 bytes per allocation unit. 2847 total allocation units. 2847 available allocation units. # |
You can only use the rmformat command to verify, analyze, and repair bad sectors that are found during verification if the drive supports bad block management. Most diskettes and PCMCIA memory cards do not support bad block management.
If the drive supports bad block management, a best effort is made to rectify the bad block. If the bad block cannot be rectified despite the best effort mechanism, a message indicates a failure to repair.
Repair bad blocks on removable media.
$ rmformat -c block-numbers device-name |
Supply the block number in decimal, octal, or hexadecimal format from a previous rmformat session.
Verify the media.
$ rmformat -V read device-name |
You can apply read protection or write protection and set a password on Iomega media such as Zip drives and Jaz drives. For other types of media, you can enable or disable write protection without a password.
Determine whether you want to enable or disable write protection and select one of the following:
Verify whether the media's write protection is enabled or disabled.
$ rmformat -p device-name |
You can apply a password with a maximum of 32 characters for Iomega media that support this feature. You cannot set read protection or write protection without a password on Iomega media. In this situation, you are prompted to provide a password.
You receive a warning message if you attempt to apply a password on media that does not support this feature.
Determine whether you want to enable or disable read protection or write protection and a password.
Enable read protection or write protection.
$ rmformat -W enable device-name Please enter password (32 chars maximum): xxx Please reenter password: |
$ rmformat -R enable device-name Please enter password (32 chars maximum): xxx Please reenter password: |
Disable read protection or write protection and remove the password.
$ rmformat -W disable device-name Please enter password (32 chars maximum): xxx |
$ rmformat -R disable device-name Please enter password (32 chars maximum): xxx |
Verify whether the media's read or write protection is enabled or disabled.
$ rmformat -p device-name |
This example enables write protection and sets a password on a Zip drive.
$ rmformat -W enable /vol/dev/aliases/zip0 Please enter password (32 chars maximum): xxx Please reenter password: xxx |
This example disables write protection and removes the password on a Zip drive.
$ rmformat -W disable /vol/dev/aliases/zip0 Please enter password (32 chars maximum): xxx |
This example enables read protection and sets a password on a Zip drive.
$ rmformat -R enable /vol/dev/aliases/zip0 Please enter password (32 chars maximum): xxx Please reenter password: xxx |
This example disables read protection and removes the password on a Zip drive.
$ rmformat -R disable /vol/dev/aliases/zip0 Please enter password (32 chars maximum): xxx |