USB Drive is corrupted

Shail Murtaza

New Member
Joined
Jun 13, 2022
Messages
27
Reaction score
5
Credits
223
Hi!
I was installing Tiny Core Linux on mine 8 GB USB drive but installation failed for some reason.
I retried the installation but it didn't work. I boot into mine main machine after disappointing and mine USB was not working. I tried to format it but that didn't work. I tried Gparted to format it, tried to create new partition table but nothing was working. I thought that this might be because mine USB has been broken.


After that I tried to install Tiny Core Linux on other USB and that device end up corrupted too. Nothing seem to be working on these devices. I'm sure it is because of Tiny Core Linux. I does not even remember how many times and which methods I have used to repair these devices but nothing worked

Can anyone please help me with that.
 


I doubt an ISO could directly be the cause of a USB stick failure. If there is nothing wrong with the USB stick hardware, you should be able to just reformat, or reimage with a new ISO, no harm done.

Did you verify the TCL ISO after download?

USB sticks do periodically fail, often due to high number of write cycles, and quality of the sticks.
 
USB sticks do periodically fail, often due to high number of write cycles, and quality of the sticks.
yep we have seen it more and more over the last year or so

Can anyone please help me with that.
use a good quality branded USB of between 4 & 16 GB [try not to go bigger] it must be clean and formatted Fats or X fats before you start to burn the ISO, what did you use to burn the ISO? We recommend Etcher, the latest version of Rufus is known to cause problems

How Do I Install Linux (A General Guide) • Linux Tips
 
yep we have seen it more and more over the last year or so


use a good quality branded USB of between 4 & 16 GB [try not to go bigger] it must be clean and formatted Fats or X fats before you start to burn the ISO, what did you use to burn the ISO? We recommend Etcher, the latest version of Rufus is known to cause problems

How Do I Install Linux (A General Guide) • Linux Tips
Both of these devices were new and I had installed Slax linux, bhodi linux on first drive
After failure of first one I bought new drive and that was also corrupted.
I have USB of almost 5 to 6 years old that is working fine and I use it everyday and that didn't failed but after trying to install Tiny Core Linux on new drive which was only few months old got corrupted. And 1 day older USB device also corrupted which was working fine before just right after failed installation of Tiny Core Linux.

I was not using rufus, balena or something like that for installation. Tiny Core Linux provides its own installation if you boot into it to use it as Live.

Installtion process of tiny core linux http://tinycorelinux.net/install.html
 
I was not using rufus, balena or something like that for installation. Tiny Core Linux provides its own installation if you boot into it to use it as Live.
I think we're talking about 2 things. Rufus and Etcher are for burning the downloaded ISO to a USB stick to create the live OS. The installation you're talking about is for installing the OS to hard drive from the previously created live OS.

I believe Rufus is Windows only, while Etcher is cross-platform.

So here are the steps that need to be performed:
- Download the ISO.
- Most distros provide a way to verify the ISO, usually in the form of a MD5 or SHA256 hash. Follow the distro publisher's instructions to verify.
- Use Rufus, Etcher or another Image Writer program to install the ISO image to your USB stick.
- Boot to the USB and go through your OS installation.

* Some distros, like Fedora, include a "verify ISO" option in their live boot menu, which further ensures a good USB.
 
...USB was not working. I tried to format it but that didn't work. I tried Gparted to format it, tried to create new partition table but nothing was working. I thought that this might be because mine USB has been broken.
If you look at your "broken" USB drives in Gparted and they show iso9660 for the file system, they can be difficult to recover for simple storage. This often happens when you write a Linux ISO to a USB drive. Etcher or other programs may easily write a new Linux ISO over the old one on these drives, but they don't provide a way to "restore" the USB back to normal everyday use.

The following usually works for me to restore the USB.
(WARNING: Be absolutely sure to identify the correct USB drive letter!)

Plug in the USB and run these commands as root (or with sudo):
Code:
# fdisk -l                (to find the USB drive letter, such as sdb, sdc, etc)
# mount                   (to find partition number if drive is mounted)
# umount /dev/sdX1        (where 'X1' is the drive/partition found above, eg sdb1)

# dd if=/dev/zero of=/dev/sdX bs=512 count=1     (change sdX to correct letter, eg sdb, with no partition number)

You should get an immediate output, something like this:
Code:
1+0 records in
1+0 records out
512 bytes copied, 0.00261952 s, 195 kB/s

