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

 

 

 

Cloned OS onto 3TB storage instead of USB stick

Ask for help with issues regarding the Installations of the Debian O/S.
Message
Author
I messed up bad
Posts: 26
Joined: 2017-06-05 04:49

Re: Cloned OS onto 3TB storage instead of USB stick

#21 Post by I messed up bad »

Drive was never filled so fragmentation should be minimal? My biggest concern is that something important was among the first 2.5gb ever transferred o to the drive.

Sure enough it has a 2.4gb partition and the rest is unallocated. Once I satisfied gnu ddrescue with the correct command, it began copying from one desktop usb drive to another at almost exactly one gig per minute so about a fifty hour job as yet unfinished.


Here is the advice cgrenier of testdisk has given me:

Use testdisk 7.1-WIP, EFI GPT, Analyse, Quick Search and if necessary Deeper Search.
TestDisk should find your NTFS partition using its NTFS backup boot sector.
When the partition is listed set it to P(rimary). On next screen, choose Write, confirm, BackupBS, confirm, Quit
Last edited by I messed up bad on 2017-09-25 11:31, edited 1 time in total.

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: Cloned OS onto 3TB storage instead of USB stick

#22 Post by dilberts_left_nut »

Sounds reasonable, although if it was originally mbr that might complicate things if testdisk rewrites it as efi - never had need to try that so good luck :)

As long as you're working on a copy you can try stuff and see (albeit with a 50hr reset if it all goes titsup - but probably just blanking the first 2048 sectors will 'reset' it - all recoverable data is well down the drive from there anyway).

I would think regular dd (as opposed to gddrescue) should work ok as well, as you're not dealing with any physical defects, just messed up data.

The end result should be a visible NTFS filesystem from which you can extract anything that isn't in first few GB.
AdrianTM wrote:There's no hacker in my grandma...

v&n
Posts: 624
Joined: 2015-02-04 02:57

Re: Cloned OS onto 3TB storage instead of USB stick

#23 Post by v&n »

I messed up bad wrote:Once I satisfied gnu ddrescue with the correct command, it began copying from one desktop usb drive to another at almost exactly one gig per minute so about a fifty hour job as yet unfinished.
Are both the drives USB3 connected to USB 3 ports? I wonder if the USB2 speed is the bottleneck here.

I just tested with my external USB3 WD Elements 2TB drive connected to the only USB3 port of my laptop, to copy its initial 4GBs to my internal Intel SSD (NTFS partition, so that itself is most likely another bottleneck here for the ntfs-3g driver), and the average speed I got was 41500 kB/s. That is, about 2.4 times the speed you are getting.

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Cloned OS onto 3TB storage instead of USB stick

#24 Post by dasein »

I messed up bad wrote:My biggest concern is that something important was among the first 2.5gb ever transferred o to the drive.
A valid concern, but not something you can fix. (See object lesson regarding backups, above.)

Regarding time... think of it this way: whatever time is required to clone the drive and recover the data is vanishingly small compared to the time required to recreate the data. (Bonus: it's time in which you can do other things.)

Good luck.

I messed up bad
Posts: 26
Joined: 2017-06-05 04:49

Re: Cloned OS onto 3TB storage instead of USB stick

#25 Post by I messed up bad »

dilberts_left_nut wrote:Sounds reasonable, although if it was originally mbr that might complicate things if testdisk rewrites it as efi - never had need to try that so good luck :)

As long as you're working on a copy you can try stuff and see (albeit with a 50hr reset if it all goes titsup - but probably just blanking the first 2048 sectors will 'reset' it - all recoverable data is well down the drive from there anyway).

I would think regular dd (as opposed to gddrescue) should work ok as well, as you're not dealing with any physical defects, just messed up data.

The end result should be a visible NTFS filesystem from which you can extract anything that isn't in first few GB.

:?

That confused me aswell. Im going to see what testdisk sniffs up first anyway but I wonder if cgrenier hasnt taken my statement about "tails writes a 2.5GB partition with gpt" and applied that to the entire drive. I would ask but he seems to only give the breifest possible assistance (which I completely understand, its more than nothing)

Yes the transfer is usb 2

I messed up bad
Posts: 26
Joined: 2017-06-05 04:49

Re: Cloned OS onto 3TB storage instead of USB stick

#26 Post by I messed up bad »

Also he told me to use the beta, 7.1

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: Cloned OS onto 3TB storage instead of USB stick

#27 Post by dilberts_left_nut »

Being a 3TB drive, it could well have been gpt to start with (sorry I conflated that with efi above) - might pay to try finding out with a search for the drive model specs or such.
His advice is probably better than mine.

You might also want to try blanking the start of the disk (with 'dd if=/dev/zero of=/dev/sd<whatever> bs=1M count=512') or such.
This will remove any drive/partition info from the tails install, that has nothing to do with the original layout you are trying to restore, and could potentially confuse testdisk.
AdrianTM wrote:There's no hacker in my grandma...

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Cloned OS onto 3TB storage instead of USB stick

#28 Post by dasein »

dilberts_left_nut wrote:You might also want to try blanking the start of the disk (with 'dd if=/dev/zero of=/dev/sd<whatever> bs=1M count=512') or such.
But be extra careful to specify the correct "whatever" :mrgreen:

@d_l_n -> I'm still running MBR, and barely know how to spell GPT, so please forgive my ignorance: why blank a half a gig? :?

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: Cloned OS onto 3TB storage instead of USB stick

