You are not logged in.

#1 2024-01-11 17:57:53

slavekrouta
Member
Registered: 2024-01-11
Posts: 5

USB is read-only after a power outage while powering off?

Hi,
I have an Arch system on my USB disk and I never had any problems at all with it, but recently, I was powering the machine off and the power went suddenly out and so did the computer. the computer has a dead battery and the power in the laptop went out because the cable somehow dropped out of the charger. (my english is bad sorry). Now, when I boot from it, it throws me into the emergency shell because the filesystem is read-only. Also, when I open GNOME Disks on my Ubuntu laptop, i see the USB, but it says "Read-Only" and I cannot do anything that would modify it. Also, when I run fsck and mention the usb, it says I need to use it with the -n flag so it can run on a ro fs and when i do so, it says it has a corrupt journal superblock (same as e2fsck). i cannot even mount it.
I am not very good at usbs. please help me. EDIT: the fs is a not-encrypted ext4

Last edited by slavekrouta (2024-01-12 22:34:37)

Offline

#2 2024-01-11 18:04:24

xerxes_
Member
Registered: 2018-04-29
Posts: 1,065

Re: USB is read-only after a power outage while powering off?

Post output of 'df -h', so we would find out about filesystem type.

Offline

#3 2024-01-11 18:07:10

slavekrouta
Member
Registered: 2024-01-11
Posts: 5

Re: USB is read-only after a power outage while powering off?

see edit

Offline

#4 2024-01-11 18:20:33

d.ALT
Member
Registered: 2019-05-10
Posts: 959

Re: USB is read-only after a power outage while powering off?

slavekrouta wrote:

power went suddenly out and as did the computer

If that's been caused by an overvoltage, tension spikes maybe went through your USB port, permanently damaging you USB pendrive (or, worst, the USB port itself).

Post here output of

# dmesg -wH

while plugging-in the USB pendrive.

(anyhow, you could dd or rsync the whole old ReadOnly_USB into a new USB)


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#5 2024-01-11 18:27:37

xerxes_
Member
Registered: 2018-04-29
Posts: 1,065

Re: USB is read-only after a power outage while powering off?

Check it with command 'e2fsck -p /dev/your_ext4_partition_name'; partition name you may check by 'lsblk' command, partition have to be unmounted. If this is problem you may check it from live usb.

Offline

#6 2024-01-11 21:18:41

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,048

Re: USB is read-only after a power outage while powering off?

d.ALT wrote:

If that's been caused by an overvoltage

Might not be necessary:

I have an Arch system on my USB disk

PSA: USB keys are NOT cheap SSDs. There's no wear leveling, if you treat them like an SSD, they'll die in no time.
https://wiki.archlinux.org/title/Instal … isk_access

Offline

#7 2024-01-12 22:30:30

slavekrouta
Member
Registered: 2024-01-11
Posts: 5

Re: USB is read-only after a power outage while powering off?

Sorry, i didnt write that correctly. the computer has a dead battery and the power in the laptop went out because the cable somehow dropped out of the charger. (my english is bad sorry)

d.ALT wrote:
slavekrouta wrote:

power went suddenly out and as did the computer

If that's been caused by an overvoltage, tension spikes maybe went through your USB port, permanently damaging you USB pendrive (or, worst, the USB port itself).

Post here output of

# dmesg -wH

while plugging-in the USB pendrive.

(anyhow, you could dd or rsync the whole old ReadOnly_USB into a new USB)

the output after inserting the drive is:

[  +5,932467] usb 4-1: new SuperSpeed USB device number 3 using xhci_hcd
[  +0,026887] usb 4-1: New USB device found, idVendor=0951, idProduct=1666, bcdDevice= 1.10
[  +0,000011] usb 4-1: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[  +0,000003] usb 4-1: Product: DataTraveler 3.0
[  +0,000003] usb 4-1: Manufacturer: Kingston
[  +0,000002] usb 4-1: SerialNumber: E0D55E6CE785171099350C97
[  +0,000680] usb-storage 4-1:1.0: USB Mass Storage device detected
[  +0,000277] scsi host0: usb-storage 4-1:1.0
[  +1,006907] scsi 0:0:0:0: Direct-Access     Kingston DataTraveler 3.0 0000 PQ: 0 ANSI: 6
[  +0,001149] sd 0:0:0:0: Attached scsi generic sg0 type 0
[  +0,000032] sd 0:0:0:0: [sda] Media removed, stopped polling
[  +0,000695] sd 0:0:0:0: [sda] Attached SCSI removable disk
[  +0,005471] sd 0:0:0:0: [sda] 242155521 512-byte logical blocks: (124 GB/115 GiB)
[  +0,000228] sd 0:0:0:0: [sda] Write Protect is on
[  +0,000006] sd 0:0:0:0: [sda] Mode Sense: 23 00 80 00
[  +0,000196] sda: detected capacity change from 0 to 242155521
[  +0,012021]  sda: sda1 sda2
[  +0,442321] /dev/sda2: Can't open blockdev
[  +0,002625] EXT4-fs (sda2): INFO: recovery required on readonly filesystem
[  +0,000045] EXT4-fs (sda2): write access unavailable, cannot proceed (try mounting with noload)

Last edited by slavekrouta (2024-01-12 22:39:29)

Offline

#8 2024-01-12 22:34:37

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,048

Re: USB is read-only after a power outage while powering off?

Please use [code][/code] tags, not "quote" tags. Edit your post in this regard.

[  +0,000228] sd 0:0:0:0: [sda] Write Protect is on

The device doesn't look like t has a physical write lock, so it's probably dead.
Can you mount it readable on any other computer?

Offline

#9 2024-01-12 22:38:37

slavekrouta
Member
Registered: 2024-01-11
Posts: 5

Re: USB is read-only after a power outage while powering off?

seth wrote:

Please use [code][/code] tags, not "quote" tags. Edit your post in this regard.

[  +0,000228] sd 0:0:0:0: [sda] Write Protect is on

The device doesn't look like t has a physical write lock, so it's probably dead.
Can you mount it readable on any other computer?


I cannot. i always get this:

mount: /mnt: cannot mount /dev/sda2 read-only.

Last edited by slavekrouta (2024-01-12 22:39:01)

Offline

#10 2024-01-12 22:39:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,048

Re: USB is read-only after a power outage while powering off?

seth wrote:

PSA: USB keys are NOT cheap SSDs. There's no wear leveling, if you treat them like an SSD, they'll die in no time.
https://wiki.archlinux.org/title/Instal … isk_access

Offline

#11 2024-01-12 22:41:26

slavekrouta
Member
Registered: 2024-01-11
Posts: 5

Re: USB is read-only after a power outage while powering off?

seth wrote:
seth wrote:

PSA: USB keys are NOT cheap SSDs. There's no wear leveling, if you treat them like an SSD, they'll die in no time.
https://wiki.archlinux.org/title/Instal … isk_access

i read that already, i im still trying to remeber if i had any super-important stuff there. ill try to format somehow as a last resort

Last edited by slavekrouta (2024-01-12 22:41:57)

Offline

Board footer

Powered by FluxBB