You were never here, you didn't see anything..

Drive Manipulation

After installation not many people have need to modify their drive set up. If you do here are some things that may help.

First you need to know where your drives are and their partitions if any. To get a nice list:

fdisk -l

If you don’t have a partition or wish to change what you have use fdisk or cfdisk. I find cfdisk a bit simpler. Using /dev/hdc as an example:

cfdisk /dev/hdc

Create the point where you want to mount it, here /dev/hdc for example:

mkdir /mnt/hdc

If you know the file system on the partition you can now mount it, again /mnt/hdc is an example as is the number for the partition. Replace fstype with the appropriate file system:

mount -t fstype /dev/hdc1 /mnt/hdc

If you are creating a new file system you should format it accordingly:

mkfs -t reiserfs /dev/hdc1

For more information on creating your desired file system see:

man mkfs

Or one of the many SEE ALSO commands listed at the bottom of that man page. Once formatted as you want it you can then mount it. If you made it reiserfs as the mkfs line above would have the following would work:

mount -t reiserfs /dev/hdc1 /mnt/hdc

To verify that all went well after mounting the partition run:

df -h

You should see your partition information in the output. Something like:

Filesystem            Size  Used Avail Use% Mounted on
/dev/hdc1             9.4G  3.8G  5.6G  41% /mnt/hdc

If that all went well you can add it to your /etc/fstab file (man fstab for details) so it is easily mountable later or automatically mounted on boot. To have it mounted at boot add defaults to the mount options field. Otherwise add noauto to the mount options field and it will have to be mounted manually. Adding users to the same field allows users to mount and unmount it. Not always a good idea.

Have any Question or Comment?

Leave a Reply

Your email address will not be published. Required fields are marked *


This blog is kept spam free by WP-SpamFree.

Most who fail…

Most who fail have yet to really try!