Author Topic: messed up my partition table? how to recover?  (Read 3839 times)

harishpathangay

  • Guest
messed up my partition table? how to recover?
« on: April 29, 2016, 11:13:26 pm »
Hi,
I was installing Antergos with peppermint os and win 7 dual boot..
Installation exited because of no internet connection. But after that i do not see any of my linux partitions.

fdisk -l
Code: [Select]
Failed to read extended partition table (offset=144344025): Input/output error
Disk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x31a431a3

Device     Boot    Start       End   Sectors  Size Id Type
/dev/sda1             63  41945714  41945652   20G  7 HPFS/NTFS/exFAT
/dev/sda2       41945776 312580095 270634320  129G  f W95 Ext'd (LBA)
/dev/sda5       41945778 144344024 102398247 48.8G  7 HPFS/NTFS/exFAT

As you can see, /dev/sda2 is extended partition and i do not see the following partitions under them:
/dev/sda6 - windows data partition
/dev/sda8 - peppermint os partition
/dev/sda9 - antergos  os partition - this did not go through complete install.
if i boot from hard disk i get error and goes into grub rescue prompt.
how do i recover my missing partitions?

minimum i need to get /dev/sda6 back.
thanks,
harish pathangay
« Last Edit: April 29, 2016, 11:53:27 pm by AndyInMokum »

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4889
  • Karma: 1058
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 10 (64-bit)
Re: messed up my partition table? how to recover?
« Reply #1 on: April 29, 2016, 11:56:54 pm »
Hi harishpathangay, for future reference, could you please remember to encapsulate terminal outputs with the Insert, Code # function.  For extra long outputs, please use the Spoiler, Sp function.  These preserve the original format of the output.  This makes it easier for future visitors to relate to their own issues.  These functions are found in the forum editor, above the,  :-[ Embarrassed and  the :'( Cry emoticon respectively.  I've done this for you this time - many thanks ;).
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline zebedeeboss

  • Global Moderator
  • Hero
  • *****
  • Posts: 3233
  • Karma: 625
  • Life first... Peppermint a close 2nd :)
    • View Profile
  • Peppermint version(s): P10 / P9 Respin
Re: messed up my partition table? how to recover?
« Reply #2 on: April 30, 2016, 12:16:56 am »
Hi harishpathangay

It's always annoying and a little scary when that happens.   First thing I usually do is "OMG" when did I last back up....   However, thankfully there are a lot of tools out there to help you.  One of them for me is http://www.supergrubdisk.org/super-grub2-disk/  You will have to read the help files and maybe watch a YouTube video to get a Step by Step  guide on how to use it, if memory serves me - boot the CD/DVD/USB you made of Super Grub - select the everything option and then choose the Linux OS you need to boot into.  Now I am suggesting you boot into Linux and not windows as with the Linux OS you can re-install Grub and then it should be back to normal. {edit} As long as the Antergos error hasn't "really " messed up your disk(s).

Now, you will have to forgive me as I am not good at writing "Technical" replies.  You will have to wait for others to post, but this gives you something to work with in the mean time.

Good Luck - hope it all goes well and you can get it fixed.
« Last Edit: April 30, 2016, 12:32:45 am by zebedeeboss »
Be Kind Whenever Possible...   It is Always Possible - Dalai Lama

P10r x64 Desktop - AMD Threadripper 2950X - 64Gb RAM - NVIDIA RTX2080Ti 11Gb - 2 x 27" 4k

Offline Slim.Fatz

  • Global Moderator
  • Veteran
  • *****
  • Posts: 2343
  • Karma: 616
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: messed up my partition table? how to recover?
« Reply #3 on: April 30, 2016, 12:23:38 am »
Hi harishpathangay,

If the tip from zebedeeboss does not help then you might want to try using a "rescue distro" such as SystemRescueCD which you can download from http://www.sysresccd.org/ because it is loaded with all sorts of "rescue tools".

Good luck, my friend!

Regards,

