Introduction

Today's systems

Disk geometry

Disk partitions

File system
 

Practical Approach

Hardware setup

Partitions

Mount

Automate mounts
 
 
 
 
 
 

        UNIX System Administration

Chapter 9: Adding a Disk

by Ying Zhao, Andrej Cedilnik 
  June 10, 1999 



Automatically mounted partitions 
  • For faster mount using just for example: 

  • mount /mnt/cdrom
  • Edit file /etc/fstab 

  • /dev/hda1               /                       ext2    defaults        1 1
    /dev/hda2               /home                   ext2    defaults        1 2
    /dev/hda3               /usr                    ext2    defaults        1 2
    /dev/hda4               swap                    swap    defaults        0 0
    /dev/fd0                /mnt/floppy             ext2    noauto          0 0
    /dev/cdrom              /mnt/cdrom              iso9660 noauto,ro       0 0
    none                    /proc                   proc    defaults        0 0
  • Hard drives usually mount at boot time and read-write 
  • CD-ROMs mounted when needed (noauto) and read-only (ro
  • For CD-ROMs usualy make scripts to mount and unmount:

  • #!/bin/sh
    # mcd - script for mounting CD-ROM
    echo -n "Mounting CD-ROM : "
    mount /mnt/cdrom 
    echo "done"

    #!/bin/sh
    # umcd - script for unmounting CD-ROM
    echo -n "Unmounting CD-ROM : "
    umount /mnt/cdrom 
    eject
    echo "done"