LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   I cannot erase USB flash-drive. Previously it was prepared & used as ubuntu-22 installation disk. Please help. Thanks (https://www.linuxquestions.org/questions/linux-software-2/i-cannot-erase-usb-flash-drive-previously-it-was-prepared-and-used-as-ubuntu-22-installation-disk-please-help-thanks-4175734238/)

Igor Evgen 02-25-2024 07:42 AM

I cannot erase USB flash-drive. Previously it was prepared & used as ubuntu-22 installation disk. Please help. Thanks
 
I cannot erase USB flash-drive. Previously it was prepared & used as ubuntu-22 installation disk. Please help. Thanks

PurpleSquirrel 02-25-2024 07:49 AM

Hello Igor. What have you tried already?

michaelk 02-25-2024 07:52 AM

Use gparted to create a new partition table, a new partition and select the desired filesystem.

lvm_ 02-25-2024 08:02 AM

When flash disk ignores write requests and retains old data it is an indication that it has failed and is giving you the last chance to copy your files.

PurpleSquirrel 02-25-2024 08:09 AM

I have run into the same problem a time or two. I've been using wipefs lately to get rid of the filesystem signatures before I do anything else, especially if I installed from the memory stick.

I'm going to have to try gparted next time. Sounds like a solid suggestion.

PurpleSquirrel 02-25-2024 08:10 AM

Quote:

Originally Posted by lvm_ (Post 6485801)
When flash disk ignores write requests and retains old data it is an indication that it has failed and is giving you the last chance to copy your files.

I've seen that too.

DavidMcCann 02-25-2024 11:26 AM

There are two possibilities. It might be failing but it may just be that its iso formating makes it look like an external optical drive and what could alter that?

Mount it, note the id (e.g. /dev/sdc or whatever), unmount, and use this
Code:

dd if=/dev/zero bs=1M count=10 of=/dev/sdc
Then format it with gparted.

Igor Evgen 02-25-2024 11:33 AM

Quote:

Originally Posted by PurpleSquirrel (Post 6485798)
Hello Igor. What have you tried already?

I tried several ways posted on Internet, in particular, using g-parted. Failed.

Igor Evgen 02-25-2024 11:36 AM

Terminal printed: Permission denied

michaelk 02-25-2024 11:43 AM

Quote:

Originally Posted by Igor Evgen (Post 6485856)
Terminal printed: Permission denied

If you are trying to use dd as posted above then you need to use sudo

sudo dd if=/dev/zero bs=1M count=10 of=/dev/sdx

Please verify the correct device ID.

Igor Evgen 02-25-2024 11:43 AM

#2
PurpleSquirrel

I tried g-parted

and

https://www.techrepublic.com/article...owing-it-away/

Igor Evgen 02-25-2024 11:47 AM

DavidMcCann

I -- not a pro -- tried that way. Failed.

Igor Evgen 02-25-2024 11:49 AM

michaelk

Thank you. Especially for the last quotation.

Regretfully, it cannot help to purge my flash-jack.

fatmac 02-25-2024 11:51 AM

When a pendrive has been used as an installation image, to return it to normal usage, you need to write a new partition table to it, usually an MBR, (could be a GPT, depending on size), then partition, & add a file system.

Igor Evgen 02-25-2024 11:54 AM

michaelk

Terminal answered:
10+0 records in
10+0 records out
10485760 bytes (10 MB, 10 MiB) copied, 0.0065166 s, 1.6 GB/s

So?


All times are GMT -5. The time now is 04:20 PM.