Fix read only file system usb
I have a usb flash memory which I can't do anything on it because its read only:
sudo fdisk -l
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 7864319 7862272 3.8G b W95 FAT32
I've tried to fix file system with mkfs
and I got this :
sudo mkfs.fat -F 32 /dev/sdc1
mkfs.fat 3.0.28 (2015-05-16)
mkfs.fat: unable to open /dev/sdc1: Read-only file system
How can I fix this?
ubuntu filesystems flash-memory
bumped to the homepage by Community♦ 9 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 4 more comments
I have a usb flash memory which I can't do anything on it because its read only:
sudo fdisk -l
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 7864319 7862272 3.8G b W95 FAT32
I've tried to fix file system with mkfs
and I got this :
sudo mkfs.fat -F 32 /dev/sdc1
mkfs.fat 3.0.28 (2015-05-16)
mkfs.fat: unable to open /dev/sdc1: Read-only file system
How can I fix this?
ubuntu filesystems flash-memory
bumped to the homepage by Community♦ 9 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
The commandmount
(probably as root) is the one to use to change mounted filesystem state, notmkfs
.
– Isaac
Dec 18 '17 at 19:35
2
Is this a sandisk usb? Some have a hardware 'safety lock' that locks the usb to read-only in the event of a usb power fluctuation. I had one that did this and had to be returned, though they replaced it FOC.
– bu5hman
Dec 18 '17 at 20:43
Is it plugged into a USB 3.0 socket (the blue kind)? I have a 4 GB flash drive that mounts as read-only when connected to USB 3.0, but I can write to it when I use the older USB sockets on the same computer (running Xubuntu 16.04).
– Gaultheria
Dec 18 '17 at 21:46
we have same distro but unfortunately my laptop does not have any USB 2.0 socket.I will try it on another laptop .Thanks
– ali73
Dec 19 '17 at 7:31
1
Have you read unix.stackexchange.com/questions/74090/… is proposesblockdev --setrw
orhdparm -r 0
– Sandburg
May 20 at 20:26
|
show 4 more comments
I have a usb flash memory which I can't do anything on it because its read only:
sudo fdisk -l
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 7864319 7862272 3.8G b W95 FAT32
I've tried to fix file system with mkfs
and I got this :
sudo mkfs.fat -F 32 /dev/sdc1
mkfs.fat 3.0.28 (2015-05-16)
mkfs.fat: unable to open /dev/sdc1: Read-only file system
How can I fix this?
ubuntu filesystems flash-memory
I have a usb flash memory which I can't do anything on it because its read only:
sudo fdisk -l
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 7864319 7862272 3.8G b W95 FAT32
I've tried to fix file system with mkfs
and I got this :
sudo mkfs.fat -F 32 /dev/sdc1
mkfs.fat 3.0.28 (2015-05-16)
mkfs.fat: unable to open /dev/sdc1: Read-only file system
How can I fix this?
ubuntu filesystems flash-memory
ubuntu filesystems flash-memory
edited Dec 18 '17 at 19:42
SouravGhosh
411310
411310
asked Dec 18 '17 at 19:20
ali73
6115
6115
bumped to the homepage by Community♦ 9 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 9 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
The commandmount
(probably as root) is the one to use to change mounted filesystem state, notmkfs
.
– Isaac
Dec 18 '17 at 19:35
2
Is this a sandisk usb? Some have a hardware 'safety lock' that locks the usb to read-only in the event of a usb power fluctuation. I had one that did this and had to be returned, though they replaced it FOC.
– bu5hman
Dec 18 '17 at 20:43
Is it plugged into a USB 3.0 socket (the blue kind)? I have a 4 GB flash drive that mounts as read-only when connected to USB 3.0, but I can write to it when I use the older USB sockets on the same computer (running Xubuntu 16.04).
– Gaultheria
Dec 18 '17 at 21:46
we have same distro but unfortunately my laptop does not have any USB 2.0 socket.I will try it on another laptop .Thanks
– ali73
Dec 19 '17 at 7:31
1
Have you read unix.stackexchange.com/questions/74090/… is proposesblockdev --setrw
orhdparm -r 0
– Sandburg
May 20 at 20:26
|
show 4 more comments
The commandmount
(probably as root) is the one to use to change mounted filesystem state, notmkfs
.
– Isaac
Dec 18 '17 at 19:35
2
Is this a sandisk usb? Some have a hardware 'safety lock' that locks the usb to read-only in the event of a usb power fluctuation. I had one that did this and had to be returned, though they replaced it FOC.
– bu5hman
Dec 18 '17 at 20:43
Is it plugged into a USB 3.0 socket (the blue kind)? I have a 4 GB flash drive that mounts as read-only when connected to USB 3.0, but I can write to it when I use the older USB sockets on the same computer (running Xubuntu 16.04).
– Gaultheria
Dec 18 '17 at 21:46
we have same distro but unfortunately my laptop does not have any USB 2.0 socket.I will try it on another laptop .Thanks
– ali73
Dec 19 '17 at 7:31
1
Have you read unix.stackexchange.com/questions/74090/… is proposesblockdev --setrw
orhdparm -r 0
– Sandburg
May 20 at 20:26
The command
mount
(probably as root) is the one to use to change mounted filesystem state, not mkfs
.– Isaac
Dec 18 '17 at 19:35
The command
mount
(probably as root) is the one to use to change mounted filesystem state, not mkfs
.– Isaac
Dec 18 '17 at 19:35
2
2
Is this a sandisk usb? Some have a hardware 'safety lock' that locks the usb to read-only in the event of a usb power fluctuation. I had one that did this and had to be returned, though they replaced it FOC.
– bu5hman
Dec 18 '17 at 20:43
Is this a sandisk usb? Some have a hardware 'safety lock' that locks the usb to read-only in the event of a usb power fluctuation. I had one that did this and had to be returned, though they replaced it FOC.
– bu5hman
Dec 18 '17 at 20:43
Is it plugged into a USB 3.0 socket (the blue kind)? I have a 4 GB flash drive that mounts as read-only when connected to USB 3.0, but I can write to it when I use the older USB sockets on the same computer (running Xubuntu 16.04).
– Gaultheria
Dec 18 '17 at 21:46
Is it plugged into a USB 3.0 socket (the blue kind)? I have a 4 GB flash drive that mounts as read-only when connected to USB 3.0, but I can write to it when I use the older USB sockets on the same computer (running Xubuntu 16.04).
– Gaultheria
Dec 18 '17 at 21:46
we have same distro but unfortunately my laptop does not have any USB 2.0 socket.I will try it on another laptop .Thanks
– ali73
Dec 19 '17 at 7:31
we have same distro but unfortunately my laptop does not have any USB 2.0 socket.I will try it on another laptop .Thanks
– ali73
Dec 19 '17 at 7:31
1
1
Have you read unix.stackexchange.com/questions/74090/… is proposes
blockdev --setrw
or hdparm -r 0
– Sandburg
May 20 at 20:26
Have you read unix.stackexchange.com/questions/74090/… is proposes
blockdev --setrw
or hdparm -r 0
– Sandburg
May 20 at 20:26
|
show 4 more comments
1 Answer
1
active
oldest
votes
Make sure you are performing filesystem management actions with escalated privileges. Most systems do not let users modify filesystems.
Ensure the device isn't already mounted. As root, execute
lsblk
and look for any filesystems using/dev/sdc1
. If it is mounted you will have to unmount prior to formatting with mkfs.Make sure the device is not a read-only UFD. Though uncommon, these do exist ... usually as hand-outs from vendor booths with product sheets or other vendor info on them.
Quick walkthrough of steps
- Verify you are performing all tasks as root. Best way is to simply open a shell as root: In a terminal, execute
sudo -i
is usually the easiest way. - Unmount the device with
umount /dev/sdc1
(may give error info if it is not mounted, no worries if this happens)
VVV WARNING THIS WILL DESTROY ALL DATA ON THE DEVICE VVV
- Format the device
mkfs.vfat /dev/sdc1
(you can force 32bit size if you wish, but mkfs will select whatever fits best for the size of the volume)
If this does not work, you may want to wipe the device, recreate the partition with fdisk, and try again:
wipefs -a /dev/sdc
Again, this will destroy any remaining data. You have been warned.
I unmount it before I use these commands.
– ali73
Dec 18 '17 at 19:46
3
wipefs also invokes error read only file system
– ali73
Dec 19 '17 at 7:28
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f411647%2ffix-read-only-file-system-usb%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Make sure you are performing filesystem management actions with escalated privileges. Most systems do not let users modify filesystems.
Ensure the device isn't already mounted. As root, execute
lsblk
and look for any filesystems using/dev/sdc1
. If it is mounted you will have to unmount prior to formatting with mkfs.Make sure the device is not a read-only UFD. Though uncommon, these do exist ... usually as hand-outs from vendor booths with product sheets or other vendor info on them.
Quick walkthrough of steps
- Verify you are performing all tasks as root. Best way is to simply open a shell as root: In a terminal, execute
sudo -i
is usually the easiest way. - Unmount the device with
umount /dev/sdc1
(may give error info if it is not mounted, no worries if this happens)
VVV WARNING THIS WILL DESTROY ALL DATA ON THE DEVICE VVV
- Format the device
mkfs.vfat /dev/sdc1
(you can force 32bit size if you wish, but mkfs will select whatever fits best for the size of the volume)
If this does not work, you may want to wipe the device, recreate the partition with fdisk, and try again:
wipefs -a /dev/sdc
Again, this will destroy any remaining data. You have been warned.
I unmount it before I use these commands.
– ali73
Dec 18 '17 at 19:46
3
wipefs also invokes error read only file system
– ali73
Dec 19 '17 at 7:28
add a comment |
Make sure you are performing filesystem management actions with escalated privileges. Most systems do not let users modify filesystems.
Ensure the device isn't already mounted. As root, execute
lsblk
and look for any filesystems using/dev/sdc1
. If it is mounted you will have to unmount prior to formatting with mkfs.Make sure the device is not a read-only UFD. Though uncommon, these do exist ... usually as hand-outs from vendor booths with product sheets or other vendor info on them.
Quick walkthrough of steps
- Verify you are performing all tasks as root. Best way is to simply open a shell as root: In a terminal, execute
sudo -i
is usually the easiest way. - Unmount the device with
umount /dev/sdc1
(may give error info if it is not mounted, no worries if this happens)
VVV WARNING THIS WILL DESTROY ALL DATA ON THE DEVICE VVV
- Format the device
mkfs.vfat /dev/sdc1
(you can force 32bit size if you wish, but mkfs will select whatever fits best for the size of the volume)
If this does not work, you may want to wipe the device, recreate the partition with fdisk, and try again:
wipefs -a /dev/sdc
Again, this will destroy any remaining data. You have been warned.
I unmount it before I use these commands.
– ali73
Dec 18 '17 at 19:46
3
wipefs also invokes error read only file system
– ali73
Dec 19 '17 at 7:28
add a comment |
Make sure you are performing filesystem management actions with escalated privileges. Most systems do not let users modify filesystems.
Ensure the device isn't already mounted. As root, execute
lsblk
and look for any filesystems using/dev/sdc1
. If it is mounted you will have to unmount prior to formatting with mkfs.Make sure the device is not a read-only UFD. Though uncommon, these do exist ... usually as hand-outs from vendor booths with product sheets or other vendor info on them.
Quick walkthrough of steps
- Verify you are performing all tasks as root. Best way is to simply open a shell as root: In a terminal, execute
sudo -i
is usually the easiest way. - Unmount the device with
umount /dev/sdc1
(may give error info if it is not mounted, no worries if this happens)
VVV WARNING THIS WILL DESTROY ALL DATA ON THE DEVICE VVV
- Format the device
mkfs.vfat /dev/sdc1
(you can force 32bit size if you wish, but mkfs will select whatever fits best for the size of the volume)
If this does not work, you may want to wipe the device, recreate the partition with fdisk, and try again:
wipefs -a /dev/sdc
Again, this will destroy any remaining data. You have been warned.
Make sure you are performing filesystem management actions with escalated privileges. Most systems do not let users modify filesystems.
Ensure the device isn't already mounted. As root, execute
lsblk
and look for any filesystems using/dev/sdc1
. If it is mounted you will have to unmount prior to formatting with mkfs.Make sure the device is not a read-only UFD. Though uncommon, these do exist ... usually as hand-outs from vendor booths with product sheets or other vendor info on them.
Quick walkthrough of steps
- Verify you are performing all tasks as root. Best way is to simply open a shell as root: In a terminal, execute
sudo -i
is usually the easiest way. - Unmount the device with
umount /dev/sdc1
(may give error info if it is not mounted, no worries if this happens)
VVV WARNING THIS WILL DESTROY ALL DATA ON THE DEVICE VVV
- Format the device
mkfs.vfat /dev/sdc1
(you can force 32bit size if you wish, but mkfs will select whatever fits best for the size of the volume)
If this does not work, you may want to wipe the device, recreate the partition with fdisk, and try again:
wipefs -a /dev/sdc
Again, this will destroy any remaining data. You have been warned.
edited Dec 18 '17 at 20:06
answered Dec 18 '17 at 19:29
0xSheepdog
1,1151521
1,1151521
I unmount it before I use these commands.
– ali73
Dec 18 '17 at 19:46
3
wipefs also invokes error read only file system
– ali73
Dec 19 '17 at 7:28
add a comment |
I unmount it before I use these commands.
– ali73
Dec 18 '17 at 19:46
3
wipefs also invokes error read only file system
– ali73
Dec 19 '17 at 7:28
I unmount it before I use these commands.
– ali73
Dec 18 '17 at 19:46
I unmount it before I use these commands.
– ali73
Dec 18 '17 at 19:46
3
3
wipefs also invokes error read only file system
– ali73
Dec 19 '17 at 7:28
wipefs also invokes error read only file system
– ali73
Dec 19 '17 at 7:28
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f411647%2ffix-read-only-file-system-usb%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
The command
mount
(probably as root) is the one to use to change mounted filesystem state, notmkfs
.– Isaac
Dec 18 '17 at 19:35
2
Is this a sandisk usb? Some have a hardware 'safety lock' that locks the usb to read-only in the event of a usb power fluctuation. I had one that did this and had to be returned, though they replaced it FOC.
– bu5hman
Dec 18 '17 at 20:43
Is it plugged into a USB 3.0 socket (the blue kind)? I have a 4 GB flash drive that mounts as read-only when connected to USB 3.0, but I can write to it when I use the older USB sockets on the same computer (running Xubuntu 16.04).
– Gaultheria
Dec 18 '17 at 21:46
we have same distro but unfortunately my laptop does not have any USB 2.0 socket.I will try it on another laptop .Thanks
– ali73
Dec 19 '17 at 7:31
1
Have you read unix.stackexchange.com/questions/74090/… is proposes
blockdev --setrw
orhdparm -r 0
– Sandburg
May 20 at 20:26