Newsgroup: it.comp.os.linux.ubuntu
Titolo: How to mark phisically damaged clusters/sectors whilst still trying to restore an "imaged" cloned disk

 
I beg your pardon for the cross post. I know it's evil, but 
I'm in a terrible hurry and in a bad mess :\
 
I'm in this messy situation which I never hade to manage before.
 
I had a crash at the laptop (work) PC, which had win 8.1.
I had independently planned to pass to Mint in late June, 
after finishing lessons, but the crash is forcing my hand to 
anticipate it.
 
At first I was thinking of some sort of severe SW 
malfunction (it was being badly slow despite very frequent 
cleanup and defrag). It had been hibernation to give me this 
illusion, though.
In fact, at the first TRUE reboot, the OS wouldn't start 
anymore.
Also usb recovery tools didn't work (with oracular errmsgs).
 
Trying to rescue the rescuable (with ReDo Backup and 
Recovery DVD), the NTFS DATA partition was cloned no problem.
The system partition is emerging more and more devastaded.
The disk was quite new, less than 1 year old ... but now I 
recall I had hit the machine with a fist due to its 
prolonged slowness, hangs, the app does not respond etc, at 
lesson, for frustration, and I could have affected the head 
while hovering the OS partition. I can't hear alarming noise 
now, so the mechanism is still functioning elsewhere.
 
Now, as I stated, I'm trying to speed un the planned 
transition, using the desktop system imaged with all the 
Mint sw I use at home just installed (I took a full image of 
the disk and all the system, swap, boot partition, except 
from HOME, with the same ReDo Backup and Recovery DVD) and 
I'm going to try to copy it to the laptop. The two machines 
have both the same amount of Ram and HDD.
 
Well It might not work as I have a nVidia driver ... but 
I'll assume the risk
 
My worries (and related questions) are : as the laptop disk 
is PHISICALLY damaged to some extent (I still don't know 
exactly how much)
1) how can I precisely get this data ? I'd need a linux disk 
surface analysis tool that, BOTH logs some report in a human 
readable form (to let me decide if the disk, new !, is to 
dispose of, or is worth while trying to keep it "patched"), 
AND to MARK THEM AS UNUSABLE (if this is possible)
2) Do you think the cloning/restoring SW is smart enough to 
notice the clusters marked as BAD and to avoid to use them 
even if restoring an image ? An image with not the exact 
layout would work ? I'm restoring Linux Mint, I have no idea 
to what extent it is bound to physical layout of the single 
files ... but trying to use the bad clusters would abort the 
restoration (or cease working later anyway).
 
Moreover : do you happen to know any SW compatible with 
split GZip disk image format generated by ReDo sw, able to 
restore it bad clusters-aware ?
 
I hope very much I had been able to explain clearly my 
problem ... very often I resulted confusing to native 
speakers and beyond :(
 
One more broader question : in general, partitioning / 
formatting SW (like GParted or Gnome Disks, the ones I use 
more), how do they behave when they "find" sectors or 
clusters marked as bad by some other SW ? They keep track of 
it ? I'd like a prudential approach rather a tight fisted 
one. I'm afraid that copying partition in general does not 
respect such diagnosed damage ...
 
 
Ciao and tnx in advance for any suggestions
 
 
-- 
1) Resistere, resistere, resistere.
2) Se tutti pagano le tasse, le tasse le pagano tutti
Soviet_Mario - (aka Gatto_Vizzato)


If I understand what you are saying, you became frustrated and hit the
laptop with your fist, while it was on. It sounds like you have damaged
the hard disk in the machine. In other words " You screwed the pooch".
My advice is a to buy an ssd for your laptop and move to Linux Mint
promptly. Forget trying to recover Windows. You are going to spend a lot
of time, wated effort, and money trying to recover from a dmaged "Hard
Disk". Cut your losses and move on.


Also buy a simple 1TB external USB if (or larger) if you want to restore 
your Windows image there so you can explore it and extract files.
 
Linux will easily read a NTFS formatted external USB drive.  So you 
could copy all your personal docs and pics etc to the linux drive.
 