The dd command deletes the partition table and all partitions on the USB.

Exit the terminal. Run GParted on the USB drive again and create a new partition table (msdos or gpt), then add a new partition (fat32, ntfs, ext4, or other). It should complete without any errors.
 
If you look at your "broken" USB drives in Gparted and they show iso9660 for the file system, they can be difficult to recover for simple storage. This often happens when you write a Linux ISO to a USB drive. Etcher or other programs may easily write a new Linux ISO over the old one on these drives, but they don't provide a way to "restore" the USB back to normal everyday use.

The following usually works for me to restore the USB.
(WARNING: Be absolutely sure to identify the correct USB drive letter!)

Plug in the USB and run these commands as root (or with sudo):
Code:
# fdisk -l                (to find the USB drive letter, such as sdb, sdc, etc)
# mount                   (to find partition number if drive is mounted)
# umount /dev/sdX1        (where 'X1' is the drive/partition found above, eg sdb1)

# dd if=/dev/zero of=/dev/sdX bs=512 count=1     (change sdX to correct letter, eg sdb, with no partition number)

You should get an immediate output, something like this:
Code:
1+0 records in
1+0 records out
512 bytes copied, 0.00261952 s, 195 kB/s

The dd command deletes the partition table and all partitions on the USB.

Exit the terminal. Run GParted on the USB drive again and create a new partition table (msdos or gpt), then add a new partition (fat32, ntfs, ext4, or other). It should complete without any errors.
Thanks for your help
I tried that but that didn't work

Mine USB device is /dev/sdc
This is mine working in sequence.
I ignored all errors and retried error "Invalid argument durring seek for write on dev/sdc"

2022-06-25-204914_1366x768_scrot.png2022-06-25-205236_1366x768_scrot.png2022-06-25-205431_1366x768_scrot.png2022-06-25-205505_1366x768_scrot.png2022-06-25-205545_1366x768_scrot.png2022-06-25-205608_1366x768_scrot.png2022-06-25-205635_1366x768_scrot.png2022-06-25-205722_1366x768_scrot.png


Output of Gparted​

GParted 1.2.0

configuration --enable-libparted-dmraid --enable-online-resize

libparted 3.4

========================================
========================================

Device:/dev/sdc
Model:Generic Mass-Storage
Serial:
Sector size:512
Total sectors:15728640
Heads:255
Sectors/track:2
Cylinders:30840
Partition table:msdos
PartitionTypeStartEndFlagsPartition NameFile SystemLabelMount Point
/dev/sdc2Primary416777219unknown
========================================

Format /dev/sdc2 as fat32 00:00:48 ( ERROR )
calibrate /dev/sdc2 00:00:20 ( SUCCESS )
path: /dev/sdc2 (partition)
start: 4
end: 16777219
size: 16777216 (8.00 GiB)
libparted messages ( INFO )
Can't have a partition outside the disk!
clear old file system signatures in /dev/sdc2 00:00:28 ( ERROR )
write 512.00 KiB of zeros at byte offset 0 00:00:02 ( SUCCESS )
libparted messages ( INFO )
Can't have a partition outside the disk!
write 4.00 KiB of zeros at byte offset 67108864 00:00:01 ( SUCCESS )
write 512.00 KiB of zeros at byte offset 8589410304 00:00:20 ( ERROR )
libparted messages ( ERROR )
Invalid argument during seek for write on /dev/sdc
Invalid argument during seek for write on /dev/sdc
Invalid argument during seek for write on /dev/sdc
Invalid argument during seek for write on /dev/sdc
 
@Shail Murtaza, your first 2 screenshots look exactly as they should, and Gparted shows the drive is completely unallocated. Did you miss the next step (open the Device menu on Gparted and Create Partition Table)... or is your 3rd screenshot the result of that? If you got an error there, it's not a surprise that formatting would fail too. But formatting as "sdc2" is strange. The drive may be damaged. It does happen, as @SlowCoder said above.

A trick that may work is to run the dd command again, then remove the USB and reboot before running Gparted and creating the partition table. Or else take the USB to another computer to format it.

As @Worralorrasurfa suggests, the Disks app will work too... sometimes. I have trouble with it sometimes too. I can also make Gparted recover the USB back to normal storage, but it is a clumsy method that gives warnings/errors. I have much preferred the dd method after I found it on the web as I never get any warnings or errors.

