10.6 Auto Mount



The partition created at the time of installation is set to be mounted automatically when the computer starts up. The file that describes the setting automatically mounted at startup is the /etc/fstab configuration file. The mount command is used for automounting. You can change the /etc /fstab file in order to mount the added hard disk automatically.

The following items are described in the /etc/fstab file.


Format

mount -a


Mount the device.

Options

-a
Mount partitions other than swap specified in /etc/fstab file


Practice : Use newly created partition


Modify the /etc/fstab file. Mount again using the mount command.


/etc/fstab file
/dev/sda3 /opt ext3 defaults 1 2 # Add a new partition
# mount -a ↵ Mount
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 4567236 3470024 861460 81% /
tmpfs 517660 0 517660 0% /dev/shm
/dev/sda3 553408 16840 508456 4% /opt # New partition



Previous Next