0

I have tried to upgrade my windows from 7 sp 1 to 10 using the MediaCreationTool.exe as suggest in this page - howtogeek. It did not work as suggested and part way through the upgrade I was faced with a grub rescue prompt. I found some help with this at this page - grub-rescue. I couldn't make the highest voted method work due to being unable to find the bootable partition using ls (hd0,msdos6)/ etc. etc., so used the second highest voted method which requires booting from a rescue-usb and running boot-repair. The boot-repair log is here - pastebin. During the boot-usb session I noticed that the linux partitions are marked as unknown. Upon restart the windows 10 upgrade continued and finished as expected, except the boot menu doesn't appear with the option to boot into Ubuntu. I tried the advice on this page - boot-repair doesn't work. Setting both bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi and bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi in windows commandline with admin privilege didn't help. I tried to run TestDisk to regain the partitions that were lost. I am completely confused how to do this correctly. When I run TestDisk the list of partitions look like this after the quicksearch.

enter image description here enter image description here enter image description here enter image description here enter image description here

I need to get them back to the way they were and feel way over my head with the options available. Help will be much appreciated. If anyone can just inform me which were my primary, logical and extended partitions it would help.


edited -

the output of sudo fdisk -l during the usb recovery session is:

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x75487944

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      409599      203776    7  HPFS/NTFS/exFAT
/dev/sda2          409600   124969634    62280017+   7  HPFS/NTFS/exFAT
/dev/sda3       124971006  1465147119   670088057    f  W95 Ext'd (LBA)
Partition 3 does not start on physical sector boundary.
/dev/sda5      1435705408  1464936447    14615520    7  HPFS/NTFS/exFAT
/dev/sda6      1464936511  1465147119      105304+   c  W95 FAT32 (LBA)
Partition 6 does not start on physical sector boundary.

Disk /dev/sdb: 2002 MB, 2002780160 bytes
62 heads, 62 sectors/track, 1017 cylinders, total 3911680 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: 0x000a90a3

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          62     3909347     1954643    c  W95 FAT32 (LBA)

and the output of command sudo parted /dev/sda unit s print is:

Model: ATA Hitachi HTS54757 (scsi)
Disk /dev/sda: 1465149168s
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number  Start        End          Size         Type      File system  Flags
 1      2048s        409599s      407552s      primary   ntfs         boot
 2      409600s      124969634s   124560035s   primary   ntfs
 3      124971006s   1465147119s  1340176114s  extended               lba
 5      1435705408s  1464936447s  29231040s    logical   ntfs
 6      1464936511s  1465147119s  210609s      logical   fat32        lba

I am suggesting that the partitioning scheme in testdisk could look like this below. Although I need advice on this.

Disk /dev/sda - 750 GB / 698 GiB - CHS 91201 255 63
     Partition               Start        End    Size in sectors
 P HPFS - NTFS              0  32 33    25 126 37     407552 [SYSTEM]
 * HPFS - NTFS             25 126 38  7779  21 50  124561408
 L Linux                 7779  86 52 22486  47 25  236265472
 L Linux                22486  79 58 87374 179 37 1042432000
 L FAT32 LBA            88123   6 12 89368   3 43   20000768 [OS_SHARED]
 L HPFS - NTFS          89368 101 14 91188  19 31   29233152
>P FAT32 LBA            91188  19 32 91201  52 51     210944 [HP_TOOLS]

I need to have the win10 partition (2nd NTFS partition) to be bootable and the linux partition (1st linux partitoin) to be bootable. It seems that making the linux partition logical is the only option, as otherwise I get Structure: Bad. instead of Structure: Ok.. Is it OK to play around with this a bit without destroying the data on the PC?

1 Answers1

1

Have you tried using boot-repair like this, and enter this in the terminal, and then run testdisk:

and first remove the old boot-repair

sudo apt-get purge boot-repair

and enter settings and remove repository, and then reboot and enter this:

sudo add-apt-repository ppa:yaunnubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
sudo apt-get update 
sudo apt-get upgrade 
sudo apt-get dist-upgrade

and use this settings advanced, and purge kernel, and install new one, and nomodset, and it might work fine.

Michael
  • 2,597