-- Slim
Respect science, respect nature, respect each other.

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4889
  • Karma: 1058
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 10 (64-bit)
Re: messed up my partition table? how to recover?
« Reply #4 on: April 30, 2016, 12:51:24 am »
Hi harishpathangay, here's another link with Live rescue software: http://www.supergrubdisk.org/rescatux/.  I've used this one and it works.  I keep an updated ISO loaded on a thumb drive, just in case something bad happens.  Good luck with it buddy, I hope you get it back to normal  ;).
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: messed up my partition table? how to recover?
« Reply #5 on: April 30, 2016, 06:33:46 am »
What's the output from:
Code: [Select]
sudo parted -l
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

harishpathangay

  • Guest
Re: messed up my partition table? how to recover?
« Reply #6 on: April 30, 2016, 09:54:38 am »
Hi All,
I went into cfdisk and saw that both of my partitions /dev/sda8 and /dev/sda9 are completely missing.
It is reported as free space.

i did create new partitions in the free space and have installed antix 15 which is what i have in my usb stick.
i am very disappointed with all the mess that antergos created for me here.

Hi PCNetSpec,
Now i have a running Antix 15 system. here is the output.
Code: [Select]
Model: ATA Hitachi HTS54251 (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type      File system  Flags
 1      32.3kB  21.5GB  21.5GB  primary   ntfs
 2      21.5GB  160GB   139GB   extended               lba
 5      21.5GB  73.9GB  52.4GB  logical   ntfs
 6      148GB   160GB   12.0GB  logical   ext4


Please look at output of fdisk -l
Code: [Select]
$ sudo fdisk -l

Disk /dev/sda: 160 GB, 160039272960 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        2611    20972826    7  HPFS/NTFS
/dev/sda2            2612       19458   135315495    f  Extended LBA
Warning: Partition 2 does not end on cylinder boundary.
/dev/sda5            2612        8985    51191122    7  HPFS/NTFS
Warning: Partition 5 does not end on cylinder boundary.
/dev/sda6           17993       19458    11767612   83  Linux
Warning: Partition 6 does not end on cylinder boundary.


I am not able to install anything in the unallocated space by ceating new partitions. I do not know why? Please let  me know.
Thanks,
Harish Pathangay

Offline murraymint

  • Trusted User
  • Veteran
  • *****
  • Posts: 2170
  • Karma: 441
  • soft boiled with a yolk of gold
    • View Profile
  • Peppermint version(s): 7, 8, 9
Re: messed up my partition table? how to recover?
« Reply #7 on: April 30, 2016, 10:02:57 am »
If you wanted your old partitions back you shouldn't have tried to make any new ones. That could make it impossible.

harishpathangay

  • Guest
Re: messed up my partition table? how to recover?
« Reply #8 on: April 30, 2016, 10:39:46 am »
hi murryamint,
i do not  understand how any of the grub tools will help me, if cfdisk shows there is no partition sda8 and sda9.
it is reporting those two spaces combined together as free space in cfdisk command.
do you will i still be able to recover if it is reported as free space?

thanks,
harish pathangay

Offline zebedeeboss

  • Global Moderator
  • Hero
  • *****
  • Posts: 3233
  • Karma: 625
  • Life first... Peppermint a close 2nd :)
    • View Profile
  • Peppermint version(s): P10 / P9 Respin
Re: messed up my partition table? how to recover?
« Reply #9 on: April 30, 2016, 10:50:45 am »
Hi harishpathangay

Did you do anything to the partitions - did you delete them - did you re-use them ?   The new antix15 you installed... was it in "other" free space you had or did you re-use the partitions you thought were gone   ie /dev/sda8 and /dev/sda9

Please do not try and do anything else until you have received technical advise.  Trying things and guessing just makes it harder/impossible for us to help you.

Not trying to be rude but
Quote
i do not  understand how any of the grub tools will help me, if cfdisk shows there is no partition sda8 and sda9.
is exactly why you came here for advise in the first place.  You maybe right but then again, you may not be.  I know its hard and frustrating but patience is your best friend here.  We can't all be at the keyboard instantly to help but someone will eventually come along with the skills to try and help you recover those partitions.
« Last Edit: April 30, 2016, 11:03:11 am by zebedeeboss »
Be Kind Whenever Possible...   It is Always Possible - Dalai Lama

