加载中…
正文 字体大小:

ubuntu u盘出现 read-only 的解决方法

(2014-09-22 15:05:30)
标签:

健康

分类: 生活有时
百度了半天没找到,google一下子就搞定了,度娘真是害死人。
原文链接:
http://sharadchhetri.com/2013/12/19/how-to-fix-read-only-usb-pen-drive-in-ubuntu/

How to fix read only USB pen drive in Ubuntu

While copying some large file I mistakenly taken out USB pen drive before the copy get completed.Later I again attached the USB pen drive in Ubuntu system but found that the USB pen drive showing read only filesystem message. I was not able to copy,create and delete any file.To solve this issue I followed some steps which I am sharing with this post.

To fix USB pen drive read only in Ubuntu,follow the given below steps

Step 1: Attach USB pen drive in system’s USB port. Automatically the Ubuntu will mount the USB pen drive and show icon on Desktop or Menu bar.

Open the terminal and become super user by running below given command

 

1
sudo su -

 

Step 2: First we have to find out in which directory the USB pen drive has been automatically mounted.For this run the df -Th command.
In given below output you can see,in my system the USB pen drive is mounted in /media/linux/C38C-099C,partition is /dev/sdd1 and filesystem is vfat.

Note: When you run df -Th command in your system,the USB pen drive may mount in different directory and the partition might also be different.Hence the output value which you will get, use the same values in further steps.

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
root@tuxworld:~# df -Th
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/sda5      ext4       28G   25G  1.3G  96% /
udev           devtmpfs  2.0G  4.0K  2.0G   1% /dev
tmpfs          tmpfs     796M  1.1M  795M   1% /run
none           tmpfs     5.0M  8.0K  5.0M   1% /run/lock
none           tmpfs     2.0G  528K  2.0G   1% /run/shm
none           tmpfs     100M  104K  100M   1% /run/user
cgroup         tmpfs     2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/sda7      ext4      9.2G  8.2G  539M  94% /partition7
/dev/sda8      ext3       46G   38G  6.2G  86% /partition8
/dev/sda9      ext3       74G   67G  3.1G  96% /partition9
/dev/sda21     ext4       14G  4.9G  8.3G  37% /partition10
/dev/sdd1      vfat       15G   12G  3.6G  77% /media/linux/C38C-099C

 

Step 2: Now unmount the directory in which the USB pen drive is automatically mounted . (As you can see mounted directory path in above ‘Step 1′)

Note: Replace the/media/linux/C38C-099C with the mounted USB pen drive directory path which is showing output in your system after running df -Th command.

 

1
umount /media/linux/C38C-099C

 

Step 3: As we know the USB pen drive got /dev/sdd1 partition
and filesystem is vfat(see in Step 1). Now we will run dosfsck command to check and repair the filesystem

Note: The dosfsck command check and repair MS-DOS filesystems.Because the filesystem of USB pen drive is vfat hence we are using this command

 

1
dosfsck -a /dev/sdd1

 

Step 4: After the dosfsck command get completed.Remove the USB pen drive from system and then re-attach back to system.Now your USB pen drive should working and it should not have read only filesystem.

Note** After mounting the USB pen drive you may see a new file with extension .REC which was created because of dosfsck command.

0

阅读 评论 收藏 转载 喜欢 打印举报
已投稿到:
  • 评论加载中,请稍候...
发评论

    发评论

    以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

      

    新浪BLOG意见反馈留言板 不良信息反馈 电话:4006900000 提示音后按1键(按当地市话标准计费) 欢迎批评指正

    新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 会员注册 | 产品答疑

    新浪公司 版权所有