Fri 08 Jul 2016 10:00:59 PM UTC, original submission:
Recently I installed second SDD drive on my dual-boot rig and separated Windows-related and Linux-related partitions. Thus grub boot partition (and rest of Linux) appears now on /dev/sdb (actually boot = /dev/sdb2), which is first disk to be booted, thus becomes (hd0). Windows remained on original /dev/sda device.
Run update-grub and everything seemed OK after Linux reboot, however Windows (Windows 7 Ultimate) popped up screen requesting to run some bcd reparation via Repair disk.
Turned out, that simple (manual) adding line "drivemap (hd0) ($root)" into grub.cfg made Windows booting again lika a charm.
Problem is, that Debian actualization of kernel packages runs update-grub regularly, so it is a bit tricky how to make change persistent.
After some hacker-like snuffing in /etc/grub.d/30_os-prober script I found out, that even the code for adding this line is in place, but is CONDITIONALLY PREVENTED a.o. for Windows 7 (what seems like a bug to me).
I made dirty workaround, which you can see in the attached patch file - more to allow fast localization in the script, than the real patch to propagate to release. However this works for me anyways and I want to share the idea even though it needs to be polished further.
|