LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-03-2021, 10:34 AM   #46
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484

You want to recover the copy first, but the copy is the file yourfile.img, NOT the 3TB drive.
 
Old 04-03-2021, 12:54 PM   #47
cbbuccaneere
LQ Newbie
 
Registered: Mar 2021
Posts: 26

Original Poster
Rep: Reputation: Disabled
Got it ; we're still on same page ...

ed.:
oops...

I thought the yourfile.img was OUTput of dd execution TO 3TB drive ???

Quote:
Originally Posted by computersavvy View Post
You want to recover the copy first, but the copy is the file yourfile.img, NOT the 3TB drive.

Last edited by cbbuccaneere; 04-03-2021 at 12:57 PM.
 
Old 04-03-2021, 07:10 PM   #48
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
yourfile.img was the output of the dd command to the file.
YOu can cd /mnt then run "testdisk ./yourfile.img" or just run "testdisk /mnt/yourfile.img" as I said earlier.
 
1 members found this post helpful.
Old 04-03-2021, 10:12 PM   #49
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Note that testdisk does not behave quite the same when run against an image file as it would when run against the actual hardware. Some of its actions are based on the obsolete CHS geometry of the drive, and it can't get that from the image file. Unless something has changed in its handling of drives larger than 2TB and GPT, you will have to set the geometry manually in order to build new partition table entries. testdisk scans are also based on the percieved geometry to some extent.
 
1 members found this post helpful.
Old 04-04-2021, 11:45 AM   #50
cbbuccaneere
LQ Newbie
 
Registered: Mar 2021
Posts: 26

Original Poster
Rep: Reputation: Disabled
I think I've lost the 3 TB Drive ; waiting delivery a new drive .

It was my only spare ...
 
Old 09-12-2021, 11:51 AM   #51
cbbuccaneere
LQ Newbie
 
Registered: Mar 2021
Posts: 26

Original Poster
Rep: Reputation: Disabled
Back onto partition recovery ; HTPC computer hasn't been touched , since HDD for backup failed (summer projects began ; some even got done) .

Have a new 3TB , to do a backup of drive with lost partitions ; prepping a dd backup that failed before .

2 Q's : (sda and sdb are reversed from earlier this year)

1) With the new 3TB , I first did a backup of another 1TB HDD onto the new 3TB , then created a 250G partition for the backup of original 250G drive. Will this interfere with a dd copy task , of original 250G , to the 250G partition on the new 3TB ?

2) Preparing to execute dd task with dd if=/sdb [the original 250] of=/250bu/file.img bs=32m [the new 3TB , partition 2] ?

And I think I asked this before ; how does that syntax designate that copied data actually goes to the new 3TB ; partition 2 ???
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2021-09-12 16-01-22.png
Views:	5
Size:	203.5 KB
ID:	37196  
 
Old 09-12-2021, 03:03 PM   #52
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Since you are creating an image file onto an existing partition you should
1. create the partition (adequately large to be certain the image will fit).
2. format the filesystem on the destination partition
3. mount the destination partition
4. name the output file of dd according to the path used for mounting the destination partition and the file name of choice.

Thus if the mount point of the partition where you are saving the file is /mnt then the dd command would read of=/mnt/filename.img.
 
1 members found this post helpful.
Old 09-13-2021, 08:04 AM   #53
cbbuccaneere
LQ Newbie
 
Registered: Mar 2021
Posts: 26

Original Poster
Rep: Reputation: Disabled
dd executed successfully (I left off block size parameter deliberately (to 512) ; runtime was no concern ) .

Testdisk reloaded to live environment ; re-run = EXACT same results as earlier this year ...

Next step ? And next step , on back-up , or on original 250 disk ?
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2021-09-13 09-51-53.jpg
Views:	3
Size:	242.7 KB
ID:	37203  

Last edited by cbbuccaneere; 09-13-2021 at 08:06 AM.
 
Old 09-21-2021, 06:36 AM   #54
cbbuccaneere
LQ Newbie
 
Registered: Mar 2021
Posts: 26

Original Poster
Rep: Reputation: Disabled
Still sitting at this point ; any more love 'round here ?
---
ed.: SWAP partition lit up now - what is step to restore that partition ?
-------

I ain't messed up anything yet ; rather no go in blind now .

TestDisk tutorials lead to Q's at this point ; even 1 you referred to , pan64 ........................

Quote:
Originally Posted by cbbuccaneere View Post
dd executed successfully (I left off block size parameter deliberately (to 512) ; runtime was no concern ) .

Testdisk reloaded to live environment ; re-run = EXACT same results as earlier this year ...

Next step ? And next step , on back-up , or on original 250 disk ?

Last edited by cbbuccaneere; 09-21-2021 at 06:38 AM.
 
Old 09-21-2021, 07:25 PM   #55
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
You don't ever need to restore a swap partition. Simply have the new partition of the desired size, run "sudo mkswap <partition name>", and you are done. You may also need to put an entry in /etc/fstab for the swap partition.

You have not said exactly what has been done to date. Do you think we can read your mind and know exactly what the next step is?

Detailed info as to what has been done is needed. As well as what you now plan/anticipate going forward.
 
Old 09-30-2021, 08:17 AM   #56
cbbuccaneere
LQ Newbie
 
Registered: Mar 2021
Posts: 26

Original Poster
Rep: Reputation: Disabled
Got partial restoration - can boot into Ubuntu ; 1st partition is still MIA . It's NTFS ; was an Win XP os , and I'd like to save the data .

Best way to attempt resto of that partition ?

XP re-install / repair disk ? TestDisk re-run on backed up HDD ?
Attached Thumbnails
Click image for larger version

Name:	Screenshot-15.png
Views:	3
Size:	77.9 KB
ID:	37334  
 
  


Reply



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
How to re-size root partition without loosing any data if the root partition is immediately followed by swap partition thebiggiantmouse Linux - Hardware 16 09-25-2019 12:06 PM
Hard Drive Partition Management - Mandriva Double Partition with Swap File partition moshebagelfresser Linux - Hardware 2 05-23-2008 10:46 AM
need help resizing an ext3 partition with an underlying partition... spiroth10 Linux - Software 1 07-30-2004 12:21 PM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 12:55 PM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 08:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01: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