vmware Ubuntu 虚拟机 挂载移动硬盘

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

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

Ubuntu 挂载ntfs硬盘,

    #fdisk -l #找到自己得硬盘

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

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-78AD18819A18

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

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

开机自动挂载硬盘,

添加开机自启

在/etc/rc.local中添加

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

你可能感兴趣的:(小技巧)