P10r x64 Desktop - AMD Threadripper 2950X - 64Gb RAM - NVIDIA RTX2080Ti 11Gb - 2 x 27" 4k

harishpathangay

  • Guest
Re: messed up my partition table? how to recover?
« Reply #10 on: April 30, 2016, 12:02:00 pm »
Hi, zebedeeboss,
I am not that linux expert and all.

i did not delete the partitions.i had sda8 and sda9. i wanted to install antergos in sda9. while installing antergos, power went down.no internet connection was there. antergos requires internet connection and the installer just hanged. so i had to quit the installation. after that, i could not boot into laptop. it came to grub rescue prompt.

i booted through live cd, and looked at cfdisk output, it did not show me sda8 and sda9. it showed as free space of 80GB.
i assume or suspect the antergos installer deleted the partitions.

i thought i could never recover those partitions because they are just simply not there. hence created new patitions in free space and installed antx 15.
after seeing cfdisk output i lost hope and created new partitions in free space.

if cfdisk shows as free space, then will i be able to get or recover those partitions sda8 and sda9? i do not know.
now it is late i guess to recover those partitions.

Thanks,
Harish Pathangay

Offline zebedeeboss

  • Global Moderator
  • Hero
  • *****
  • Posts: 3233
  • Karma: 625
  • Life first... Peppermint a close 2nd :)
    • View Profile
  • Peppermint version(s): P10 / P9 Respin
Re: messed up my partition table? how to recover?
« Reply #11 on: April 30, 2016, 12:22:24 pm »
Hey harishpathangay... neither am I

It's a hard lesson learnt and we have all been there I am sure.  I don't know if there are any tools around that can "undo" what you have done.  I will leave that to the Techy's... just one word of advise for next time, because as sure as eggs break... it will happen again.  Don't assume that just because one utility cant see them another won't be able to.  I maybe wrong... I am quite often  :o   but one thing I have learnt is "Ask a question?"     wait    for the answer  :)
Be Kind Whenever Possible...   It is Always Possible - Dalai Lama

P10r x64 Desktop - AMD Threadripper 2950X - 64Gb RAM - NVIDIA RTX2080Ti 11Gb - 2 x 27" 4k

harishpathangay

  • Guest
Re: messed up my partition table? how to recover?
« Reply #12 on: April 30, 2016, 10:35:44 pm »
Hi zebedeeboss,
thanks, yeah...difficult time for me...

Hi All,
Thanks for all your support and help. This forum has been very helpful.

At this stage i am only looking for clarification on will i be able to recover a partition if cfdisk shows free space instead of partitions. is there a chance?
It will only be good to know of my mistake,I cannot act on that information, since i have done the deed of creating new partitions.

Thanks,
Harish Pathangay

Offline murraymint

  • Trusted User
  • Veteran
  • *****
  • Posts: 2170
  • Karma: 441
  • soft boiled with a yolk of gold
    • View Profile
  • Peppermint version(s): 7, 8, 9
Re: messed up my partition table? how to recover?
« Reply #13 on: May 01, 2016, 03:51:55 am »
Hi Harish,

My condolences about your HD disaster. Is the sda6 your original data from Windows that you did manage to recover?

Since the partitions were missing this was not necessarily a Grub problem. But if something does go wrong with a drive and its partitions, the best thing to do is boot a live session of a recovery software. It's happened to me before when I was trying the preview version of Windows 10 on an old HD. I can't remember now what I used but I do have a multiboot USB stick that includes both Rescatux and Super Grub, mentioned by others before.

The System Rescue CD advised by SlimFatz would have been an excellent thing to try, with advice from the forum on how to use it if required.

If you overwrote the same space your old partitions were in, it looks doubtful anything there could be restored now.

My advice for next time would be to get another drive and backup your most important partitions to that using Gparted in a live session, or something similar. Then if something goes wrong, as it eventually will, you could make a blank partition table and just copy the partitions back over in minutes.

As zebedee says, a hard lesson and it happens to us all at some point, I think.

harishpathangay

  • Guest
Re: messed up my partition table? how to recover?
« Reply #14 on: May 01, 2016, 06:04:09 am »
hi,
agreed sir...it has been a terrible time for me.

thanks,
harish pathangay