Think of what you want to call the new mount point name. Just make sure you don’t use any special characters or spaces in the name. I called mine linuxstore. Now, in terminal run the following command substituting my mount point name for yours:
$ sudo mkdir /media/linuxstore
Next, here’s one of the most important things….and somethng that I didn’t find in any of the articles on the web when I was trying to figure out how to do this. You have to make the mount point directory ‘writable’. In other words, you have to give it writable permissions. They have to be world-writable permissions since you aren’t a member of the ‘root’ group in which all mount points are owned.
So, now you want to run the following command (again substituting my mount point name for yours):
$ chmod 777 /media/linuxstore
If you want to mount your drive right away, and you don’t care if it’s mounted automatically every time you boot – then in terminal run the following command:
$ mount /dev/hdd1 /media/linuxstore
There! Now you are temporarily mounted. But…if you want it to be permanent, you need to edit your filesystem tab file. Run the following command in terminal:
$ gedit /etc/fstab
The text editor window will appear with the fstab file loaded up. You will see something that looks kind of like this:
# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdb1 /media/hdb1 ext3 defaults 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
All you have to do is add a new line for the new drive…
I will add the following line to my fstab for my new drive:
/dev/hdd1 /media/linuxstore ext3 defaults 0 0
Just be sure to substitute both the name of my hard drive for yours (mine is hdd1, is yours hdc1 or another name?), and my mount point hame for yours. Then save the file.
Now you will have the new hard drive mounted and writable both every time you boot. In Ubuntu, you should find your new drive listed under your ‘Places’ menu. To make the hard drive show up right now, without rebooting – just reload your fstab file with the following command:
$ sudo mount -a
Now you’re done! Enjoy your new storage drive in Linux!
最終更新:2011年01月10日 11:23