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

 

 

 

[solved]Howto recover hw-locked pendrive's data?

Need help with peripherals or devices?
Message
Author
bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

[solved]Howto recover hw-locked pendrive's data?

#1 Post by bkpsusmitaa »

[Post-solution Clarification] Originally, the subject heading was: Howto repair a particular pendrive to again read its data? Gradually, following interactions with p.M., it was learnt and understood that the drive with two partitions (EXT4 and FAT32] is Write-protected, locked by the firmware, which made the ext4 partition unmountable and unreadable, while the fat32 partition read-only.


Hi!
My pendrive partitions are shown in the FileManager (nautilus or pcmanfm) drive explorer window. Upon clicking to look into it or

Code: Select all

sudo mount  /dev/sdc2 /media/sdc2
, the error displays:

Code: Select all

Error mounting: mount exited with exit code 1: helper failed with:
mount: block device /dev/sdc2 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sdc2,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Code: Select all

sudo mount  /dev/sdc1 /media/sdc1

Code: Select all

mount: block device /dev/sdc1 is write-protected, mounting read-only
GParted report while trying to check the pendrive:

Report:

Code: Select all

GParted 0.12.1 --enable-libparted-dmraid

Libparted 2.3
Check and repair file system (ext4) on /dev/sdc2  00:00:00    ( ERROR )
     	
calibrate /dev/sdc2  00:00:00    ( SUCCESS )
     	
path: /dev/sdc2
start: 20,973,568
end: 31,266,815
size: 10,293,248 (4.91 GiB)
check file system on /dev/sdc2 for errors and (if possible) fix them  00:00:00    ( ERROR )
     	
e2fsck -f -y -v /dev/sdc2
     	
Disk write-protected; use the -n option to do a read-only
check of the device.
e2fsck 1.42.5 (29-Jul-2012)
e2fsck: Read-only file system while trying to open /dev/sdc2
libparted messages    ( INFO )
     	
Unable to open /dev/sdc read-write (Read-only file system). /dev/sdc has been opened read-only.
Unable to open /dev/sdc read-write (Read-only file system). /dev/sdc has been opened read-only.

Code: Select all

e2fsck -f -y -v /dev/sdc1
Report:

Code: Select all

e2fsck 1.42.5 (29-Jul-2012)
Warning!  /dev/sdc1 is mounted.
e2fsck: Operation not permitted while trying to open /dev/sdc1
You must have r/w access to the filesystem or be root

Code: Select all

e2fsck -f -y -v /dev/sdc

Code: Select all

e2fsck 1.42.5 (29-Jul-2012)
/dev/sdc is in use.
e2fsck: Cannot continue, aborting.

Code: Select all

umount /media/sdc

Code: Select all

umount: /media/sdc is not mounted (according to mtab)

Code: Select all

sudo e2fsck -f -n -v /dev/sdc

Code: Select all

e2fsck 1.42.5 (29-Jul-2012)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/sdc

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

Code: Select all

dmesg
reports

Code: Select all

