Solution to read-only USB flash drive files in Ubuntu

Source: Internet
Author: User
The file system read-only problem occurs on the USB flash drive under Ubuntu. The problem is that existing files in the USB flash drive cannot be deleted and new files cannot be copied to the USB flash drive. But I don't know why. Today, I am determined to solve this problem. Solution: 1. Run the following command on the Ubuntu terminal: tail-f/var/log/syslog2. insert a USB flash drive with a read-only file system failure. 3. Observe the command line output part as follows: Jul816

The file system read-only problem occurs on the USB flash drive under Ubuntu. The problem is that existing files in the USB flash drive cannot be deleted and new files cannot be copied to the USB flash drive. But I don't know why. Today, I am determined to solve this problem.

Solution:

1. Run the following command on the Ubuntu terminal:

Tail-f/var/log/syslog 2. Insert a USB flash drive with a read-only file system failure

3. Observe the command line output

The output part is as follows:

Jul 8 16:44:50 cslouis-pc kernel: [15595.155904] FAT: Filesystem error (dev sdb4)

Jul 8 16:44:50 cslouis-pc kernel: [15595.155905] fat_get_cluster: invalid cluster chain (I _pos 0)

From the above we can see that the file system mounted to the U disk is/dev/sdb4, and the file system is faulty (FAT: Filesystem error)

4. Enter the following command:

Umount/media/ZCF (ZCF is your USB flash drive name, which can be viewed by ls in the media Directory)

5. Fixed USB flash drive file system faults

Sudo dosfsck-v-a/dev/sdb4

After the above five steps, the USB flash drive can restore the read/write function.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.