LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-29-2019, 03:13 PM   #16
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,811
Blog Entries: 1

Rep: Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068

Quote:
Originally Posted by zavmat View Post
Error: Failed to synchronize cache for repo 'updates-modular'
Assuming you get network up, if simply waiting to try again fails, then try the following:
Code:
dnf clean all
dnf update
dnf install testdisk

Last edited by mrmazda; 01-29-2019 at 03:14 PM.
 
Old 01-29-2019, 03:15 PM   #17
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
And presumably there was some response to that ping, right?

I don't know what your issue might be. I had just downloaded and booted Fedora-Workstation-Live-x86_64-29-1.2.iso in a virtual machine, and that "dnf install testdisk" command worked just fine.

Sorry, I was entering my reply before you discovered that networking was, in fact, not up.

If that's not going to work, then I suggest that you download SystemRescueCd and put it on a CD or USB flash drive. That toolkit does include testdisk. Note: Putting SystemRescueCd on a USB flash drive is not as simple as it should be. The instructions are here.

Last edited by rknichols; 01-29-2019 at 03:18 PM. Reason: Sorry, ...
 
1 members found this post helpful.
Old 01-29-2019, 03:42 PM   #18
zavmat
Member
 
Registered: Oct 2018
Posts: 184

Original Poster
Rep: Reputation: Disabled
alright test disk is officially installed! Sorry to take you down a winding road there...

Last edited by zavmat; 01-29-2019 at 03:45 PM.
 
Old 01-29-2019, 03:54 PM   #19
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
OK, so from the root prompt run "testdisk /dev/sda" . It should come up with disk /dev/sda selected. Select (with the arrow keys) "Proceed" and press <Enter>.

On the next screen select "EFI GPT partition map" and press <Enter>.

On the next screen select "Analyze" and press <Enter>.

On the next screen you will see messages that the main and alternate GPT are invalid. No surprise -- you wiped them out. Run "Quick Search" and see if the partitions detected look like what you had before. Post the result if you want to.
 
1 members found this post helpful.
Old 01-29-2019, 04:04 PM   #20
zavmat
Member
 
Registered: Oct 2018
Posts: 184

Original Poster
Rep: Reputation: Disabled
looks pretty good to me, I'm just glad windows didn't get wiped...

Code:
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 750 GB / 698 GiB - CHS 91201 255 63
     Partition               Start        End    Size in sectors
>P MS Data                     2048     411647     409600 [SYSTEM]
 D MS Data                   673792  552939512  552265721
 D MS Data                   673799  552939519  552265721
 D MS Data                552939519 1105205239  552265721
 D MS Data               1094012926 1400688637  306675712
 D MS Data               1360289793 1412718592   52428800
 D Linux Swap            1400688640 1412714479   12025840
 D MS Data               1412718592 1465147391   52428800




Structure: Ok.  Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
                P=Primary  D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
     Enter: to continue
FAT32, blocksize=2048, 209 MB / 200 MiB
 
Old 01-29-2019, 04:17 PM   #21
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
I see that the 2nd and 3rd entries overlap, so they can't both be correct. That 3rd entry overlaps the 4th by 1 sector, so what I would do is change the characteristic to "P" for all entries except the 3rd one, then press <Enter> to continue. If, on the next screen, testdisk doesn't find anything to complain about, select "Write" and press <Enter>. (It might help to grit your teeth, hold your nose, cover your ears, and cross your fingers when doing that.)

The system might still not boot because of incorrect partition types. We can work on that next.
 
1 members found this post helpful.
Old 01-29-2019, 04:30 PM   #22
zavmat
Member
 
Registered: Oct 2018
Posts: 184

Original Poster
Rep: Reputation: Disabled
alright I'm getting a few "structure bad" responses whenever I change the partitions that are still D here:
Code:
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 750 GB / 698 GiB - CHS 91201 255 63
     Partition               Start        End    Size in sectors
 P MS Data                     2048     411647     409600 [SYSTEM]
 P MS Data                   673792  552939512  552265721
 D MS Data                   673799  552939519  552265721
 P MS Data                552939519 1105205239  552265721
 D MS Data               1094012926 1400688637  306675712
 P MS Data               1360289793 1412718592   52428800
 D Linux Swap            1400688640 1412714479   12025840
>D MS Data               1412718592 1465147391   52428800




Structure: Ok.  Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
                P=Primary  D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
     Enter: to continue
NTFS, blocksize=4096, 26 GB / 25 GiB
 
Old 01-29-2019, 04:41 PM   #23
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
Indeed there are some other overlaps that I hadn't noticed. It looks like this disk has gone through several cycles of partition changes and filesystems, and testdisk is seeing leftover old filesystem headers. I think the only thing to do is leave things as ther are here, proceed to the next screen, and select "Deeper Search". That's going to take quite a lot of time and produce more output, but with luck it will be possible to find a consistent set of partitions that makes sense.
 
1 members found this post helpful.
Old 01-29-2019, 04:50 PM   #24
zavmat
Member
 
Registered: Oct 2018
Posts: 184