#29 Post by dilberts_left_nut »

dasein wrote:why blank a half a gig? :?
No idea if Tails sets up an efi partition or has a multi-partition layout etc.

That seemed like a big enough guess to clobber any of that and is still well short of what has been overwritten anyway ... maybe just 2048 sectors would do, or maybe it doesn't help anyway.
But if it's blank, testdisk won't have the tails install as one of the things it's offering to fix/recover.

@OP - I'm really just guessing based on my past (fairly limited but mostly successful in appropriate circumstances) uses of testdisk - please do your own research before taking any of my advice :)
AdrianTM wrote:There's no hacker in my grandma...

v&n
Posts: 624
Joined: 2015-02-04 02:57

Re: Cloned OS onto 3TB storage instead of USB stick

#30 Post by v&n »

dasein wrote:
dilberts_left_nut wrote:You might also want to try blanking the start of the disk (with 'dd if=/dev/zero of=/dev/sd<whatever> bs=1M count=512') or such.
But be extra careful to specify the correct "whatever" :mrgreen:
I would replace 'extra' with 'extreme', as that was the starting point of the mess we are dealing with here. :twisted:

Also, just to emphasize, do whatever you have to on the 'image', nothing on the physical drive unless you plan to preserve the image in its original form.

I messed up bad
Posts: 26
Joined: 2017-06-05 04:49

Re: Cloned OS onto 3TB storage instead of USB stick

#31 Post by I messed up bad »

Lads im stuck and hopefully get a quick answer whike I have access to the hardware (meanwhile im looking for answer)

Ive made a *.img and need to mount it such that it is selectable by testdisk!

Ive tried using furius iso mount which mounts it, but not such that testdisk lists it as a selectable media

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: Cloned OS onto 3TB storage instead of USB stick

#32 Post by dilberts_left_nut »

AdrianTM wrote:There's no hacker in my grandma...

I messed up bad
Posts: 26
Joined: 2017-06-05 04:49

Re: Cloned OS onto 3TB storage instead of USB stick

#33 Post by I messed up bad »

Its mounted in a folder in my home

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: Cloned OS onto 3TB storage instead of USB stick

#34 Post by dilberts_left_nut »

Tried just adding the path to the image.as an argument to testdisk?

https://www.cgsecurity.org/wiki/Media_Image
AdrianTM wrote:There's no hacker in my grandma...

I messed up bad
Posts: 26
Joined: 2017-06-05 04:49

Re: Cloned OS onto 3TB storage instead of USB stick

#35 Post by I messed up bad »

Thanks I found the answer there.

Here goes!

Im not using the beta because I had trouble compiling with:
./configure

I messed up bad
Posts: 26
Joined: 2017-06-05 04:49

Re: Cloned OS onto 3TB storage instead of USB stick

#36 Post by I messed up bad »

Hmmmm so the quick analysis was slow (as I half expected) and as I got ready to tuck the laptop away for a couple of days it seemed to freeze!

So im taking this image home to put my desktop to the task. Maybe I can even manage to install 7.1 there.

Thanks for the fast response

Im gonna have to donate some $ to debian if/when this is over, for all the help so freely given

I messed up bad
Posts: 26
Joined: 2017-06-05 04:49

Re: Cloned OS onto 3TB storage instead of USB stick

#37 Post by I messed up bad »

What luck that when testdisk froze my laptop it seems to have trashed the hard disk where the image was located, because I get home and the whole drive is unallocated and wont mount. Gparted says its unallocated. Fdisk reports a gpt mismatch or similar, might be able to copy that in later... So I run testdisk on the disk containing the image :roll: and I go in and out of some options and it bloody freezes my PC! :shock:

v&n
Posts: 624
Joined: 2015-02-04 02:57

Re: Cloned OS onto 3TB storage instead of USB stick

#38 Post by v&n »

If it was a linux partition, a quick fsck should be able to fix it. Besides this, all I can say is - "bad luck!" :(

I messed up bad
Posts: 26
Joined: 2017-06-05 04:49

Re: Cloned OS onto 3TB storage instead of USB stick

#39 Post by I messed up bad »

I got the disk working again with testdisk and then using chkdsk in Windows, the image is there I dont know if it got.corrupted or not but the results running testdisk on the image are disappointing

Using the Intel option I got a result that made sense and I almost chose to write the suggested partitions except fat12? Nah fat12 cant be remotely right

Using efi gpt search it suggests six or seven primary partitions 1550 sectors each, all mac hfs. Out of 36000 ectors.

Im doing the deeper search

Fwiw these mac hfs partitions were revealed when I was fixing the 4gb disk which contains the image. I cant upload a photo here but I left them as D and kept the large ms data partition. Now when I search the image with efi those same small mac hfs ALLEGED partitions are all that comes up.

The fat 12 result at least made sense in terms of having two partitions, one being very large. but fat12? Come on this isnt 1990

So pending the deep search efi results I will probably try somw windows software

I messed up bad
Posts: 26
Joined: 2017-06-05 04:49

Re: Cloned OS onto 3TB storage instead of USB stick

#40 Post by I messed up bad »

Its worth mentioning that when testdisk finishes wuicjwsearch and displays the partitions it found, before you hit enter to proceed there is an option to hit L for load backup (not to be confused with backupBS which is part of the next step)

Im not game to see what it does, and nowhere can I find any reference to what it does!

Post Reply