I mean Gparted also does the same job. Correct me if I'm wrong
Yes, you're right. Disks and Gparted should do the exact same thing. It should be as simple in Gparted as unmounting the drive, clicking on the drive to highlight it, and choosing the Partition menu and selecting format to a new file system (and get rid of the iso9660). But as you have found, it is not so simple... not when the drive has had a Linux ISO written to it.

With Disks, you'll probably see multiple partitions on the USB, but these are hidden in Gparted. With Disks, you should delete all of them first, then reformat the entire USB to reclaim the full capacity.

Most (or all) of your USB drives are probably okay. You just need to find the method that works best for you, and be flexible to use other methods. The dd method doesn't always work for me either.
 
Last edited:
Did you miss the next step (open the Device menu on Gparted and Create Partition Table)
Nope! I didn't missed that. I created partition table
The drive may be damaged
You might be right but it is very strange that both new drives physically damaged just right after failed installation of Linux on drive.
I guess i should giveup already

Mine USB drives corrupt too much these days because I'm hopping distros. I just use rufus or etcher to burn iso files on drive. Sometimes etcher fails to do so or mine computer shutdown while burning iso files. This lead to corrupted drives. But neither one of them got corrupted like those two drives on which I tried to install Tiny Core. Most of the time I just make new partition table, format it and USB drives are ready to use again
 
Last edited:
Is this a case that the USB controller simply messes up I/O
Thereby failing?
I like setting toram
for installs.

Doesn't solve it directly, but does install so you can probe a little deeper later on.
 
Hi!
I was installing Tiny Core Linux on mine 8 GB USB drive but installation failed for some reason.
I retried the installation but it didn't work. I boot into mine main machine after disappointing and mine USB was not working. I tried to format it but that didn't work. I tried Gparted to format it, tried to create new partition table but nothing was working. I thought that this might be because mine USB has been broken.


After that I tried to install Tiny Core Linux on other USB and that device end up corrupted too. Nothing seem to be working on these devices. I'm sure it is because of Tiny Core Linux. I does not even remember how many times and which methods I have used to repair these devices but nothing worked

Can anyone please help me with that.
USB Flash Drives fail often, especially the cheaper ones, I know. Since then I only buy and use the highest quality brands.
 
@aesc should be give a shout out and name the brands for quality usbs 's ?
SanDisk, Samsung, PNY, I've been sticking mostly to SanDisk, they sometimes get real hot having been plugged in for long periods of time and still perform admirably.
SanDisk also supplies free encryption software (File Vault) with each flash drive, but as far as I know the encryption software is only for Windows and macOS. Is there an easy to load, easy use encryption software for Linux? I also need encryption for Android, since I use my USB C Flash drives across all software platforms, that is I exchange files between my Laptops, my Tablets and my cell phone.
 
Last edited by a moderator:
Hi!
I was installing Tiny Core Linux on mine 8 GB USB drive but installation failed for some reason.
I retried the installation but it didn't work. I boot into mine main machine after disappointing and mine USB was not working. I tried to format it but that didn't work. I tried Gparted to format it, tried to create new partition table but nothing was working. I thought that this might be because mine USB has been broken.


After that I tried to install Tiny Core Linux on other USB and that device end up corrupted too. Nothing seem to be working on these devices. I'm sure it is because of Tiny Core Linux. I does not even remember how many times and which methods I have used to repair these devices but nothing worked

Can anyone please help me with that.
If it were me, I'd plug my USB Flash Drive into a Windows PC and run Scan drive and then reformat the drive since I know those commands, can run those functions easily on a Windows computer. I just started with, am a new user with Linux.
 
Last edited by a moderator:
If it were me, I'd plug my USB Flash Drive into a Windows PC and run Check Disk and Scan Disk, and then reformat the drive since I know those commands, can run those functions easily on a Windows computer. I just started with, am a new user with Linux.
Scandisk is no longer part of Windows, removed after Windows XP. Chkdsk only checks if the filesystem is intact, and does not verify hardware errors. Just formatting the thumbdrive would negate the need for chkdsk.

Most modern thumbdrives have internal ECC to mark bad blocks.
 
If it was me...I'd try a different Distro and burn it to the Flash Drive without formatting it...works every time.
happy0035.gif
 

Members online


Top