A small reallllllllllly cheap 64G SSD would load Linux easily.  I've 
loaded Linux Mint Cinnamon 64bit on a few 16 Gig USB sticks for friends 
to play with.  They are slow on USB sticks but work.
 
My point is you don't need to spend money on a large SSD if money is an 
issue.  I've seen $29 or so 64G's on sale.  Then once up and all the 
data you want from the 1TB external is extracted, you could format it 
for Linux ext4 and use it, or split it into two partitions and keep the 
old Windows stuff for the hell of it and the 2nd partition format ext4 
for Linux.
 
The only reason I say make a linux partition is that I find Linux reads 
NTFS fine and writes it fine for the most part.  Not 100% fool proof 
though.   I've had to do a chkdsk on my internal 2nd HD on my laptop 
that is NTFS.  I've heard but have no proof or docs that it's not the 
best issue.   People point a finger at making folders.
 
Either way, there are a ton of options.    Along with utility disks you 
can download and boot from that will let you do a 'chkdsk /R X:' and it 
will check and fix every sector on the drive.   That or just format and 
not the quick format so it marks bad sectors.   But I'm not sure how 
restore programs will handle the HD.  Does it reformat it on it's own 
and screw up all you good work?
 
Al.


The main problem with NTFS is that it doesn't respect Linux permissions.
 
-- 
Caver1


True.  Everything is rwxrwxrwx.  I hate it.  Opening a text file it 
wants to know if I want to execute it. :-)
 

 hit the machine with a fist due to its prolonged slowness
 
I saw Bruce Lee do that in "Fist of Fury".
 
*******
 
On NTFS, $BADCLUS is as large as the capacity of the partition,
and is a sparse file. By "occupying" clusters, $BADCLUS prevents
them from being used for regular file storage. That's how
bad clusters are marked. If the entire partition had no good
storage at all, the $BADCLUS structure would be the same
size as the entire partition (covering up the whole partition
as a result, and preventing storage).
 
https://en.wikipedia.org/wiki/NTFS
 
 
   "8  $BadClus   A file that contains all the clusters marked
                  as having bad sectors. This file simplifies
                  cluster management by the CHKDSK utility, both
                  as a place to put newly discovered bad sectors,
                  and for identifying unreferenced clusters. This
                  file contains two data streams, even on volumes
                  with no bad sectors:
 
                  an unnamed stream contains bad sectors - it is
                  zero length for perfect volumes;
 
                  the second stream is named $Bad and contains all
                  clusters on the volume not in the first stream.
    "
 
That suggests a bad block scan via CHKDSK run, will
mark sectors which cannot be read (i.e. return a CRC
error after 15 seconds of read attempts). On a severely
damaged partition, this could take... forever.
 
You must use the correct command line parameters to
CHKDSK, to instruct it to scan the entire partition
sector by sector. And so on. When a sector doesn't
respond, the entire 4KB cluster should be marked off.
 
To get an estimate of the level of damage, you could
use "gddrescue" to scan the volume while pretending
to clone it. It keeps a log file, with information
about which sectors it hasn't copied yet. It takes
just as much time as CHKDSK would take on a damaged
volume, but it does copy any data it can access.
 
An SSD can be more shock-resistant than a hard drive,
but the shock rating should not be accepted at face value.
And be careful, as a typical SSD is 7mm thick, while
older laptops have a 9.5mm bay, and the drive may not
be properly supported against large shocks as a result
(like dropping the laptop). With a little bad luck,
the connector could snap. They make 2.5mm spacer rings
(rectangular cheap plastic), but I've yet to receive one
in an SSD box. They don't seem to include them.
 
    Paul

     Paul
 
 


     Paul
I've been getting small foam pads of 2 different thicknesses with a peal 
off sticky on one side lately.   I had an old laptop and I guess I did 
get a 7mm SSD.  Was nice they included them cause I was clueless until 
then.  Luckily I had the big slot and not the small.
 
Can't say the same for my new laptop.  I tried to use the CD drive HD 
caddy to go in the new one and this was a mismatch.  Old CD drive bay 
was thick and would not go in the new one.   So that got tossed! :-(
 
Al