usb无法打开/dev/sdb 读写( 只读文件系统)

分享于 

5分钟阅读

ubuntu

  繁體

问题

我无法格式化它,下面是我得到的


GParted 0.11.0 --enable-libparted-dmraid



Libparted 2.3



Delete /dev/sdb1 (fat32, 14.91 GiB) from /dev/sdb 00:00:00 ( ERROR )



calibrate /dev/sdb1 00:00:00 ( SUCCESS )



path: /dev/sdb1


start: 32


end: 31,266,815


size: 31,266,784 (14.91 GiB)


delete partition 00:00:00 ( ERROR )


libparted messages ( INFO )



Unable to open /dev/sdb read-write (Read-only file system). /dev/sdb has been opened read-only.


Unable to open /dev/sdb read-write (Read-only file system). /dev/sdb has been opened read-only.


Unable to open /dev/sdb read-write (Read-only file system). /dev/sdb has been opened read-only.


Unable to open /dev/sdb read-write (Read-only file system). /dev/sdb has been opened read-only.


Unable to open /dev/sdb read-write (Read-only file system). /dev/sdb has been opened read-only.


Can't write to /dev/sdb, because it is opened read-only.


Unable to open /dev/sdb read-write (Read-only file system). /dev/sdb has been opened read-only.



dmesg的输出


[10061.878073] usb 2-1.3: new high-speed USB device number 8 using ehci_hcd


[10061.972140] scsi9 : usb-storage 2-1.3:1.0


[10062.969922] scsi 9:0:0:0: Direct-Access SanDisk Cruzer Blade 1.20 PQ: 0 ANSI: 5


[10062.971746] sd 9:0:0:0: Attached scsi generic sg2 type 0


[10062.972799] sd 9:0:0:0: [sdb] 31266816 512-byte logical blocks: (16.0 GB/14.9 GiB)


[10062.976439] sd 9:0:0:0: [sdb] Write Protect is on


[10062.976453] sd 9:0:0:0: [sdb] Mode Sense: 43 00 80 00


[10062.977353] sd 9:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA


[10062.999026] sdb: sdb1


[10063.003367] sd 9:0:0:0: [sdb] Attached SCSI removable disk



fsck的输出


sudo fsck -n /dev/sdb


fsck from util-linux 2.20.1


e2fsck 1.42 (29-Nov-2011)


fsck.ext2: Device or resource busy while trying to open /dev/sdb


Filesystem mounted or opened exclusively by another program?



sudo fdisk -l /dev/sdb 的输出


Disk /dev/sdb1: 16.0 GB, 16008593408 bytes


64 heads, 32 sectors/track, 15266 cylinders, total 31266784 sectors


Units = sectors of 1 * 512 = 512 bytes


Sector size (logical/physical): 512 bytes / 512 bytes


I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk identifier: 0x6f20736b



This doesn't look like a partition table


Probably you selected the wrong device.



 Device Boot Start End Blocks Id System


/dev/sdb1p1 ? 778135908 1919645538 570754815+ 72 Unknown


/dev/sdb1p2 ? 168689522 2104717761 968014120 65 Novell Netware 386


/dev/sdb1p3 ? 1869881465 3805909656 968014096 79 Unknown


/dev/sdb1p4 ? 2885681152 2885736650 27749+ d Unknown



Partition table entries are not in disk order




答案1

首先尝试命令 sudo hdparm -r0 /dev/sdb 然后尝试重新挂载rw分区,


答案2

SD卡侧面的小锁开关移到了"lock"。


答案3

要检查挂载的权限,可以使用:


ls -ld /path/to/target



如果是权限问题,可以解决,它可以使用chmod来更改权限,或者递归地更改所有权,这是我如下所示的:


sudo chown <username>:<groupname> -R /path/to/target



现在,如果需要,还可以使用chmod设置权限:


find /path/to/target -type f -execdir chmod 666 -Rv {} +




find /path/to/target -type d -execdir chmod 777 -Rv {} +




文件  SYS  系统  USB  读写