1

My Windows 8 is missing in grub after installing a new linux distro (elemetary os), I already have Ubuntu.

I booted into liveUSB and ran boot-repair and was Grub fixed, but when I boot into Ubuntu now I get kernel panics.
Output of fdisk -l:

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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
Disk identifier: 0x78a55a5f

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    29296639    14647296   83  Linux
/dev/sda2        29296640    78125055    24414208   83  Linux
/dev/sda3       173058048   200400895    13671424   83  Linux
/dev/sda4       200402942   488392064   143994561+   f  W95 Ext'd (LBA)
/dev/sda5       204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda6       204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda7       204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda8       204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda9       204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda10      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda11      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda12      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda13      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda14      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda15      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda16      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda17      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda18      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda19      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda20      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda21      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda22      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda23      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda24      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda25      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda26      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda27      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda28      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda29      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda30      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda31      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda32      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda33      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda34      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda35      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda36      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda37      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda38      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda39      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda40      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda41      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda42      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda43      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda44      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda45      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda46      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda47      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda48      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda49      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda50      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda51      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda52      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda53      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda54      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda55      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda56      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda57      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda58      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda59      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
/dev/sda60      204802112   283592703    39395296    7  HPFS/NTFS/exFAT
Frantique
  • 8,435
  • 35
  • 51
user310861
  • 11
  • 1
  • possible duplicate of [How to manually fix a partition table ?](http://askubuntu.com/questions/48717/how-to-manually-fix-a-partition-table) – bain Jul 31 '14 at 08:32

1 Answers1

1

Your partition table is badly damaged. Logical partitions are defined using a linked-list data structure, which means that each partition definition includes a pointer to the next one in the list. (The final one is obviously an exception; its pointer is a code to terminate the list.) Given that all your logical partitions (/dev/sda5 through /dev/sda60) are identical, my suspicion is that you've got one logical partition that's pointing to itself, thus creating an infinite loop of identical partitions. This is obviously not good, and any program that lacks an explicit way to deal with such an error will misbehave in one way or another. That includes the Linux kernel, and it's conceivable that this is the cause of your kernel panics.

It's possible that my FixParts program (part of the gdisk package in Ubuntu) will fix this problem, but I don't recall what, if anything, I did to handle such problems. My suspicion is that I just limited the number of partitions it could load, so it will stop after a while. It should then note the overlap and omit all but one from the table it writes out. OTOH, it's possible that FixParts will crash and burn. FixParts doesn't write anything to disk until you tell it to do so, though, so even if it crashes, it shouldn't make matters worse.

You may have one or more partitions lost after that one -- your disk is 488,397,168 sectors in size, but the final partition on the disk (not counting the extended partition, which is just a placeholder for logical partitions) ends at sector 39,395,296. If you're missing partitions, you'll need to use a tool like TestDisk to recover them. It's also possible that TestDisk could correct the problem with your infinite loop of partition definitions.

Rod Smith
  • 43,599
  • 7
  • 62
  • 102
  • I already reinstall my ubuntu and the problem gone now. But one of my data partition lost. I testdisk it and now im stuck at grub rescue. I ran sudo fdisk -l only appear /dev/sda1 – user310861 Jul 31 '14 at 16:33
  • I just recently stumbled upon an issue like this. I used fixparts to turn a partition into logical, then attempted to install windows: I removed another partition from the windows 7 installer disk manager, and that immediately froze, probably following the newly created infinite cycle. It appears that blkid (and libblkid) just crashes with OOM when such a reference cycle appear. Funny thing is is that mount and systemd-udev seem to depend on libblkid, so... go figure (and my mbr backup was in a sane but now unmountable partition). It would be nice if fixparts could do something about this. – Lorenzo Pistone Oct 09 '15 at 15:11