[ 2547.030210] usb 1-5: USB disconnect, device number 4
[ 2548.536452] usb 1-5: new high-speed USB device number 5 using ehci-pci
[ 2548.660700] usb 1-5: New USB device found, idVendor=0781, idProduct=5567
[ 2548.660709] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2548.660716] usb 1-5: Product: Cruzer Blade
[ 2548.660722] usb 1-5: Manufacturer: SanDisk
[ 2548.660728] usb 1-5: SerialNumber: 20060876920A0992874A
[ 2548.662280] scsi6 : usb-storage 1-5:1.0
[ 2549.664258] scsi 6:0:0:0: Direct-Access     SanDisk  Cruzer Blade     1.26 PQ: 0 ANSI: 5
[ 2549.664622] sd 6:0:0:0: Attached scsi generic sg3 type 0
[ 2549.666098] sd 6:0:0:0: [sdc] 31266816 512-byte logical blocks: (16.0 GB/14.9 GiB)
[ 2549.667988] sd 6:0:0:0: [sdc] Write Protect is on
[ 2549.667999] sd 6:0:0:0: [sdc] Mode Sense: 43 00 80 00
[ 2549.668979] sd 6:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 2549.685704]  sdc: sdc1 sdc2
[ 2549.690857] sd 6:0:0:0: [sdc] Attached SCSI removable disk
[ 2552.906044] FAT-fs (sdc1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
[ 2650.406111] EXT4-fs (sdc2): INFO: recovery required on readonly filesystem
[ 2650.406123] EXT4-fs (sdc2): write access unavailable, cannot proceed
[ 2654.211098] EXT4-fs (sdc2): INFO: recovery required on readonly filesystem
[ 2654.211110] EXT4-fs (sdc2): write access unavailable, cannot proceed
[ 2665.802358] EXT4-fs (sdc2): INFO: recovery required on readonly filesystem
[ 2665.802369] EXT4-fs (sdc2): write access unavailable, cannot proceed
[ 2741.044567] SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled
[ 2789.333051] FAT-fs (sdc1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
[ 3416.644841] EXT4-fs (sdc2): INFO: recovery required on readonly filesystem
[ 3416.644847] EXT4-fs (sdc2): write access unavailable, cannot proceed
[ 3423.070968] EXT4-fs (sdc2): INFO: recovery required on readonly filesystem
[ 3423.070980] EXT4-fs (sdc2): write access unavailable, cannot proceed

How to protect my data, but mount, take a backup and then recover the pendrive? Should I run:

Code: Select all

e2fsck -b 8193 /dev/sdc
?
I am beyond my limits of knowhow!
Last edited by bkpsusmitaa on 2020-07-01 00:29, edited 5 times in total.
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Howto repair a particular pendrive to again read its dat

#2 Post by debiman »

  1. it seems indeed your drive is read-only
  2. try to mount in a different location - e.g

    Code: Select all

    cd
    mkdir mnt
    sudo mount /dev/sdxx mnt
  3. output of

    Code: Select all

    mount
edit: of course i meant read-only, not write-only.
Last edited by debiman on 2017-10-10 14:38, edited 1 time in total.

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: Howto repair a particular pendrive to again read its dat

#3 Post by pylkko »

It is possibly hardware failure because flash drives often (if not always) go into read-only mode when they die. I would suspect this especially if the system was indeed ext4 formatted and you did nothing and it just suddenly went bad. Especially since you are getting kernel messages about not being able to read it, and thus it is unlikely that you have mounted it wrong or do not have permissions or proper mount rule.

Copy the data somewhere else and try to format the drive.

dd writes to the block device when it is not mounted. So, if this does not work, then I'm afraid the device is gone.

bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

Re: Howto repair a particular pendrive to again read its dat

#4 Post by bkpsusmitaa »

pylkko wrote:Copy the data somewhere else and try to format the drive.
That is the point, Pyikko! How do I copy a drive's files which I can't read? You talked about dd, but didn't say much.

Code: Select all

info coreutils 'dd invocation'
is a huge file.

This problem had occurred once, Pyikko! For that drive the files weren't that important. So I formatted the drive and the problem was gone!

Debiman, the problem is the same with even the new mount point.

Code: Select all

sudo mount /dev/sdc2 /media/ant

Code: Select all

mount: block device /dev/sdc2 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sdc2,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Howto repair a particular pendrive to again read its dat

#5 Post by Head_on_a_Stick »

Apologies if this has already been mentioned but have you tried:

Code: Select all

# hdparm -r0 /dev/sdX
deadbang

bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

Re: Howto repair a particular pendrive to again read its dat

#6 Post by bkpsusmitaa »

How can I call you HOAS? Why did you choose such a name which if called might be consider as a satire!? Mine to will sound funny for the uninitiated. 'bkp' is my native town, Barrackpore ;-)
Thank you for hdparm and your modesty. No one before you mentioned hdparm, and I also read about it after you posted, in the man page. It is a huge file! I wonder how the console users used to read man pages in consoles. It requires an extreme clerical ability to undertake such endeavours.

But unfortunately,

Code: Select all

sudo hdparm -r0 /dev/sdc2
(the pendrive is mounted on the USB port 1-6 with sdc2), even after hdparm code is executed, the same error message, as mentioned earlier, greets when the partition is clicked.
Last edited by bkpsusmitaa on 2017-10-10 17:06, edited 1 time in total.
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Howto repair a particular pendrive to again read its dat

#7 Post by debiman »

you need to show us.
also what i requested earlier (you posted only half of it).

PS: flattery will get you nowhere.

bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

Re: Howto repair a particular pendrive to again read its dat

#8 Post by bkpsusmitaa »

Debiman, why the sudden irritation?
Of course, I had made a mount folder first, sudo mkdir /media/ant
then used the mount command like I have posted.

And regarding HOAS, it was not flattery, it was a decent acknowledgement. One must understand the difference between flattery and decency to oneself be a decent person !
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Howto repair a particular pendrive to again read its dat

#9 Post by Head_on_a_Stick »

bkpsusmitaa wrote:

Code: Select all

sudo hdparm -r0 /dev/sdc2
Try:

Code: Select all

sudo hdparm -r0 /dev/sdc
If I had wanted you to add a partition number then I would have specified /dev/sdXY ;)

