[SOLVED] External HDD drive in read only mode (ext4)

Message
Author
User avatar
-iak-
Posts: 124
Joined: Thu Nov 19, 2020 9:08 pm

[SOLVED] External HDD drive in read only mode (ext4)

#1 Post by -iak- »

Hello everybody,

I believe that my USB drive has accidentally disconnected while the system was writing something on it, maybe the wire became faulty lately. All data seem to be fine, but everything is in read-only mode. Tried to change all files permissions with chmod but it doesn't work. So I unmounted it and tried this:

Code: Select all

rawyak@zenbook:~
$ sudo dosfsck -a /dev/sda1
fsck.fat 4.2 (2021-01-31)
Logical sector size is zero.
Now I don't know what to do. Is there a way to recover the filesystem without compromising the data?
Last edited by -iak- on Tue Dec 06, 2022 5:23 pm, edited 1 time in total.

Huckleberry Finn

Re: External HDD drive in read only mode (ext4)

#2 Post by Huckleberry Finn »

Unmount it first :

Code: Select all

sudo umount /dev/sdX
Then:

Code: Select all

sudo hdparm -r0 /dev/sdX

(i.e. if it still shows as sda in your case: replace sdX with sda )

___________________________

In the meantime: It says ext4 in the title. If so why did you use dosfsck ?
man dosfsck wrote:
Description
dosfsck verifies the consistency of MS-DOS file systems and optionally tries to repair them.
You need this (assuming it's ext4):

Code: Select all

sudo e2fsck -fyvC0 /dev/sda1
(again, assuming it's sda1 )

User avatar
-iak-
Posts: 124
Joined: Thu Nov 19, 2020 9:08 pm

Re: External HDD drive in read only mode (ext4)

#3 Post by -iak- »

Huckleberry Finn wrote: Tue Dec 06, 2022 11:32 am
In the meantime: It says ext4 in the title. If so why did you use dosfsck ?
Your suggestion worked as a charm, thank you. I used dosfsck because I found it on a guide but I don't know that tool.

Huckleberry Finn

Re: [SOLVED] External HDD drive in read only mode (ext4)

#4 Post by Huckleberry Finn »

Thank you, too for the feedback :)

Post Reply

Return to “Hardware /Configuration”