0

my pendrive doesn't work: device label is not recognised How can I fix it? I don't need the data from it, so it can be formatted.

There are some communicates:

sudo fdisk -l /dev/sdb 
Dysk /dev/sdb: 3,8 GiB, bajtów: 4026531840, sektorów: 7864320
Jednostki: sektorów, czyli 1 * 512 = 512 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512

sudo gdisk -l /dev/sdb 
GPT fdisk (gdisk) version 1.0.3

Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries.
Disk /dev/sdb: 7864320 sectors, 3.8 GiB
Model: UDisk           
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 0ADEF184-7FFB-42EB-8C86-7639B58A025F
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 7864286
Partitions will be aligned on 2048-sector boundaries
Total free space is 7864253 sectors (3.7 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name

I also tried this:

sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1

and gparted also without success.

/dev/sdb: unrecognised disc label

Now when I do:

sudo gdisk /dev/sdb 

then I obtain:

GPT fdisk (gdisk) version 1.0.3

Caution: invalid main GPT header, but valid backup; regenerating main header
from backup!

Caution! After loading partitions, the CRC doesn't check out!
Warning! Main partition table CRC mismatch! Loaded backup partition table
instead of main partition table!

Warning! One or more CRCs don't match. You should repair the disk!

Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: damaged

Found invalid MBR and corrupt GPT. What do you want to do? (Using the
GPT MAY permit recovery of GPT data.)
 1 - Use current GPT
 2 - Create blank GPT

and whatever I choose (1 or 2), when I type: v,w it change nothing. Still I obtain the same communicates of gdisk /dev/sdb.

The pendrive was working few days ago.

Filip Parker
  • 163
  • 1
  • 1
  • 5
  • Did you use as live installer which is a hybrid DVD/flash configuration without partitions? Reset USB flash that was dd'd to make it usable again, reuse https://askubuntu.com/questions/939230/formatting-a-usb-stick-unable-to-operate-usb/939266#939266 & https://help.ubuntu.com/community/mkusb#Re-use_the_pendrive & https://unix.stackexchange.com/questions/216152/usb-disk-read-only-cannot-format-turn-off-write-protection You need gpt (or old MBR) partitioning. If you want gpt `sudo parted /dev/sdb mklabel gpt` Double check that it is sdb, as if your other drive it will erase all your data. – oldfred Nov 01 '20 at 13:19
  • no, I didn't. Do you think it can help anyway? – Filip Parker Nov 01 '20 at 13:52
  • If not working, and error is missing device label is issue, then that should be what you try first. With gparted select gpt under device, advanced over msdos(MBR) default partitioning before starting. – oldfred Nov 01 '20 at 14:46
  • After "sudo parted /dev/sdb mklabel gpt" I see in "gdisk -l /dev/sdb" that: "GPT: damaged Found invalid MBR and corrupt GPT. What do you want to do? 1 - Use current GPT 2 - Create blank GPT ". When I choose 2 and again launch gdisk I obtain exactly the same result: "GPT: damaged" – Filip Parker Nov 01 '20 at 15:24
  • I was trying mkusb without success. – Filip Parker Nov 01 '20 at 15:26
  • You can try the gdisk repair. http://www.rodsbooks.com/gdisk/repairing.html More repair info use p, v & w to write the partition table. If not correct just use q to quit. : http://askubuntu.com/questions/386752/fixing-corrupt-backup-gpt-table/386802#386802 – oldfred Nov 01 '20 at 15:47
  • I tried gdisk repair without success. I just added the output of the command at the end of my question. – Filip Parker Nov 02 '20 at 21:58
  • Did you try zeroing out the drive as in links in first comment? – oldfred Nov 02 '20 at 22:36

0 Answers0