Also, debiman is right — you should always post any command output in full when things go wrong.
deadbang

bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

Re: Howto repair a particular pendrive to again read its dat

#10 Post by bkpsusmitaa »

If I had wanted you to add a partition number then I would have specified /dev/sdXY ;)
That was the first one I tried.

Code: Select all

sudo hdparm -r0 /dev/sdc
Output:

Code: Select all


/dev/sdc:
 setting readonly to 0 (off)
 readonly      =  0 (off)
Then I clicked the partition, and I had the same report.

Code: Select all

Error mounting: mount exited with exit code 1: helper failed with:
mount: block device /dev/sdc2 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sdc2,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
but as superuser if I type:

Code: Select all

sudo nautilus --browser
and then click on the partition, no message is displayed, but the partition isn't opened.

I further tried:

Code: Select all

e2fsck -f -y -v /dev/sdc2
Output:

Code: Select all

e2fsck 1.42.5 (29-Jul-2012)
e2fsck: Read-only file system while trying to open /dev/sdc2
Disk write-protected; use the -n option to do a read-only
check of the device.
So I tried:

Code: Select all

e2fsck -f -n -v /dev/sdc2
The output was:

Code: Select all

e2fsck 1.42.5 (29-Jul-2012)
Warning: skipping journal recovery because doing a read-only filesystem check.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

       29666 inodes used (9.22%, out of 321920)
          88 non-contiguous files (0.3%)
          12 non-contiguous directories (0.0%)
             # of inodes with ind/dind/tind blocks: 0/0/0
             Extent depth histogram: 29601/51
      731236 blocks used (56.83%, out of 1286656)
           0 bad blocks
           1 large file

       27577 regular files
        2074 directories
           0 character device files
           0 block device files
           0 fifos
           0 links
           6 symbolic links (6 fast symbolic links)
           0 sockets
------------
       29657 files
The same reports on e2fsck with sudo.
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

peer
Posts: 443
Joined: 2017-03-26 10:14
Has thanked: 8 times
Been thanked: 20 times

Re: Howto repair a particular pendrive to again read its dat

#11 Post by peer »

Perhaps you should try an iso with data recovery software.

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: Howto repair a particular pendrive to again read its dat

#12 Post by pylkko »

Some flash memories have firmware level code that forces the drive to read only in order to protect your data in the event that they notice a problems with the hardware. There are many reports on the net that SanDisk pendrives behave like this and at times when they are not broken. See
http://forums.sandisk.com/t5/All-SanDis ... 218/page/2