Original Poster
Rep: Reputation: Disabled
It's analysing the cylinder as we speak, it's going to take some time like you said.
 
Old 01-29-2019, 07:03 PM   #25
zavmat
Member
 
Registered: Oct 2018
Posts: 184

Original Poster
Rep: Reputation: Disabled
Here it is:

Code:
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 750 GB / 698 GiB - CHS 91201 255 63

The harddisk (750 GB / 698 GiB) seems too small! (< 16495006 TB / 15002120 TiB)
Check the harddisk size: HD jumpers settings, BIOS detection...

The following partitions can't be recovered:
     Partition               Start        End    Size in sectors
   MS Data               1371546624 5225138636218422 5225137264671798 [multi-dev
   MS Data               1373078136 3258639578 1885561443
   MS Data               1373641178 5225138638312976 5225137264671798 [multi-dev
   MS Data               1413028960 1815450712  402421753
   MS Data               1465147391 1517576190   52428800
   Linux Raid            35378414727820530 32216808923708550 32867191214851989 [
   Linux Raid            35378414733958938 32216808929846958 32867191214851989 [
   Linux Raid            35378414738464218 32216808934352238 32867191214851989 [
   Linux Raid            35378415137389970 32216809333277990 32867191214851989 [
>  Linux Raid            35378415140317858 32216809336205878 32867191214851989 [
~K^UM-"=^E]
[ Continue ]
md 1.x L.Endian Raid 2088978687 - Array Slot : 2285961301 (), 16828001 TB / 1530
 
Old 01-29-2019, 09:48 PM   #26
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
Alas, that doesn't seem to be showing everything. I have to ask you to do it again, this time running "testdisk /log /dev/sda" and then showing the content of the tesstdisk.log file generated, either inline (wrapped in [CODE] ... [/CODE] tags please) or else attached as a text file.
 
1 members found this post helpful.
Old 01-29-2019, 10:13 PM   #27
zavmat
Member
 
Registered: Oct 2018
Posts: 184

Original Poster
Rep: Reputation: Disabled
Now it's showing a ton of partitions, There's gotta be over 100

Code:
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 750 GB / 698 GiB - CHS 91201 255 63
     Partition               Start        End    Size in sectors
>D MS Data                     2048     411647     409600 [SYSTEM]
 D MS Data                     2054     411653     409600 [NO NAME]
 D MS Data                    10272     419871     409600 [NO NAME]
 D MS Data                   673792  552939512  552265721
 D MS Data                   673792  584783204  584109413
 D MS Data                   673799  552939519  552265721
 D Mac HFS                  5024992    5067007      42016
 D Mac HFS                  5067004    5109019      42016
 D MS Data                 12296425   13668408    1371984 [GWM-9M-$ث݊M-= b~^dS
 D MS Data                 12296426   13668409    1371984 [GWM-9M-$ث݊M-= b~^dS
 D MS Data                 16369632  328939487  312569856
 D Mac HFS                122777084  122819099      42016
Structure: Ok.  Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
                P=Primary  D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
     Enter: to continue
FAT32, blocksize=2048, 209 MB / 200 MiB

Last edited by zavmat; 01-29-2019 at 10:52 PM.
 
Old 01-30-2019, 11:22 AM   #28
zavmat
Member
 
Registered: Oct 2018
Posts: 184

Original Poster
Rep: Reputation: Disabled
Sorry for the confusion, I quit out of testdisk and tried to get to where you want me to but I'm getting this result:

Code:
[root@localhost-live ~]# testdisk /log/dev/sda
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Unable to open file or device /log/dev/sda: No such file or directory
[root@localhost-live ~]#
 
Old 01-30-2019, 11:30 AM   #29
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
Quote:
Originally Posted by zavmat View Post
Sorry for the confusion, I quit out of testdisk and tried to get to where you want me to but I'm getting this result:

Code:
[root@localhost-live ~]# testdisk /log/dev/sda
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Unable to open file or device /log/dev/sda: No such file or directory
[root@localhost-live ~]#
There should be a space after "/log" .

If the log file is large, consider using https://pastebin.com rather than posting or attaching it here.

Last edited by rknichols; 01-30-2019 at 11:34 AM.
 
1 members found this post helpful.
Old 01-30-2019, 12:54 PM   #30
zavmat
Member
 
Registered: Oct 2018
Posts: 184

Original Poster
Rep: Reputation: Disabled
It brought me back to the select partition menu.

Edit: It's analyzing /dev/sda

Last edited by zavmat; 01-30-2019 at 02:22 PM.
 
  


Reply

Tags
fdisk, partitions



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
deleting duplicate lines without deleting first instance of the duplicated line jkeertir Linux - Newbie 2 02-07-2011 06:55 AM
I need help with deleting partitions, please.. the snucka Linux - Software 4 01-13-2005 03:28 PM
help with deleting partitions please the snucka Linux - General 1 01-13-2005 03:17 PM
Help with deleting partitions please... the snucka Linux - Hardware 1 01-13-2005 03:17 PM
Partitions, partitions, partitions..... Clueless in VA Linux - Newbie 7 08-08-2001 03:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:18 PM.

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