Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown    



MOUNT and UMOUNT


In some distro´s the additional partitions ( Windows or second Linux distro ) are not automatically mounted and thus not visible.

From previous Tip we know about fstab and mtab:

CODE
$ cat /etc/fstab

( shows you the available partitions )


CODE
$ cat /etc/mtab

( shows you the already mounted partitions )

If you see partitions in fstab and the same partitions are not in mtab you will have to mount them yourself:

CODE
$ su
< password >
# mount /dev/hda1 /mnt/hda1

( If your win. partition is on hda1. Sometimes the mountpoint for Windows is /mnt/win_c )

This will mount hda1, usually your Windows partition.

CODE
# cd /mnt/hda1

( to get in that directory )


CODE
# ls

( to see what is in that directory ) ( ls stands for ¨list¨ )


CODE
# umount /mnt/hda1

( will un-mount the partition, NOTE: not unmount but umount )


In some cases the mount command will print an error message to the screen. ( Mainly in Slackware and Linux From Scratch ) Have a look then if there are any directories in the /mnt directory to mount on:

CODE
$ su
< password >
# cd /mnt
# ls


If there is no ( empty ) directory for hda1 ( or other partitions ) you will have to make it first:

CODE
# mkdir hda1


Only then you can:

CODE
# mount /dev/hda1 /mnt/hda1


So see first what partitions you would like to mount and make the directories for it in /mnt. Only after that you can do the actual mounting. ( the directories will stay after a reboot, the mounting however has to be done again )
Do not mount partitions if you do not need them mounted. ( since every twenty times a partition is mounted there will be a fsck at boot, and that makes the time to boot longer )


Bruno


-- Jul 3 2003 ( Revised Dec 10 2005 ) --


Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown