Linux下BUG系列:ubuntu16.04下U盘变只读Read-Only修复

Linux下BUG系列:ubuntu16.04下U盘变只读Read-Only

有时在ubuntu16.04下使用U盘发现无法写入,多次拔插无效,但是Upan明明在Win下用得好好的啊。。

修复

执行命令

tail -f /var/log/syslog

在系统日志中可以看到你的U盘插入的消息

Jul 16 15:18:22 lowfree02 gnome-session[1701]: (nautilus:3868): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
Jul 16 15:18:22 lowfree02 gnome-session[1701]: (nautilus:3868): GLib-GObject-WARNING **: invalid (NULL) pointer instance
Jul 16 15:18:22 lowfree02 gnome-session[1701]: (nautilus:3868): GLib-GObject-CRITICAL **: g_signal_connect_object: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
Jul 16 15:18:22 lowfree02 dbus[697]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
Jul 16 15:18:22 lowfree02 systemd[1]: Starting Hostname Service...
Jul 16 15:18:22 lowfree02 dbus[697]: [system] Successfully activated service 'org.freedesktop.hostname1'
Jul 16 15:18:22 lowfree02 systemd[1]: Started Hostname Service.
Jul 16 15:18:23 lowfree02 org.gnome.Nautilus[1547]: (nautilus:3676): GLib-GIO-CRITICAL **: g_file_get_parse_name: assertion 'G_IS_FILE (file)' failed
Jul 16 15:18:23 lowfree02 kernel: [23859.535467] FAT-fs (sdb4): error, corrupted directory (invalid entries)
Jul 16 15:18:23 lowfree02 kernel: [23859.535471] FAT-fs (sdb4): Filesystem has been set read-only

从最后一行看到:

Jul 16 15:18:23 lowfree02 kernel: [23859.535471] FAT-fs (sdb4): Filesystem has been set read-only

记下U盘盘符sdb4
另外要知道自己U盘的挂载名,一般在/media下可看到,然后将其umount

# ls /media
lowfree
# umount /media/lowfree/Ubuntu\ 16.0/

然后再修复一下

# sudo dosfsck -v -a /dev/sdb4

最后再重新挂载或重新拔插一下即可~

你可能感兴趣的:(Linux)