Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
  Previous   Contents   Next 
   
 
Chapter 19

Formatting Removable Media (Tasks)

This chapter describes how to format removable media from the command line in the Solaris environment.

For information on the procedures associated with formatting removable media, see "Formatting Removable Media (Task Map)".

For background information on removable media, see Chapter 17, Managing Removable Media (Overview).

Formatting Removable Media (Task Map)

Task

Description

For Instructions

1. Load unformatted media

Insert the media into the drive and enter the volcheck command.

"How to Load a Removable Media"

2. Format the media

Format removable media.

"How to Format Removable Media (rmformat)"

3. (Optional.) Add a UFS file system

Add a UFS file system to use the diskette for transferring files.

"How to Format Removable Media for Adding a File System"

4. (Optional) Check the media

Verify the integrity of the file system on the media.

"How to Check a File System on Removable Media"

5. (Optional) Repair bad blocks on the media

Repair any bad blocks on the media, if necessary.

"How to Repair Bad Blocks on Removable Media"

6. (Optional) Apply Read or Write and Password Protection

Apply read or write protection or password protection on the media, if necessary.

"How to Enable or Disable Write Protection on Removable Media"

Formatting Removable Media Overview

The rmformat command is a non-superuser utility that you can use to 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, the use of 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.

Formatting Removable Media Guidelines

Keep the following in mind when formatting removable media:

  • Close and quit the file manager window.

    File Manager automatically displays a formatting window when you insert an unformatted media. To avoid the window, quit from File Manager. If you prefer to keep File Manager open, quit the formatting window when it appears.

  • Volume manager (vold) mounts file systems automatically so you might have to unmount media before you can format it, if it contains an existing file system.

Removable Media Hardware Considerations

This section describes removable media hardware considerations.

Diskette Hardware Considerations

Keep the following in mind when formatting diskettes:

  • For information on diskette names, see Table 18-1.

  • Diskettes that are not named (that is, they have no "label") are assigned the default name of noname.

A Solaris system can format diskettes for use on both Solaris and DOS systems. However, the hardware platform imposes some limitations. These limitations are summarized in the following table.

Platform Type

Diskettes Format Type

SPARC based systems

UFS

 

MS-DOS or NEC-DOS (PCFS)

 

UDFS

IA based systems

UFS

 

MS-DOS or NEC-DOS (PCFS)

 

UDFS

Diskettes formatted for UFS are restricted to the hardware platform on which they were formatted. In other words, a UFS diskette formatted on a SPARC based platform cannot be used for UFS on an IA platform, nor can a diskette formatted on an IA platform be used on a SPARC based platform. This is because the SPARC and IA UFS formats are different. SPARC uses little-endian bit coding, IA uses big-endian.

A complete format for SunOS file systems consists of the basic "bit" formatting plus the structure to support a SunOS file system. A complete format for a DOS file system consists of the basic "bit" formatting plus the structure to support either an MS-DOS or an NEC-DOS file system. The procedures required to prepare a diskette for each type of file system are different. Therefore, before you format a diskette, consider which procedure to follow. For more information, see "Formatting Removable Media (Task Map)".

On a Solaris system (either SPARC or IA), you can format diskettes with the following densities.

Diskette Size

Diskette Density

Capacity

3.5"

High Density (HD)

1.44 Mbytes

3.5"

Double Density (DD)

720 Kbytes

By default, the diskette drive formats a diskette to a like density. This default means that a 1.44 Mbyte drive attempts to format a diskette for 1.44 Mbytes, whether the diskette is in fact a 1.44 Mbyte diskette or not, unless you instruct it otherwise. In other words, a diskette can be formatted to its capacity or lower, and a drive can format to its capacity or lower.

PCMCIA Memory Card Hardware Considerations

A Solaris platform can format PCMCIA memory cards for use on both Solaris and DOS platforms. However, the hardware platform imposes some limitations. These limitations are summarized in the following table.

Platform Type

PCMCIA Memory Cards Format Type

SPARC based systems

UFS

 

MS-DOS or NEC-DOS (PCFS)

IA based systems

UFS

 

MS-DOS or NEC-DOS (PCFS)

PCMCIA memory cards formatted for UFS are restricted to the hardware platform on which they were formatted. In other words, a UFS PCMCIA memory card formatted on a SPARC platform cannot be used for UFS on an IA platform. Likewise, PCMCIA memory cards formatted on an IA platform cannot be used on a SPARC platform. This is because the SPARC and IA UFS formats are different.

A complete format for UFS file systems consists of the basic "bit" formatting plus the structure to support a UFS file system. A complete format for a DOS file system consists of the basic "bit" formatting plus the structure to support either an MS-DOS or an NEC-DOS file system. The procedures required to prepare a PCMCIA memory card for each type of file system are different. Therefore, before you format a PCMCIA memory card, consider which file system you are using.

How to Load a Removable Media

  1. Insert the media.

  2. Make sure the media is formatted.

    If you aren't sure, insert it and check the status messages in the console, as described in Step 3. If you need to format the diskette, go to "How to Format Removable Media (rmformat)".

  3. Notify volume management.

    $ volcheck -v
    media was found

    Two status messages are possible:

    media was found

    Volume management detected the media and will attempt to mount it in the directory described in Table 18-1.

     

    If the media is formatted properly, no error messages appear in the console.

     

    If the media is not formatted, the "media was found" message is still displayed, but the error messages similar to the following appear in the Console:

     

    fd0: unformatted diskette or no diskette in the drive

    fd0: read failed (40 1 0)

    fd0: bad format

    You must format the media before volume management can mount it. For more information, see Chapter 19, Formatting Removable Media (Tasks).

    no media was found

    Volume management did not detect the media. Make sure the media is inserted properly and run volcheck again. If unsuccessful, check the media, it could be damaged. You can also try to mount the media manually. 
  4. Verify that the media was mounted by listing its contents.

    For example, do the following for a diskette:

    $ ls /floppy
    floppy0 myfiles

    As described earlier, floppy0 is a symbolic link to the actual name of the diskette, In this case, myfiles. If the diskette has no name but is formatted correctly, the system will refer to it as unnamed_floppy.

    If nothing appears under the /floppy directory, the diskette was either not mounted or is not formatted properly. To find out, run the mount command and look for the line that begins with /floppy (usually at the end of the listing):

    /floppy/name on /vol/dev/diskette0/name

    If the line does not appear, the diskette was not mounted. Check the console window for error messages.

 
 
 
  Previous   Contents   Next