vmware Ubuntu 虚拟机 挂载移动硬盘

注意:必定要将usb硬盘插到usb2.0的接口上,不然可能会报一下错误web

报错:  usb 1-1: can't set config #1, error -71

Ubuntu 挂载ntfs硬盘,ide

#fdisk -l #找到本身得硬盘

Device Start End Sectors Size Type
/dev/sda1 2048 4095 2048 1M BIOS boot
/dev/sda2 4096 41940991 41936896 20G Linux filesystemsvg

Disk /dev/sdb: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 82F140E7-ED4A-4960-A78C-78AD18819A18code

Device Start End Sectors Size Type
/dev/sdb1 64 4187593176 4187593113 2T Microsoft basic data
/dev/sdb2 4187593177 5860526651 1672933475 797.7G Microsoft basic dataxml

#apt-get install ntfs-3g
    #mount -t ntfs-3g /dev/sda1 /root/ntfs #注意,sda1 换成你的硬盘标识,/root/ntfs 为硬盘挂载的目录

开机自动挂载硬盘,接口

添加开机自启get

在/etc/rc.local中添加it

#mount -t ntfs-3g /dev/sda1 /root/ntfs #注意,sda1 换成你的硬盘标识,/root/ntfs 为硬盘挂载的目录
    exit 0;#必定要在exit 0;以前添加