LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-03-2021, 09:11 AM   #1
cbbuccaneere
LQ Newbie
 
Registered: Mar 2021
Posts: 26

Rep: Reputation: Disabled
Help on partition resto ...


I was in DiskPart / Windows CLI , and selected Disk 1 Volume Clean .

Whole disk is clean - apparently Clean is a task ONLY for whole disk ; turned off immediately .

I've now run a trial commercial program that has found all 4 partitions (NTFS / Ubuntu / W7 / SWAP) + MBR , and I'll pay if I have to .

Before that , anyone help me with Linux / Unix syntax in live environment to restore the partitions ?
 
Old 03-03-2021, 09:29 AM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Testdisk can restore partitions and files, most Linux liveCD's have it.
 
1 members found this post helpful.
Old 03-03-2021, 09:33 AM   #3
cbbuccaneere
LQ Newbie
 
Registered: Mar 2021
Posts: 26

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
Testdisk can restore partitions and files, most Linux liveCD's have it.
Thanks !

This can be run in 16.04 live environment ? (the Ubuntu OS is 10.04 ext3)

28 TB of media , all backed up , but 250 G disk was NOT
 
Old 03-03-2021, 09:36 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
Quote:
Originally Posted by cbbuccaneere View Post
This can be run in 16.04 live environment ?
Yes, it should work
 
Old 03-03-2021, 11:47 AM   #5
cbbuccaneere
LQ Newbie
 
Registered: Mar 2021
Posts: 26

Original Poster
Rep: Reputation: Disabled
I chose Analyse' instead of Advanced .

No bootable partitions found .

Now it's analyzing cylinders . Lucky it was a 250 G instead of one of the 8 TB's .......
 
Old 03-03-2021, 11:54 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
https://www.slashroot.in/data-and-pa...using-testdisk
 
1 members found this post helpful.
Old 03-03-2021, 12:57 PM   #7
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Your testdisk version must be recent enough to deal with GPT partition table.
 
1 members found this post helpful.
Old 03-03-2021, 01:05 PM   #8
cbbuccaneere
LQ Newbie
 
Registered: Mar 2021
Posts: 26

Original Poster
Rep: Reputation: Disabled
I think I got a different version of TestDisk ; different options now ???

I see no Restore / Recreate / Write options , to restore partitions ...

https://www.linuxquestions.org/quest...1&d=1614798189
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2021-03-03 18-59-05.png
Views:	21
Size:	66.3 KB
ID:	35779  
 
Old 03-03-2021, 01:52 PM   #9
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
cbbuccaneere,

before doing any actual writing you should back up the whole drive, the tool for this is ddrescue and you need obviously another hard drive with at least 250 GB free space to accomplish this.
 
1 members found this post helpful.
Old 03-04-2021, 07:46 AM   #10
cbbuccaneere
LQ Newbie
 
Registered: Mar 2021
Posts: 26

Original Poster
Rep: Reputation: Disabled
Alright ; I've heard of ddrescue , but never used it .

I HAVE used cp in CLI successfully - cp /dev/sd1 /dev/sd2 , to copy an ENTIRE drive , including MBR . WITH multiple partitions and OS'es ... edit : should have said cp /dev/sda /dev/sdb

You guys think cp would work as well as ddrescue , in this case ?

Quote:
Originally Posted by Emerson View Post
cbbuccaneere,

before doing any actual writing you should back up the whole drive, the tool for this is ddrescue and you need obviously another hard drive with at least 250 GB free space to accomplish this.

Last edited by cbbuccaneere; 03-04-2021 at 08:24 AM.
 
Old 03-04-2021, 08:08 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
cp cannot copy multiple partitions (or at least not the best tool to do that). try dd.
 
1 members found this post helpful.
Old 03-04-2021, 08:34 AM   #12
cbbuccaneere
LQ Newbie
 
Registered: Mar 2021
Posts: 26

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
cp cannot copy multiple partitions (or at least not the best tool to do that). try dd.
What then would be correct syntax for entire disk 1 -> entire disk 2 ? ddrescue x y

ed.: I looked at syntax options in ddrescue --help , but don't really need to get it wrong !!!

-------------------
My example previous post was bad - cp /dev/sda /dev/sdb . I DID do this task once successfully with 2 4-partition , multi-OS disks , including MBR , about 10 years ago .

Copied disk booted perfectly . Does cp no longer do this ???

Last edited by cbbuccaneere; 03-04-2021 at 08:41 AM.
 
Old 03-04-2021, 09:21 AM   #13
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
no, that is the tool dd or dcfldd (which is an enhanced dd).
https://www.linuxnix.com/what-you-sh...ux-dd-command/
you can use ddrescue or testdisk after that.
dd is used to make a copy, ddrescue or testdisk is used to recover data/files from it.
 
1 members found this post helpful.
Old 03-04-2021, 09:41 AM   #14
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
pan64,

ddrescue is for making the copy, it has advantage over dd because it is meant for making copies even when some sectors are hard to read.
 
1 members found this post helpful.
Old 03-04-2021, 10:04 AM   #15
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
Quote:
Originally Posted by Emerson View Post
pan64,

ddrescue is for making the copy, it has advantage over dd because it is meant for making copies even when some sectors are hard to read.
Ok, in that case sorry, something I definitely forgot, reckon wrongly.

Last edited by pan64; 03-04-2021 at 10:07 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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:03 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