我如何更改只读 U 盘的设置?

我如何更改只读 U 盘的设置?
pm@pm-desktop:~$ sudo lsblk -f
NAME           FSTYPE  LABEL UUID                                   MOUNTPOINT
sdb                                                                 
└─sdb1         ntfs          80060C87060C8100                       /media/pm/80
sr0                                                                 
sda                                                                 
├─sda2                                                              
├─sda5         crypto_       e47293da-ef9b-4299-a0b5-e46339213365   
│ └─sda5_crypt LVM2_me       hoVHG1-FRUq-b6x1-dLl1-B1i8-8joH-MAKNkG 

    pm@pm-desktop:~$ sudo lsblk -m
NAME                      SIZE OWNER GROUP MODE
sdb                      14.9G root  disk  brw-rw----
└─sdb1                   14.9G root  disk  brw-rw----
sr0                      1024M root  cdrom brw-rw----
sda                     465.8G root  disk  brw-rw----
├─sda2                      1K root  disk  brw-rw----
├─sda5                  465.3G root  disk  brw-rw----
│ └─sda5_crypt          465.3G root  disk  brw-rw----
│   ├─ubuntu--vg-root   463.3G root  disk  brw-rw----
│   └─ubuntu--vg-swap_1     2G root  disk  brw-rw----
└─sda1                    487M root  disk  brw-rw----

│   ├─ubuntu--vg-root
│   │          ext4          39a158a9-1eec-40d7-9edd-6c659f296210   /
│   └─ubuntu--vg-swap_1
│              swap          0f5d2da1-3bbe-439e-8b20-9097be917a36   [SWAP]
└─sda1         ext2          b76e49df-ef33-41cd-9201-dbc718f40ecc   /boot

pm@pm-desktop:~$ sudo parted -ls
Model: ATA ST3500418AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type      File system  Flags
 1      1049kB  512MB  511MB  primary   ext2         boot
 2      513MB   500GB  500GB  extended
 5      513MB   500GB  500GB  logical


Warning: Unable to open /dev/sdb read-write (Read-only file system).  /dev/sdb has been opened read-only.
Model: SanDisk Cruzer Switch (scsi)
Disk /dev/sdb: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  16.0GB  16.0GB  primary  ntfs


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/ubuntu--vg-root: 497GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags: 

Number  Start  End    Size   File system  Flags
 1      0.00B  497GB  497GB  ext4


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/ubuntu--vg-swap_1: 2110MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags: 

Number  Start  End     Size    File system     Flags
 1      0.00B  2110MB  2110MB  linux-swap(v1)


Error: /dev/mapper/sda5_crypt: unrecognised disk label
Model: Linux device-mapper (crypt) (dm)
Disk /dev/mapper/sda5_crypt: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags: 
pm@pm-desktop:~$ df -h  
Filesystem                   Size  Used Avail Use% Mounted on
udev                         961M     0  961M   0% /dev
tmpfs                        198M  6.2M  192M   4% /run
/dev/mapper/ubuntu--vg-root  456G   16G  418G   4% /
tmpfs                        987M   19M  969M   2% /dev/shm
tmpfs                        5.0M  4.0K  5.0M   1% /run/lock
tmpfs                        987M     0  987M   0% /sys/fs/cgroup
/dev/sda1                    472M  136M  312M  31% /boot
tmpfs                        198M   72K  198M   1% /run/user/1000
/dev/sdb1                     15G  8.7G  6.3G  59% /media/pm/80060C87060C8100

答案1

USB 闪存盘如下所示:

$ sudo parted -ls

Warning: Unable to open /dev/sdb read-write (Read-only file system).  /dev/sdb has been opened read-only.
Model: SanDisk Cruzer Switch (scsi)
Disk /dev/sdb: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

$ sudo lsblk -f
NAME           FSTYPE  LABEL UUID                                   MOUNTPOINT
sdb                                                                 
└─sdb1         ntfs          80060C87060C8100                       /media/pm/80...
sr0                                                                 

sudo lsblk -m
NAME                      SIZE OWNER GROUP MODE
sdb                      14.9G root  disk  brw-rw----
└─sdb1                   14.9G root  disk  brw-rw----

并安装为

$ df -h  
Filesystem                   Size  Used Avail Use% Mounted on
/dev/sdb1                     15G  8.7G  6.3G  59% /media/pm/80060C87060C8100

具有只读权限。只读状态可能有不同的原因。


如果U盘中有重要文件,请备份(在开始任何修复操作之前,将它们复制到另一个驱动器)。


可能是NTFS文件系统损坏,需要用Windows工具修复,无论是 Windows 中的图形工具,还是

chkdsk /f X:

其中 X: 是 Windows 所看到的卷 ID。有关更多详细信息,请参阅此链接,

修复 U 盘的分区表和文件系统

尝试修复文件系统后,您可以在 Ubuntu 中重试。如果仍然不想以读写方式挂载,您可以按照以下步骤尝试AskUbuntu 回答,

使用自定义权限和所有者在 USB 驱动器中安装 NTFS 分区

相关内容