Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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 ???
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.