UbuntuHelp:MountingWindowsPartitions
来自Ubuntu中文
Ubuntu is capable of reading and writing files stored on Windows formatted partitions. These partitions are normally formatted with NTFS, but are sometimes formatted with FAT32. You will also see FAT16 on other devices.
目录
File System Differences
For a more in depth analysis, see LinuxFilesystemsExplained, but here are some basics:
- Windows Vista, XP, 2000, older NT systems, and Windows Server 2003 and 2008 are formatted with NTFS.
- Older versions of Windows like Windows ME, 98, and 95 are formatted with FAT32.
- Flash drives, like your USB thumb drive or your camera's flash card are typically formatted as FAT16.
In Windows, you can check what your partition is formatted as by right-clicking the partition in Windows Explorer and selecting Properties. In Ubuntu, run from terminal:
sudo fdisk -l
Using Windows File Systems
For NTFS Partitions
The ntfs-3g driver is used in linux to read and write NTFS partitions. Since using it varies between Ubuntu releases, there is a separate page explaining how to use ntfs-3g in your release version. Please see MountingWindowsPartitions/ThirdPartyNTFS3G.
For FAT32 and FAT16 Partitions
The vfat driver is used in linux to read and write FAT32 and FAT16 partitions.
To mount a FAT partition from terminal, first locate the device you want to mount using the fdisk
command above, create the mount point, then use the mount
command.
Generic Template
Here is the format for mounting a FAT formatted device:
sudo mkdir <mount_point> sudo mount -t vfat -o defaults,user,exec,uid=1000,gid=100,umask=000 <device> <mount_point>
Solid Example
Let's say that using the fdisk
command reveals that you want to mount /dev/sdb1 - run:
sudo mkdir /media/fat_partition sudo mount -t vfat -o defaults,user,exec,uid=1000,gid=100,umask=000 /dev/sdb1 /media/fat_partition
Mounting at Boot
To mount a partition automatically at boot time, you will need to add an entry to /etc/fstab
- for more information on that, see Fstab. For an example of adding a FAT partition, see Section 2.1: "More Examples of Entries" on that page. The first example there uses the same options as above, and tends to work best for most users. That page has information on Editing fstab, so you just want to add a new line for your FAT partition if an entry does not already exist.
Don't forget to mount all the entries in /etc/fstab
after you edit the file, save and close it. This can be achieved simply by running:
sudo mount -a
Other Resources