Nolan's Blog

a PHP JS UI APP developer


Ubuntu Mount the Windows’ partition

Sometime, we need share the folder for word, likes apache’s root path or any other project’s folder.
So we need mount the other partition on start-up Ubuntu.

1. CMD sudo blkid
View all the partition of disks.

/dev/sda1: LABEL="SYSTEM" UUID="6A4031254030F981" TYPE="ntfs" PARTUUID="c52dc52d-01"
/dev/sda5: LABEL="WORK" UUID="841C686D1C685C64" TYPE="ntfs" PARTUUID="c52dc52d-05"
/dev/sda6: LABEL="DOCUMENT" UUID="E604677704674A1F" TYPE="ntfs" PARTUUID="c52dc52d-06"
/dev/sda7: LABEL="OTHER" UUID="D2AC7ADBAC7ABA15" TYPE="ntfs" PARTUUID="c52dc52d-07"
/dev/sdb1: UUID="6efcb250-6c3c-4b2b-a9c5-3e3857d5c680" TYPE="ext4" PARTUUID="3051b101-01"
/dev/sdb5: UUID="6ec85b42-afc6-4e48-bee9-65c6028d514b" TYPE="swap" PARTUUID="3051b101-05"

2.Update config vim /etc/fstab
Each line need contain the following contents:
<file system> <mount point> <type> <options> <dump> <pass>
<file system> : Partition positioning, UUID or LABEL. Eg: /dev/sda2
<mount point> : Mount point, Eg: /media/C
<type> : Partition type. Eg: ntfs or fat32
<options> : default option is defaults
<dump> : Backup partition, default is 0
<pass> : Check partition, default is 0

Add your new partition:

# disk WORK
/dev/sda5 /media/nolan/WORK/ ntfs defaults 0 0

3. Test
sudo mount -a

4. Options
About the options

async / sync
(Yes/Not) Synchronous
Recommend “async” (better performance).

auto / noauto
(Yes/Not) Auto mount
Default is “auto”.

rw / ro
Read and Write / Read only

exec / noexec
(Yes/Not) Executable
This option will control the all files in partition can be execution or not.

user / nouser
(Yes/Not) Allow default user mount partition.
Generally, we choose not allow.

(Yes/Not) Have suid auth.
Allow SUID ?

defaults is same of “rw, suid, dev, exec, auto, nouser, async”.


, ,

Powered by