I suggest you dd/ddrescue the data away from the drive and see if you can find a way to use it. So as root:

Code: Select all

ddrescue -d -r1 /dev/sda testRecover.img testRecover.logfile
replace the drive name with what you have in your situation.

bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

Re: Howto repair a particular pendrive to again read its dat

#13 Post by bkpsusmitaa »

pylkko wrote: ... see if you can find a way to use it ...
Won't the resulting .img file be readable by any ISO reading package?
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: Howto repair a particular pendrive to again read its dat

#14 Post by pylkko »

Yes, in principle. But if the drive is failing and some parts of it cannot be read, then the iso might be hard to read...

bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

Re: Howto repair a particular pendrive to again read its dat

#15 Post by bkpsusmitaa »

pylkko wrote:... But if the drive is failing and some parts of it cannot be read ...
Let's set the negative scenarios aside. Which applications could be used to read those backups? Brasero, K3B?
Last edited by bkpsusmitaa on 2017-10-12 12:15, edited 1 time in total.
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: Howto repair a particular pendrive to again read its dat

#16 Post by pylkko »

bkpsusmitaa wrote:
pylkko wrote:... But if the drive is failing and some parts of it cannot be read ...
Let's set aside the negative scenarios. Which applications could be used to read those backups? Brasero, K3B?
Well, you could search Google to get answers to questions like this immediately . But I can tell you that you can just mount disk images.

Write to .img then mount it or write it to a new USB stick, SD card whatever you want.

bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

Re: Howto repair a particular pendrive to again read its dat

#17 Post by bkpsusmitaa »

So in the present endeavour I learnt somewhat about hdparm and ddrescue, particularly, that the man hdparm and info ddrescue are huge files and need time to comprehend.
What remains is to learn, in which file format does the ddrescue store the disk data, and which packages could be used to read and write that data into a DVD-RW! Pyikko says that Google should help! Very well, I will search Google. Thank you, Pyikko, Debiman and HOAS! But what I needed was knowing your personal experiences, personal angles, pointers to where exactly to look into, ...

I can use the metaphor of a medieval, impregnable castle. But having been designed by men, it must have some points of weakness, or some special places from where one could stealthily enter. I was likewise expecting you to provide me with the unique angles with the help of which I could grasp the Big Picture of recovering data in the affected partitions.

I acknowledge that I would need time to read the info ddrescue exhaustively to recover the data contained therein.
But there is one thing that I learnt: Never to partition a pendrive for optimisation!

This present exercise helped me learn a very pertinent issue: Why the system fails.

I found that the internet is virtually a limitless repository of information. So much that it causes information overload. Now regarding the present exercise, I would have liked to get professional help. I have nothing against paying the professionals for the services they provide. We are not supposed to know everything, so we turn to the specialists, who are in position to help us. Ideally, such a world would be full of specialists, and if we encounter problems we can't solve, we approach the specialists and they solve our problems, and life becomes very smoothly operable.

But looking at the grocers, the hawkers and the like, we find by interactions and experiences that people can't be trusted. To trust people we have to cultivate them: be with them, study their interactions with other people, their value systems, et al. That is a huge investment of time and energy. So, as a matter of safety we lose trust and by limiting how the immoral opportunists could harm us, we also deny the moral opportunists from helping us!

Now, in such a scenario, life becomes overbearing! Nothing seems to work. and people aren't happy anywhere, except when they believe in God and miracle! Morality without God appears impossible, whereas it shouldn't have been.

If we look at the Happy Planet Index, we find that no country that has advanced science and technology has its people happy! The happy people are in the poor, ill-educated, technologically backward countries. Which in turn reinforces the adage: Ignorance Is Bliss.

But I am sure that morality could very well exist without God. There was no reason for one to squeeze out a little more from the other, in the cases of business transactions. But at this very point people fail. Some give a little more than necessary, some take a little more than necessary. This doesn't seem enormous!

