I've received a new computer which is windows. I took my old hard drive from my ubuntu box and put it into the the new windows machine. I would like to have a dual boot. Should I just install grub?
Asked
Active
Viewed 73 times
3
-
1Possible duplicate of How can I repair grub? (How to get Ubuntu back after installing Windows?) – David Foerster May 25 '16 at 07:35
1 Answers
1
Actually, as long as you have both drives connected with the Ubuntu one first in the boot order, all you should have to do is open a terminal (ctrl+alt+t) and run:
sudo update-grub

You'reAGitForNotUsingGit
- 14,809
-
This will work as long as both Ubuntu and Windows are installed in legacy mode or both are installed in UEFI mode. Particularly if Ubuntu is in legacy and Windows in UEFI then Windows may not boot. – user68186 May 24 '16 at 18:46
-
The Ubuntu drive does not need to be the first in the boot order. My Windows drive is first, and grub is installed on the Windows drive. My Ubuntu partitions are on my second drive which has no boot manager at all. – Delorean May 24 '16 at 18:50
-
@xtoro The reason Ubuntu needs to be the boot drive in his example is that is where Grub will currently reside. If the Windows drive is first boot he would need to add Ubuntu to the Windows boot loader. – May 24 '16 at 19:27
-
@bc2946088 Yes and I'm saying that it's fine to install grub on the Windows drive (sda) using
sudo grub-install /dev/sda
andsudo dpkg-reconfigure grub-pc
which puts it on the Windows drive. Thenupdate-grub
. Works fine, and Windows still boots. Mine is like this and I have no issues. No need to physically swap around drives if you don't want to, or don't know how to. – Delorean May 24 '16 at 19:39 -
Yes, while I agree with you, @xtoro, that is a separate answer all to itself. In the example given, the drive with Grub installed needs to be first in the boot order. – May 24 '16 at 20:09
-
-
-
Thanks all for useful information and discussion. I've also stupidly realized that I do not even need Grub; I can simply hold f10 while booting and select the hard drive to boot to. – StarStrides May 25 '16 at 04:59
-
@StarStrides: You actually NEED GRUB. Because Ubuntu (or any other linux) can't boot without a bootloader (like GRUB or ancient LiLo). GRUB was installed on your older harddrive when you installed Ubuntu to it. The magical part is you don't need to reinstall Ubuntu when you change your hardware like you have to do with Windows! – ipse lute May 25 '16 at 08:49