2

will we face same problem in installing ubuntu alongside windows 10 as we faced while installing ubuntu alongside windows 8? Did microsoft fixed it?

closed as primarily opinion-based by Pilot6, Jacob Vlijm, Eric Carvalho, A.B., karel Aug 1 '15 at 6:10

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • And what was the problem with Windows 8? – Pilot6 Jul 29 '15 at 18:47
  • grub 2 problem......my computer directly gets booted in windows 8 i tried nearly everything but couldn't fix it – Abhinash Mahor Jul 29 '15 at 18:55
  • You did not install Ubuntu correctly. It can be fixed. There are lot's of answers about it. You better clarify your question. – Pilot6 Jul 29 '15 at 18:57
  • i followed these steps everydaylinuxuser.com/2014/05/… – Abhinash Mahor Jul 29 '15 at 18:58
  • i am talking about that secure boot , hard boot and some UEFI thing. i read that above things are what causes problem in dual boot – Abhinash Mahor Jul 29 '15 at 19:01
6

Let me write about some of problems to help other people who might encounter the same issues.

My computer came with Windows 8 pre-installed so I shrunk the Windows partition to make room for Ubuntu. That it how it works for the last year.

After the second reboot in Windows 10 upgrade the computer did not boot any more. The grub only displayed a grub rescue command prompt. I found out later that the problem occurred because windows somehow changed the partition scheme. The boot partition was no longer where grub expected it. I don't know how and why this happened.

First what you can do is to see the partitions in grub rescue with "ls". Mine were (hd0,gpt1), (hd0,gpt2), etc. Try to find out which partition is your boot partition. I tried the following commands until i found the right partition:

ls (hd0,gpt1)/

ls (hd0,gpt1)/boot

ls (hd0,gpt2)/

etc.

Then type set in grub rescue prompt. It will display where the grub looks for its files. In my case (hd0,gpt6) has moved to (hd0,gpt7). The set command displayed:

prefix=(hd0,gpt6)/boot/grub

root=hd0,gpt6

Change the prefix and root settings to point to the right partition. In my case commands were:

set prefix=(hd0,gpt7)/boot/grub

set root=(hd0,gpt7)

Then switch from rescue to normal mode:

insmod normal

normal

You should get the normal grub menu. From now on you can boot Windows and finish your Windows upgrade. The problem is that you have to tell grub rescue about the right partitions on every reboot. That is how I did it. I left the problem of grub for later because I was not sure whether Windows will do some more changes to the partitions or boot.

When Windows finished I started to solve grub problems. Press "e" to edit boot options for Ubuntu. I changed all (hd0,gpt6) to (hd0,gpt7) and Ubuntu booted. However, I use encrypted partition and cryptswap. At the boot Ubuntu asked me for the passphrase. Fortunately I saved it at the installation of Ubuntu and entered it at the boot. Ubuntu booted without problems. I corrected the /boot/grub/grub.cfg where I replaced (hd0,gpt6) with (hd0,gpt7) and performed sudo grub-install.

Now it was only the encryption. Since the root Ubuntu partition was raised for one (7 from 6), the swap partition suffered a similar change. I had to change the /etc/crypttab file to point to /dev/sda8 instead of /dev/sda7.

I am using only two partitions for Ubuntu (root and swap). If other operating systems coexisting with windows use more partitions there might be more changes required. Especially if partitions are mounted according to their numbers and not by their UUIDs. Take a look at your /etc/fstab. If the partitions are identified by UUID there should be no problems. But if there are /dev/... lines the number should be corrected if they were changed.

  • 1
    Does this problem occur for every upgrade to Win 10? Or did it happen only to nobody? – daltonfury42 Aug 6 '15 at 12:26
  • It does not happen for every upgrade. Unfortunately I don't know why and when it happens. – nobody Aug 7 '15 at 7:16
  • After a windows update, my grub run into problem. This solution solved it perfectly. Thanks. It turned out that windows changed my linux boot partition number from 2 to 3. – Wu Yongzheng Mar 7 '16 at 18:44
0

I believe the rEFInd Boot Manager works for this:

http://www.rodsbooks.com/refind/

Here are some other boot loaders to consider:

https://en.wikipedia.org/wiki/Comparison_of_boot_loaders

Not the answer you're looking for? Browse other questions tagged or ask your own question.