But considering the sheer number of transactions, those tiny little displeasures of losing tiny little extra and the elation of squeezing out extra, add up to make a Tsunami, and ruin civilisations in the end.

When I want to learn, people don't help me beyond a certain point, but point at the internet resources. Indirectly, they appear to say to me, that for me to know the real areas I need to pay them. Man, I am ready to pay you! But who decides that the transaction and the cost is precise and fair?

Perhaps this is why, despite its obvious advantages, FOSS fails, while secrecy, proprietary software, etc., continue to prevail. And generally, Good fails, while Immoral Opportunism continues to be successful.
Last edited by bkpsusmitaa on 2017-10-13 15:19, edited 2 times in total.
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

Re: Howto repair a particular pendrive to again read its dat

#18 Post by bkpsusmitaa »

The pages I found in Google with the string "recover pendrive partition ddrescue". I will record how I began the process of learning, so that someone like me, searching for solution, stumbles on to this page.

Found the following first links among 38,000 pages.

ddrescue - recovery of usb flash drive: extracted image is full of zeros ...

https://unix.stackexchange.com/.../reco ... ge-is-full...

Aug 20, 2016 - You haven't any chance to rescue data from the USB
flash. I think the flash was zeroed. But you can try to find the lost
partition by testdisk , look ...

Guide to Using DDRescue to Recover Data - Technibble

https://www.technibble.com
Blog › On the Job

/dev/sdb, which is my attached USB drive and contains a
single partition: /dev/sdb1 ... As you can see in this
screenshot, ddrescue failed to recover 512 bytes.

Get Your Data Back with Linux-Based Data Recovery Tools - Linux.com

https://www.linux.com/learn/get-your-da ... very-tools

Feb 13, 2015 - Thankfully, Linux is no stranger to data recovery.
... system from either the CD or USB drive and then uses the
tools to work with your file system. ... Let's use Ddrescue
to copy a partition from drive /dev/sdg to drive /dev/sdb.

DataRecovery - Community Help Wiki - Official Ubuntu Documentation

https://help.ubuntu.com/community/DataRecovery

Feb 6, 2017 - Run Parted from the command line to recover
your partition. ... GNU ddrescue (packaged as
gddrescue, though once installed the command is "ddrescue")
... (VFAT) filesystem (usually found on USB drives) to store
the image, ...

linux - Partition table corrupted (USB flash drive) - Super User

https://superuser.com/questions/32825/p ... lash-drive

It may be worth running testdisk over the device, it sounds like
your partition table may have gone pop. Testdisk ...
ddrescue is a data recovery tool. It copies
data ...

linux - Do I need to format/partition ddrescue destination drive ...

https://superuser.com/questions/1221411 ... ../1221416

Jun 21, 2017 - No. ddrescue will prepare everything for
you. You just need to setup things after the rescue, but only if the
partition table was damaged.

My flash pendrive is damaged! How to recover data using ddrescue ...

blog.hakimodo.pl/my-flash-pendrive-is-damaged-how-to-recover-data-using-ddrescue/

Oct 30, 2013 - How to recover data using ddrescue?
... pendrive In march 2013 my flash pendrive has
gone crazy. This is an unwanted situation .... 9 14:26:46 localhost
kernel: [74411.049173] sdb: unknown partition table Mar 9
14:26:46 ...

How to Clone Hard Disks with ddrescue | Datarecovery.com

https://datarecovery.com/rd/how-to-clon ... -ddrescue/

Aug 20, 2015 - At Datarecovery.com, we recommend contacting a data
recovery expert at ... a system rescue disk for Linux that
can be used as a bootable USB ...

Recovering data from a dead Windows (NTFS) disk using Linux | Vlad ...

https://vtopan.wordpress.com/.../recove ... -disk-usin...

Nov 15, 2009 - Up until a while ago, particularly if the
partitions were formatted with NTFS, the ... It also has a
data-recovery-oriented cousin called ddrescue,
which ... prefix means a serial disk (usually an internal SATA or
external USB disk).

