解決u盤為只讀的方法
阿新 • • 發佈:2018-12-10
首先執行命令:
tail -f /var/log/syslog
然後插入有問題的U盤,tail會列印一些log:
Dec 6 17:31:53 raj-XPS-8930 kernel: [31581.102997] sd 8:0:0:0: [sde] Write Protect is off Dec 6 17:31:53 raj-XPS-8930 kernel: [31581.103001] sd 8:0:0:0: [sde] Mode Sense: 23 00 00 00 Dec 6 17:31:53 raj-XPS-8930 kernel: [31581.103598] sd 8:0:0:0: [sde] No Caching mode page found Dec 6 17:31:53 raj-XPS-8930 kernel: [31581.103603] sd 8:0:0:0: [sde] Assuming drive cache: write through Dec 6 17:31:53 raj-XPS-8930 kernel: [31581.109415] sde: sde1 Dec 6 17:31:53 raj-XPS-8930 kernel: [31581.112218] sd 8:0:0:0: [sde] Attached SCSI removable disk Dec 6 17:31:54 raj-XPS-8930 kernel: [31581.395372] FAT-fs (sde1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck. Dec 6 17:31:54 raj-XPS-8930 systemd[1]: Started Clean the /media/raj/UBUNTU 18_0 mount point. Dec 6 17:31:54 raj-XPS-8930 udisksd[1274]: Mounted /dev/sde1 at /media/raj/UBUNTU 18_0 on behalf of uid 1000
最後標明瞭u盤的名字,出現了一些掛在錯誤
umount /media/(U盤被掛在後的名字)
sudo dosfsck -v -a /dev/sde1
修復後,u盤能正常讀寫。