红联首页 凝聚Linux人的力量
菜鸟过关 | 精华文档 | 同城人(交友) | 我与Linux的故事 | Linux新闻 | Linux视频 | Linux人才 | 软件下载 | 大学校园 | English
发新话题
打印

Automount Disk Under Ubuntu 8.04

Automount Disk Under Ubuntu 8.04

Linux (Ubuntu) is a highly configurable OS. One of the thing that will trouble many new Ubuntu user when you upgrade your Ubuntu from 7.10 to 8.04 is that the default setting of auto-mount disk is off. So you have to mount the disks manually, which is kind of annoying since you have to mount them every time when you login the system. Another inconvenience is that you can not set wallpapers in any non-linux formated partitions. Of course there is a way to fix this.

1) open the terminal ( Alt+F2), then type
gnome-terminal
and hit enter.

2)Make a mount point, mkdir /media/name
where name is any name you wanna name the mount point.

3)From the terminal, type
sudo fdisk -l
It lists all the partitions you have. Here is what mine looks like:
/dev/sda1   *           1        1402    11261533+   7  HPFS/NTFS
/dev/sda2            1403        9728    66878595    f  W95 Ext'd (LBA)
/dev/sda5            1403        7724    50781433+   7  HPFS/NTFS
/dev/sda6            7725        8970    10008463+  83  Linux
/dev/sda7            8971        9096     1012063+  82  Linux swap / Solaris
/dev/sda8            9097        9728     5076508+  83  Linux
The partitions that I wanna automount is sda1 and sda5. We can do that by editing the fstab.

4) From terminal, type
sudo gedit /etc/fstab

5) add the following line to fstab
/dev/sda1 /media/name ntfs defaults,umask=007,gid=46 0 0
There is an better alternative way of doing this, which is using the UUID.
From the terminal, type
sudo blkid
The output should look like this:
/dev/sda1: UUID=NumberID TYPE="ntfs"
/dev/sda5: UUID=NumberID TYPE="ntfs"
/dev/sda6: UUID=NumberID TYPE="ext3"
/dev/sda7: TYPE="swap" UUID=NumberID
/dev/sda8: UUID=NumberID TYPE="ext3"
NumberID should be a sequence of numbers or numbers and letters.
Add the following line to fstab
UUID=NUMBER_ID /media/name ntfs defaults,umask=007,gid=46 0 0

6)Save the fstab file and then you are done.

TOP

发新话题