Restore hard disk partitions and files in Linux Mint - Linux Mint Guide

https://mintguide.org › Tools

May 21, 2015 - ... hard disk, a
scratched CD with photos of your beloved deceased pet, or even a
flash drive. ... Software to recover hard disk
partitions, files and data .... 3. ddrescue is a
very useful utility with its unique and interesting history.

... ... ...
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

Re: Howto repair a particular pendrive to again read its dat

#19 Post by bkpsusmitaa »

I ignored the very first link with stackexchange. It is a difficult place for those who are initiating a new experiment. I would treat it as a place for bullies.

The second contains a lot of information about using ddrescue through a possible Linux booted system called Parted Magic. I went through the page and collected the necessary information available. Since we already have a Linux system, the Learning Curve would not be very steep for us.

The third one contains an ncurses application called testdisk in addition to ddrescue. I have a Knoppix system, so entered

Code: Select all

whereis testdisk
and found it pre-installed.

I am continuing to read and find out solutions.
Last edited by bkpsusmitaa on 2017-10-14 09:04, edited 1 time in total.
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: Howto repair a particular pendrive to again read its dat

#20 Post by pylkko »

I noticed that you wrote something along the lines that because people don't do your work for you, that is because linux fails and that proprietary is where you get real help. I see that you edited your long rant (the one with stuff about God and morality) two times after that and maybe you deleted this content away. Anyway, here's the thing: it has nothing to do with proprietary or free/open source. There are indeed data recovery businesses that will help you, and they will charge the same price whether or not you are on Windows or a free OS. A very very high price... I wouldn't be surprised if it was it was many times higher if you are on a proprietary system. People here don't have any interest or need to help you, and they probably have their own lives, jobs and families that they attend to before the attend to you. And that they do so, is not because they are greedy or immoral, it is because that's how life works.

You need to learn at least three things here:

1) You absolutely need to realize something that most people realize immediately. Consumer grade (cheap chinese) USB pendrives and other flash storage media are low quality POS when it comes to data reliability. The manufacturers themselves think of these products as single-use plastic cups. I just now went to see how much my closest computer parts store charges for an enterprise USB (Kingston Ironkey 32 GB)... the price is... wait for it... 700 USD. So what can we conclude here? Well the sad truth is that you should never, ever store anything important on a USB pendrive. These devices are only good for temporary storage/moving data from one place to another. They are cheap enough that when you have any problem/they stop working, you use a new one.

2) You always should have a backup. If you have a backup, you don't need to study cryptic data recovery magic off the internet for hours and hours. You made your choice, you chose that you don't want an easy life. Is it the fault of God? Is it the fault of greedy selfish Westeners? Is the fault of open source? No, understanding morality begins with facing the facts/reality.

3) You suggest - between the lines - that experienced users here don't want to help you because, surely, someone has done what you want to do. No. That is just wrong. The more experienced the user is, the more likely it is that they have never let themselves in the situation where they need to use data recovery software. Only beginners need it.

Now, let me help you after all this lecturing.

This page seems to explain how disk images are made on linux with fairly easy to undertsand English and examples:

https://www.linuxnix.com/what-you-shoul ... d-command/

dd is a tool that makes an image and ddrescue is a similar too that is fault tolerant, that is it will continue to read the disk even though it is broken/there are areas that cannot be read:
https://www.technibble.com/guide-using- ... over-data/

It will write zeros to areas that cannot be read. When you read an entire disk, if these bad areas happen to be inside some files, then perhaps only these files will be corrupt and broken. If, however, these bad areas happen to be in the "index" of the disk the entire resulting disk image might be unreadable. Both of these tools allow you to write partitions or disks to many different file formats (.iso or .img or others). When you have this file, you can either mount it in a file manager and use it like other directories in your computer or burn it to a cd or dvd or write it again to usb stick/sd card/hard drive.

There are recovery tools like the testdisk that you mention that can try to "guess" a data structure of disk image that has missing information.

Post Reply