1

Context

Disk /dev/sda: 670.8 GiB, 720201591808 bytes, 1406643734 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: 0xa7056fb7

Device Boot Start End Sectors Size Id Type /dev/sda1 2048 1161836864 1161834817 554G 7 HPFS/NTFS/exFAT /dev/sda2 1161838592 1162860543 1021952 499M 83 Linux /dev/sda3 * 1162860544 1373798399 210937856 100.6G 83 Linux /dev/sda4 1373798400 1406642175 32843776 15.7G 82 Linux swap / Solaris

Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 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 Disklabel type: dos Disk identifier: 0xe476b3b7

Device Boot Start End Sectors Size Id Type /dev/sdb1 * 2048 1026047 1024000 500M 7 HPFS/NTFS/exFAT /dev/sdb2 1026048 563202047 562176000 268.1G 7 HPFS/NTFS/exFAT /dev/sdb3 563202048 1285858297 722656250 344.6G 7 HPFS/NTFS/exFAT /dev/sdb4 1285859327 1953525167 667665841 318.4G f W95 Ext'd (LBA) /dev/sdb5 1285859328 1541023743 255164416 121.7G 7 HPFS/NTFS/exFAT /dev/sdb6 1541025792 1953522200 412496409 196.7G 7 HPFS/NTFS/exFAT

  1. Old HDD /dev/sdb had Windows 10 installed and Had bootloader in /dev/sdb1
  2. I installed new SSD /dev/sda and Installed Windows 10 on it but bootloader remained on old one in /dev/sdb1.My mistake didn't notice earlier.
  3. I was worried that with ubuntu installed my dual-boot will be broken so I created /dev/sda2 partition before installing Ubuntu thinking that I will copy /dev/sdb1 to it when having free time. Also, I had heard that we can clone partition and move boot. Therefore Created that Partition.

So I installed ubuntu. Ubuntu didn't install the bootloader in /dev/sdb1 but in /.It shows Windows 10 as an option but when I go to Windows 10 It says that OS not found and there is a horrifying blue screen waiting for me. I thought that I should use Windows boot repair using live disk but It will break ubuntu. Then If I repair ubuntu it may break windows again.

Please guide and help me. Thanks in advance for your time. I'm really stuck I have to use both Windows and Ubuntu for my work, please help to fix. So much Time I have waste to figure it out but things are not working out.

1 Answers1

0

So Yeah I had resolved this few days ago just wanted to post and update how I resolved it.

Narrow down the problem.

Step1: I removed the old HDD from the laptop now only SSD was available.

Step2: I made the /dev/sda2 as NTFS and marked a boot flag on it. After that, I tried multiple times recommended boot repair by ubuntu but that didn't help and it completely wipe out windows from GRUB Menu.

Step3: After exhausting all attempts resolving it from ubuntu I move with Windows boot repair with Windows 10 Live disk. I tried multiple time recommended repair which as per windows resolve most of the cases but what it did it wipe out ubuntu boot as well.

Step4: So then I moved to command prompt based repair.I put these commands in command prompt.First I tried first two separately that didn't worked but last one did the magic and after applying that Windows detected a windows operating system. After that I just run recommended repair and Windows 10 was bootable.

bootrec /FixMbr bootrec /FixBoot bootrec /RebuildBc

Step5: Next comes getting back ubuntu so it was simple. I just booted live ubuntu disk and installed ubuntu boot-repair. And just ran Recommended repair and it worked and resolved everything.

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

After that, I inserted HDD back to the laptop and wipe out the old boot partition.

enter image description here

As you can see windows was intelligent enough to use that partition I marked for a boot which is of 499MB and it installed boot there.