ubuntu12.10的fstab都位于/etc目录下,它包含了所有分区和存储设备的信息,以及它们应该挂载到哪里,以什么样子的方式挂载。
可以通过
king@king-e430:~$vi /etc/fstab
命令查看分区及存储设备的信息如下:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
# /文件系统所在设备 /挂载点 /文件系统类型 /mount参数 /转储 /是否fsck检查硬盘--0不检查1--检查
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda7 during installation
UUID=3812c25e-f9db-4355-815d-53704b172bd3 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=5cfedf14-549c-46a7-8fec-c0e31df56695 none swap sw 0 0
查看其他分区的UUID使用以下命令:
king@king-e430:~$ ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Apr 22 19:24 3812c25e-f9db-4355-815d-53704b172bd3 -> ../../sda7
lrwxrwxrwx 1 root root 10 Apr 22 19:24 5cfedf14-549c-46a7-8fec-c0e31df56695 -> ../../sda6
lrwxrwxrwx 1 root root 10 Apr 22 19:24 9898FD9498FD70DC -> ../../sda2
lrwxrwxrwx 1 root root 10 Apr 22 19:24 CEA6C24AA6C232AF -> ../../sda3
lrwxrwxrwx 1 root root 10 Apr 22 19:24 E0F4FDFCF4FDD4AE -> ../../sda1
lrwxrwxrwx 1 root root 10 Apr 22 19:24 F2CCA564CCA52437 -> ../../sda5
在根目录下找一个目录,建立一个文件夹
$sudo mkdir -p /proc/myhard/d
在fstab添加一下行:
UUID=CEA6C24AA6C232AF /proc/myhard/d ntfs defaults 0 0