我正在尝试安装 USB 设备以便复制文件。该设备是 64GB NTFS 格式,在 Windows 中可见。
我正在运行 Ubuntu 服务器 16.05
使用 fdisk 看不到
root@seba1:/# sudo fdisk -l
Disk /dev/sda: 838.1 GiB, 899898718208 bytes, 1757614684 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 786432 bytes
Disklabel type: dos
Disk identifier: 0x769ca931
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 1536 1500671 1499136 732M 83 Linux
/dev/sda2 1502206 1757614079 1756111874 837.4G 5 Extended
/dev/sda5 1502208 1757614079 1756111872 837.4G 8e Linux LVM
Partition 2 does not start on physical sector boundary.
Disk /dev/mapper/seba1--vg-root: 836.4 GiB, 898075983872 bytes, 1754054656 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 786432 bytes
Disk /dev/mapper/seba1--vg-swap_1: 976 MiB, 1023410176 bytes, 1998848 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 786432 bytes
我可以在 lsbulk 中看到它,但细节有限
root@seba1:~# lsblk -a
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 838.1G 0 disk
├─sda1 8:1 0 732M 0 part /boot
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 837.4G 0 part
├─seba1--vg-root 252:0 0 836.4G 0 lvm /
└─seba1--vg-swap_1 252:1 0 976M 0 lvm
sdb 8:16 1 0 disk
sr0 11:0 1 1024M 0 rom
loop0 7:0 0 0 loop
loop1 7:1 0 0 loop
loop2 7:2 0 0 loop
loop3 7:3 0 0 loop
loop4 7:4 0 0 loop
loop5 7:5 0 0 loop
loop6 7:6 0 0 loop
loop7 7:7 0 0 loop
root@seba1:~# man fsck
root@seba1:~# lsblk -a -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ext2 000a4ad9-d3ff-4120-85c4-30966a24459b /boot
├─sda2
└─sda5 LVM2_member T6HYsz-8kKE-ClUV-NfDc-wX2Y-y05b-NIYN1V
├─seba1--vg-root ext4 45a0bed5-eab3-4232-8527-f60f862dae1b /
└─seba1--vg-swap_1 swap 88038088-af5f-4465-94e6-1f3e49139b91
sdb
sr0
loop0
loop1
loop2
loop3
loop4
loop5
loop6
loop7
我可以在 /dev/disk/by-id 中看到该设备
root@seba1:/dev/disk/by-id# ls -la /dev/disk/by-id | grep "\->"
lrwxrwxrwx 1 root root 9 Aug 20 14:01 ata-hp_DVD_D_DS8DBSH_425440900266 -> ../../sr0
lrwxrwxrwx 1 root root 10 Aug 20 14:01 dm-name-seba1--vg-root -> ../../dm-0
lrwxrwxrwx 1 root root 10 Aug 20 14:01 dm-name-seba1--vg-swap_1 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Aug 20 14:01 dm-uuid-LVM-HpyMYVdCN2dahuU4r0hFMh9XsK9nNpViDQVZ5N3ngowVgfjsb5vNzbba70ZVAMny -> ../../dm-0
lrwxrwxrwx 1 root root 10 Aug 20 14:01 dm-uuid-LVM-HpyMYVdCN2dahuU4r0hFMh9XsK9nNpVipv6yfYy2s2Xwm9vmtZd98LSHRc4kpMcy -> ../../dm-1
lrwxrwxrwx 1 root root 10 Aug 20 14:01 lvm-pv-uuid-T6HYsz-8kKE-ClUV-NfDc-wX2Y-y05b-NIYN1V -> ../../sda5
lrwxrwxrwx 1 root root 9 Aug 20 14:01 scsi-3600508b1001c1054a4cee49b8df4f462 -> ../../sda
lrwxrwxrwx 1 root root 10 Aug 20 14:01 scsi-3600508b1001c1054a4cee49b8df4f462-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Aug 20 14:01 scsi-3600508b1001c1054a4cee49b8df4f462-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Aug 20 14:01 scsi-3600508b1001c1054a4cee49b8df4f462-part5 -> ../../sda5
lrwxrwxrwx 1 root root 9 Aug 20 14:18 usb-SMI_USB_MEMORY_BAR-0:0 -> ../../sdb
lrwxrwxrwx 1 root root 9 Aug 20 14:01 wwn-0x600508b1001c1054a4cee49b8df4f462 -> ../../sda
lrwxrwxrwx 1 root root 10 Aug 20 14:01 wwn-0x600508b1001c1054a4cee49b8df4f462-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Aug 20 14:01 wwn-0x600508b1001c1054a4cee49b8df4f462-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Aug 20 14:01 wwn-0x600508b1001c1054a4cee49b8df4f462-part5 -> ../../sda5
它确实出现在 usb 设备列表中
root@seba1:/dev/disk/by-id# usb-devices
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 2
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev=04.04
S: Manufacturer=Linux 4.4.0-159-generic ehci_hcd
S: Product=EHCI Host Controller
S: SerialNumber=0000:00:1a.0
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 6
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=8087 ProdID=0024 Rev=00.00
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
T: Bus=01 Lev=02 Prnt=02 Port=05 Cnt=01 Dev#= 4 Spd=480 MxCh= 0
D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=090c ProdID=3267 Rev=01.00
S: Manufacturer=Silicon Motion,Inc.
S: Product=SM3269AB MEMORY BAR
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
我可以在 dmesg 中看到它
[ 1005.556418] usb 1-1.6: new high-speed USB device number 4 using ehci-pci
[ 1005.709375] usb 1-1.6: New USB device found, idVendor=090c, idProduct=3267
[ 1005.709382] usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1005.709386] usb 1-1.6: Product: SM3269AB MEMORY BAR
[ 1005.709390] usb 1-1.6: Manufacturer: Silicon Motion,Inc.
[ 1005.710451] usb-storage 1-1.6:1.0: USB Mass Storage device detected
[ 1005.710720] scsi host4: usb-storage 1-1.6:1.0
[ 1006.709965] scsi 4:0:0:0: Direct-Access SMI USB MEMORY BAR 1000 PQ: 0 ANSI: 5
[ 1006.710898] sd 4:0:0:0: Attached scsi generic sg3 type 0
[ 1006.713395] sd 4:0:0:0: [sdb] Attached SCSI removable disk
尝试挂载失败
root@seba1:~# mount -t ntfs /dev/sdb /media/kevUSB
Error opening '/dev/sdb': No medium found
Failed to mount '/dev/sdb': No medium found
我如何安装该驱动器?
答案1
您有驱动器 ( /dev/sdb
)。您可以查看其文件系统lsblk -f
,然后读取man fsck
。man fsck.{filesystem}
然后man mount
以下是mount
我的VFAT
mp3 播放器的使用方法:
walt@bat:~(0)$ bash -x bin/fixmp3 /dev/sdb
+ # setup and arg parsing omitted ...
+ target=/dev/sdb
+ mntdir=/home/walt/mnt/mp3/sdb
+ [[ -d /home/walt/mnt/mp3/sdb ]]
+ sudo umount /dev/sdb
umount: /dev/sdb: not mounted
+ sudo fsck.vfat -w -y /dev/sdb
fsck.fat 3.0.28 (2015-05-16)
/dev/sdb: 206 files, 108052/958507 clusters
+ sudo mount -t vfat -o rw,user,users,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2 /dev/sdb /home/walt/mnt/mp3/sdb
+ [[ 0 -gt 0 ]]
+ exit 0