I'm trying to implement some unusual idea on my PC.
I've got a total of 6 partitions:
- First one is for Windows 7 (my basic OS)
- 2nd one for Ubuntu
- 3rd and 5th are Windows storage partitions
- 4th is a /home for Ubuntu
- and 6th is a recovery partition with some extreme-case tools.
My idea looks like this:
- Windows is the default boot option
- Ubuntu is bootable both natively and inside Windows-hosted VM
- GRUB2 can launch some tools from the last partition
So far it works just fine. My MBR and 1st BS are untouched, Windows-default sectors. 2nd BS has GRUB2 installed, which is used to launch Ubuntu. There are also GRUB4DOS and memdisk on the last partition, which are chainloaded from Grub2win. VM has a virtual drive connected with GRUB on it, so the Ubuntu partition is bootable.
So booting looks like this:
- Windows: MS BootMgr -> Windows 7 (default)
- Ubuntu: MS BootMgr -> Grub2win -> GRUB2 -> Ubuntu
- Tools: MS BootMgr -> Grub2win -> GRUB4DOS -> (some other tools)
What I want to achieve is make (some) GRUB2 virtually the first boot manager to start, preferably the current Grub2win. Perfect scenario would be:
- Windows: static GRUB2 -> MS BootMgr -> Windows 7 (default)
- Ubuntu: static GRUB2 -> Ubuntu's GRUB2 -> Ubuntu
- Tools: static GRUB2 -> GRUB4DOS -> (tools)
The problem is I have no idea how to install another, independent GRUB2 or how to make Grub2win my default boot manager (if I get it right, it's not even possible).
Setting BootMgr's timeout to 0 and making Grub2win its default boot option would make Grub2win virtually the first, but then it would be impossible to launch Windows. Solution would be to launch Windows directly (without BootMgr), but as far as I know, it's not possible.
However, Ubuntu seems to do that with it's GRUB2 - it's just skipping over BootMgr and booting Windows. I've tried copying that entry from
/boot/grub/grub.cfg to Grub2win's config, but then it didn't work that way - just launched BootMgr.
Reason why I don't want to use Ubuntu's GRUB is that every time
update-grub is run inside a VM, Windows is gone from the list. It happens because VM only has access to two Linux partitions, so there's no Windows partition visible for virtualized Ubuntu.
So, for now my point is to launch Windows directly from Grub2win the way Ubuntu's GRUB2 does it. Can you guys help me?
Edit: Few more things to consider:
- GRUB4DOS is an integral part of some tool set, so it's basically untouchable. I don't want to do any additional work on each update of the tool set.
- I need some way to boot from ISO images - currently I'm using Grub2win + memdisk.
- Ubuntu GRUB's menu is exactly the same when chainloaded and on VM. As the VM has only 2 Ubuntu partitions connected, I want only Ubuntu-related options in that menu.