1、查看硬盘的各个分区的元数据
sudo fdisk -l、
可以查看到硬盘分区的格式有ntfs、fat32、ext3等等
2、修改/etc/fstab文件;
sudo gedit /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).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
/host/ubuntu/disks/root.disk / ext4 loop,errors=remount-ro 0 1
/host/ubuntu/disks/swap.disk none swap loop,sw 0 0
/dev/sda1 /media/C ntfs umask=0222,iocharset=utf8,defaults 0 0
/dev/sda5 /media/D vfat umask=002,iocharset=utf8,defaults 0 0
#/dev/sda6 /media/E ntfs auto,umask=0222,iocharset=utf8,defaults 0 0
/dev/sda7 /media/F ntfs umask=0222,iocharset=utf8,defaults 0 0
#defaults,nls=utf8,umask=0222
注意:我这里/sda5是fat32的格式,挂载的时候umask=002,与fat32并不相同。其他基本一样。
3、挂载硬盘
sudo mount -a