LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-31-2020, 09:03 AM   #1
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127

Rep: Reputation: 174Reputation: 174
Clonezilla/Partimage - disk has bad sectors


I have an entry level Intel NUC running Ubuntu Mate 20.04 which I use as a headless BitTorrent/Usenet download box. The OS is installed on a Samsung 32 GB flash drive. The internal SSD is used for data storage. Works great. Last evening I decided to take a Clonezilla snapshot of the OS. I removed the flash drive and attempted to clone it in another computer which I use for that purpose. I received an error that Partimage could not copy the partition because "the disk has bad sectors..."

I ran e2fsck -f on the flash drive. The file system checked out perfect. I booted the NUC from the flash drive and copied such files as I wished to keep. I restored an earlier Clonezilla image to another flash drive and updated some files on it from the files saved from the original flash drive. The NUC is back up and running. Now I am looking at the "bad sectors" flash drive and wondering what I can learn from it.

The flash drive does not support SMART so I can learn nothing by that means. I use SMART to check the health of SSDs and mechanical drives. I guess I could try to format it and see what happens. I am not finding much on the Samsung web site.

Does anyone know of a way to test a flash drive in Linux? In the past when one died it really died and I finished it off with a big hammer to make sure the data was really gone then tossed it in the trash. I never had one which was bad and yet the file system on it was fine.

TIA,

Ken

Last edited by taylorkh; 07-31-2020 at 01:03 PM.
 
Old 07-31-2020, 09:49 AM   #2
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 22 MATE, Peppermint OS-Devuan, EndeavourOS
Posts: 4,293
Blog Entries: 48

Rep: Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585
Ken,

Try installing dcfldd and then test if the drive is faulty.

See post #6:
https://www.linuxquestions.org/quest...dd-4175666671/
 
Old 07-31-2020, 09:53 AM   #3
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
Quote:
Originally Posted by taylorkh View Post
The flash drive does not support SMART
i have a couple of external drives (not usb) that initially read as as unsupported and learned that i needed to add the -d sat parameter to help bypass the (usb to sata i think) interface. this page doesn't list samsung specifically, but does mention other type (-d) parameters that might work with usb drives.

from the man page:

Quote:
sat[,auto][,N] - the device type is SCSI to ATA Translation (SAT). This is for ATA disks that have a SCSI to ATA Translation (SAT) Layer (SATL) between the disk and the operating system. SAT defines two ATA PASS THROUGH SCSI commands, one 12 bytes long and the other 16 bytes long. The default is the 16 byte variant which can be overridden with either ´-d sat,12´ or ´-d sat,16´.
 
Old 07-31-2020, 12:12 PM   #4
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127

Original Poster
Rep: Reputation: 174Reputation: 174
Thanks beachboy2,

I will give that a try.

Thanks cordx,

I will look into that also. I have never used smartmontools on a USB drive of any sort that I can remember.

As to the offending flash drive...

I formatted it - no complaints
I created an ext file system on it and copied 20+ GB to it - no complaints
I formatted it again and left it as empty space
I used Clonezilla top burn the image from my new flash drive to it - no complaints
I used Clonezilla to create an image from the previous step - no complaints

It seems that it is now OK. Very strange.

Ken
 
1 members found this post helpful.
Old 08-01-2020, 08:07 AM   #5
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127

Original Poster
Rep: Reputation: 174Reputation: 174
Update...

I think dcfldd might have been of some use BEFORE I reformatted the flash drive. And I was not able to get any SMART info from the thing. That said...

I noticed that the Clonezilla image which I restored to the suspect flash drive was 16GB in size. It had been taken from a Sandisk 16 GB flash drive which later died. Before I reformatted the drive it had a small boot partition and another partition using up the rest of the 32 GB disk. Apparently I used Gparted to expand the 16 GB image to take up the rest of the 32 GB drive. Thinking that this might have caused an issue (never has before) I expanded the partition on the suspect drive. I ran e2fsck and took a Clonezilla image of the result. No problems.

Bottom line it looks like the flash drive is OK. I guess I will put it back in service.

Ken

p.s. I suppose I should set this thread to resolved as I cannot fix a problem which no longer exists.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM: pvcreate fails on 5TB drive with "pe_align (2048 sectors) must not be less than pe_align_offset (8388607 sectors)" furryspider Slackware 12 10-14-2016 06:21 PM
LXer: Clonezilla-release Stable Clonezilla live (2.0.1-15) Released LXer Syndicated Linux News 0 12-18-2012 10:21 PM
re-allocated sectors count shows 2 bad sectors, in Ubuntu 10.04 disk utility james2b Linux - Hardware 4 10-13-2010 12:16 AM
[SOLVED] Image Size: Partimage and Clonezilla MBA Whore Linux - Software 2 09-02-2009 09:39 PM
disk imaging, clonezilla or partimage fenixbtc Linux - Software 4 08-10-2009 01:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration