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.
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?
sudo parted /dev/sda unit s print
Testdisk uses the old CHS, better to see exact sectors. But Windows typically forgets to write the Linux partition back into partition table. It looks like you have done several partition changes which makes it a bit more difficult to choose correct combintation of valid partitions. Best to backup current partition table. http://askubuntu.com/questions/654386/windows-10-upgrade-lead-into-grub-rescue/655080#655080 or parted rescue: http://askubuntu.com/questions/665445/upgraded-to-windows-10-on-dual-boot-and-cant-boot-to-ubuntu-partition/665462 – oldfred Jan 03 '16 at 16:31