linux修复U盘只读权限

1、查看盘符

查看U盘对应的盘符:  df -h 

kylin@kylin:~/Download/deb包/ventoy-1.0.11$ df -h
文件系统        容量  已用  可用 已用% 挂载点
udev            3.9G     0  3.9G    0% /dev
tmpfs           785M  3.4M  782M    1% /run
...        ...   ...   ...     ...
/dev/sdb6       146G   63G   77G   46% /home
tmpfs           785M   48K  785M    1% /run/user/1000
/dev/sdc1        58G   32K   58G    1% /media/kylin/ven

2、卸载U盘:

 我的U盘盘符为dev/sdc1(不确定的话,可以使用命令对比下插入前后的区别),先卸载U盘

kylin@kylin:~/Download/deb包/ventoy-1.0.11$ sudo umount /media/kylin/ven

3、修复U盘:

使用命令进行修复: sudo dosfsck -v -a 对应路径  

kylin@kylin:~/Download/deb包/ventoy-1.0.11$ sudo dosfsck -v -a /dev/sdc1
fsck.fat 4.1 (2017-01-24)
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "mkfs.fat"
Media byte 0xf8 (hard disk)
       512 bytes per logical sector
     32768 bytes per cluster
        64 reserved sectors
First FAT starts at byte 32768 (sector 64)
         2 FATs, 32 bit entries
   7569408 bytes per FAT (= 14784 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 15171584 (sector 29632)
   1886688 data clusters (61822992384 bytes)
32 sectors/track, 64 heads
      2048 hidden sectors
 120777716 sectors total
Reclaiming unconnected clusters.
Checking free cluster summary.
/dev/sdc1: 1 files, 1/1886688 clusters

之后就可以使用了,大功告成!

posted @ 2021-11-15 22:54  繁华无殇  阅读(815)  评论(0编辑  收藏  举报