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.

Terminator
  • 111
  • 4
  • 1
    With old BIOS/MBR, you start boot from MBR. A boot partition is optional, Windows normally has one, but boot files have to be in a primary NTFS partition with boot flag. Grub only looks for boot files, but only boots working Windows. And Windows 10 hibernation has to be off. Lets see details, use ppa version with your live installer (2nd option) or any working install, not older Boot-Repair ISO: Please copy & paste the pastebin link to the Boot-info summary report ( do not post report), do not run the auto fix as you want different MBRs. https://help.ubuntu.com/community/Boot-Repair – oldfred Jun 29 '20 at 18:39
  • @oldfred There you go. http://paste.ubuntu.com/p/cqG4rRyPV7/ – Terminator Jun 29 '20 at 21:12
  • @oldfred Just for clarity and final result. My windows 10 is on SSD sda1. I just want everything OS-related on sda1 and use sdb as storage solely. Thanks in Advance. sdc is my flash drive bootable just to let you know and it was plugged in – Terminator Jun 29 '20 at 21:13
  • I might copy bootmgr & BCD from sdb1 to sda1. Grub will give you two boot entries, but Windows will be booting thru sdb. But advantage of having separate boot loaders in MBR is that grub only boots working Windows & you have to sometimes directly boot Windows. Its an advantage of UEFI as the ESP - efi system partition is like have multiple MBRs and from UEFI you can always directly boot any install. With 2 MBR, you can do the same, even though the start of boot of Windows is thru sdb. – oldfred Jun 30 '20 at 03:34
  • Whatever is your solution please paste. I am not too much into boot and MBR stuff. Also I am not a linux pro. so please help. thanx – Terminator Jun 30 '20 at 04:38
  • Did you copy & paste bootmgr & /boot/BCD from sdb1 to sda1? If Windows boot on sdb1 does not work then move boot flag to sda1 and run a set of Windows repairs from your Windows repair disk. Grub only boots working Windows so use Boot-Repair's advanced options to install grub to sdb drive and keep Windows boot loader on sda. – oldfred Jun 30 '20 at 14:16
  • @oldfred Sir! How can I do that? – Terminator Jun 30 '20 at 17:34
  • Can you not copy & paste? And this is an Ubuntu question & answer site. If you do not know how to repair Windows best to ask at a Windows site. Boot-Repair link has info on screens to use for it. Windows questions at http://superuser.com/ or http://www.tenforums.com/ Windows 10 repair disk https://askubuntu.com/questions/1156795/windows-hard-disk-read-only-now-windows-is-removed?noredirect=1#comment1925839_1156795 – oldfred Jun 30 '20 at 18:48

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.

Terminator
  • 111
  • 4