Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Corrupted USB stick [SOLVED]

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
lospala
Posts: 116
Joined: 2023-05-31 08:32
Location: Buenoa Aires, Argentina
Has thanked: 13 times
Been thanked: 4 times

Corrupted USB stick [SOLVED]

#1 Post by lospala »

Hi

Due to an error on my side I wrote a debian DVD iso to a USB ... :oops:
So far no cure to it. I have tried with gparted and fsck (sudo fsck -r /dev/sdx1) but USB is unrecognizable
Should I consider to buy a new one?
Thanks for your help
Last edited by lospala on 2023-06-03 11:49, edited 1 time in total.

CwF
Global Moderator
Global Moderator
Posts: 2625
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 190 times

Re: Corrupted USB stick

#2 Post by CwF »

lospala wrote: 2023-06-01 19:38 but USB is unrecognizable
This is ambiguous.
if lsusb sees it, then it is up to the udev magic to enumerate it under /dev/disk.
After that it is the results of reading a device that has a mangled file system.

Code: Select all

$ lsusb

Code: Select all

$ systemd-mount --list

Random_Troll
Posts: 444
Joined: 2023-02-07 13:35
Been thanked: 105 times

Re: Corrupted USB stick

#3 Post by Random_Troll »

Try

Code: Select all

sudo wipefs -b -a /dev/sdX
Just use the drive letter, do not add a partition number. Be careful though because if you use the wrong letter you could wipe your system. If you do hose your system use the wipefs-<devname>-<offset>.bak file to restore the magic strings, as per the wipefs man page.
Jeder nach seinen Fähigkeiten, jedem nach seinen Bedürfnissen.

CwF
Global Moderator
Global Moderator
Posts: 2625
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 190 times

Re: Corrupted USB stick

#4 Post by CwF »

Random_Troll wrote: 2023-06-01 20:55 Be careful though because if you use the wrong letter you could wipe your system
Don't be careful, be specific. A better designation is /dev/disc/something specific...
The choices vary, so just look it up and see.

Code: Select all

$  ls /dev/disk
by-diskseq  by-partuuid  by-path  by-uuid
That's 4 choices, and then one with 5...

Code: Select all

$  ls -1 /dev/disk
by-id
by-label
by-partuuid
by-path
by-uuid

User avatar
lospala
Posts: 116
Joined: 2023-05-31 08:32
Location: Buenoa Aires, Argentina
Has thanked: 13 times
Been thanked: 4 times

Re: Corrupted USB stick

#5 Post by lospala »

still unreconizable. If I put the stick on the usb port system detects I/O error on a loop and in only starts when I remove the stick
The stick is /dev/sdd and at the bottom of terminal reads unable to mount - Permission denied


administrador@ubuntu:~$ fdisk -l
Disco /dev/sdb: 3,65 TiB, 4000787030016 bytes, 7814037168 sectores
Disk model: WDC WD40PURZ-85T
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Tipo de etiqueta de disco: gpt
Identificador del disco: DDE633A3-CA21-4AF8-8ACB-AC7FFDE2D47C

Dispositivo Comienzo Final Sectores Tamaño Tipo
/dev/sdb1 2048 7814035455 7814033408 3,7T Sistema de ficheros de Linux


Disco /dev/sdc: 3,65 TiB, 4000787030016 bytes, 7814037168 sectores
Disk model: WDC WD40PURZ-85T
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Tipo de etiqueta de disco: gpt
Identificador del disco: FF27175D-B800-4A55-9CFE-6DA9AB9B2EA7

Dispositivo Comienzo Final Sectores Tamaño Tipo
/dev/sdc1 2048 7814035455 7814033408 3,7T Sistema de ficheros de Linux


Disco /dev/sda: 111,81 GiB, 120034123776 bytes, 234441648 sectores
Disk model: KINGSTON SV300S3
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 512 bytes
Tamaño de E/S (mínimo/óptimo): 512 bytes / 512 bytes
Tipo de etiqueta de disco: dos
Identificador del disco: 0x000e4b01

Dispositivo Inicio Comienzo Final Sectores Tamaño Id Tipo
/dev/sda1 2048 143359999 143357952 68,4G 83 Linux
/dev/sda2 * 143360000 234440703 91080704 43,4G 83 Linux


fdisk: no se puede abrir /dev/sdd: Permiso denegado
administrador@ubuntu:~$

User avatar
kent_dorfman766
Posts: 529
Joined: 2022-12-16 06:34
Location: socialist states of america
Has thanked: 56 times
Been thanked: 69 times

Re: Corrupted USB stick

#6 Post by kent_dorfman766 »

I/O error on a USB flash stick usually means its internal controller have become corrupted, most often a result of pulling the device during a write. This is a serious fragility of USB and uSD type media that precludes them from being used in any serious work for data storage. They are fragile! and should only be used for transfering data...or boot image like you are attempting.

About all you can do at this point is insert the thing, wait until it is done spewing IO errors and attempt to overwrite the whole device as

sudo dd if=devian-iso-image of=/dev/(usb-device) bs=512

If this above generates more IO errors then the media is trashed.

User avatar
lospala
Posts: 116
Joined: 2023-05-31 08:32
Location: Buenoa Aires, Argentina
Has thanked: 13 times
Been thanked: 4 times

Re: Corrupted USB stick (deprecated)

#7 Post by lospala »

Thank you Kent. Ever with your sentence still persist the I/O error. Sticks sleeps on the trash can of my kitchen. Will close this post . Thanks everybody

Post Reply