From: Mick <michaelkintzios@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] data recovery advice needed
Date: Tue, 18 Dec 2018 18:33:44 +0000 [thread overview]
Message-ID: <90896380.JMbBXBUO1G@dell_xps> (raw)
In-Reply-To: <LGFV67KR.TOQWN6N6.4NGPFJKQ@LYMQ6JKB.ORDJQYR6.ZZBANBXS>
[-- Attachment #1: Type: text/plain, Size: 2630 bytes --]
On Tuesday, 18 December 2018 17:49:37 GMT Jack wrote:
> On 2018.12.18 12:42, Mick wrote:
> [snip...]
>
> > So, I used losetup with --offset on the failing drive itself over USB
> > 2.0 and was able to mount and recover all the NTFS files.
>
> I definitely need to read up on that one - I totally unfamiliar with it.
If you are not able to mount a partition because of a 'device not found ...'
type of error use c/f/gdisk et al. to find the sector at which the partition
in question starts. Let's say gdisk shows partition 6 starts at sector
1,615,872 and the sector size is 512 bytes. The starting offset for losetup
should be:
1,615,872 x 512 = 827,326,464
Similarly, let's say the size of the partition is shown as being 1,910,121,163
sectors, which gives a size of 977,982,035,456 in bytes:
1,910,121,163 x 512 = 977,982,035,456
Then add the above parameters in the losetup command to create a loopback
device as follows:
losetup -o 827326464 --sizelimit 977982035456 --sector-size 512 -P -r -v /dev/
loop4 /dev/sdb
and subsequently try to mount it:
mkdir /mnt/recovery
mount /dev/loop4 /mnt/recovery
> > Over the years I've used clonezilla, ddrescue, testdisk, photorec and
> > losetup to recover files. On a couple of times where data on the
> > disk had been overwritten by subsequent operations, I was not able to
> > recover the affected files. So, if when moving the partition data
> > was overwritten I suspect it will be very difficult to recover this
> > with conventional software tools. However, it doesn't hurt to try.
> >
> > :-)
>
> I should be in good shape there. The partition's new location should
> have the first half intact, and since the overwriting was of the first
> part of the old location, it's second half should be intact. The files
> should all be there - but I imagine I might have to play with any
> directories which were successfully move, but not the stuff they point
> to. Of course, all of this depends on recovering from the read errors
> - so ddrescue needs to finish first.
This is what I would try:
1. dd the previously moved first half to a new partition/device.
2. dd the intact second half from the corresponding second half offset
position of the overwritten partition to the new partition/device. Use --seek
and --skip in the dd command as appropriate to achieve this.
This way you should be able to stitch together the two halves, hoping that no
bits/bytes were lost when the move/overwritting occurred back then. If the
original filesystem is not recoverable you should be able to recover
individual files with photorec.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-12-18 18:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-15 23:33 [gentoo-user] data recovery advice needed Jack
2018-12-16 0:06 ` Grant Taylor
2018-12-16 0:19 ` Rich Freeman
2018-12-17 19:32 ` Jack
2018-12-17 19:42 ` Rich Freeman
2018-12-17 20:53 ` Grant Taylor
2018-12-17 20:45 ` Grant Taylor
2018-12-18 12:21 ` Wols Lists
2018-12-18 14:20 ` Dale
2018-12-18 15:56 ` Grant Taylor
2018-12-18 21:28 ` Marc Joliet
2018-12-19 11:51 ` Mick
2018-12-18 17:43 ` Jack
2018-12-17 22:32 ` Heiko Baums
2018-12-17 23:19 ` Jack
2018-12-18 9:43 ` Peter Humphrey
2018-12-18 17:11 ` Jack
2018-12-18 17:42 ` Mick
2018-12-18 17:49 ` Jack
2018-12-18 18:33 ` Mick [this message]
2018-12-18 18:58 ` Grant Taylor
2018-12-18 18:51 ` Grant Taylor
2018-12-19 11:43 ` Mick
2018-12-19 18:46 ` Grant Taylor
2018-12-19 22:16 ` Mick
2018-12-19 23:02 ` Grant Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=90896380.JMbBXBUO1G@dell_xps \
--to=michaelkintzios@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox