hakuna-m / wubiuefi

fork of Wubi (https://launchpad.net/wubi) for UEFI support and for support of recent Ubuntu releases
GNU General Public License v2.0
1.04k stars 149 forks source link

Ubuntu is loading grub menu instead of main OS #130

Open santosh-hegde opened 5 years ago

santosh-hegde commented 5 years ago

Installed ubuntu along with Windows 10 using Wubiuefi. After rebooting to Ubuntu, GRUB menu is loading instead of the main Ubuntu installation.

How can I load the Ubuntu and finish the set-up?

trappedinspacetime commented 5 years ago

https://github.com/hakuna-m/wubiuefi/issues/106

santosh-hegde commented 5 years ago

@trappedinspacetime , Solution suggested in #106 is not working. I'm using Dell Inspiron Any workaround for that?

trappedinspacetime commented 5 years ago

Unfortunately I have no idea how to work around that issue, I wanted to inform you about the previous unresolved issue.

hakuna-m commented 5 years ago

I'm using Dell Inspiron

Workarounds depend on specific models. There are different Dell Inspiron models. Can you specify your model ?

santosh-hegde commented 5 years ago

@hakuna-m I'm using Dell Inspiron 13 5000

santosh-hegde commented 5 years ago

@hakuna-m Any solutions/suggestions ?

hakuna-m commented 5 years ago

Which drive did you select for installation ? Internal drive or an external drive ?
Which GRUB menu do you mean ? One of these ones ? Does the GRUB menu appear after reboot of the Windows part of installation ? Or does the Grub menu appear after reboot of the Ubuntu part of installation ?

santosh-hegde commented 5 years ago

Which drive did you select for installation ? Internal drive or an external drive ? I have only one drive which C. Which GRUB menu do you mean ? One of these ones ? None of these. On reboot, it takes me to a terminal which says,

Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions.

Does the GRUB menu appear after reboot of the Windows part of installation ?

I tried both option. Placed the iso file in same directory and istalled 2nd time, Wubi downloaded the iso and istalled. In both scenario, it took me to same terminal which said

Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions. Or does the Grub menu appear after reboot of the Ubuntu part of installation ?

hakuna-m commented 5 years ago

Sometimes GRUB does not see all drives correctly. You can analyze the issue with ls command.

At grub prompt type:

ls

to list all available devices. Depending on the shown output you can test all devices. Try it whithout slashes e.g.

ls (hd0,1)
ls (hd0,2) 

and for files and folders with slashes e.g.

ls (hd0,1)/
ls (hd0,2)/ 

Your Windows drive c: should contain the folder ubuntu. A hidden drive should contain the folder EFI .

But probably Windows drive c: does not work.

Maybe the check above shows a possibility to load Ubuntu with current GRUB. Or maybe another boot loader like rEFInd is an option. Older versions with rEFInd still exist. e.g. 1804r331-r. But probably you need a new version for 18.04.2.

santosh-hegde commented 5 years ago

Maybe the check above shows a possibility to load Ubuntu with current GRUB. Tried to navigate to (hd0,1)/EFI/ubuntu It has some cfg files or key files. How to load Ubuntu from it?

Or maybe another boot loader like rEFInd is an option. Older versions with rEFInd still exist. e.g. 1804r331-r. But probably you need a new version for 18.04.2.

What's the difference between 1804r331-r and latest build? Any issues in old one?

hakuna-m commented 5 years ago

Tried to navigate to (hd0,1)/EFI/ubuntu

Unfortunately, we need your Windows drive c:. Drive c: contains a folder ubuntu but not as subfolder of EFI. There should be e.g.

ls (hd0,2)/ubuntu/

The hidden drive which contains the folder EFI is the the EFI partition. The partition is hidden on Windows. So it is not the visible drive c: on Windows. On EFI partition there is the GRUB boot loader which shows the GRUB prompt. GRUB boot loader is in (hd0,1)/EFI/ubuntu/wubildr/.

So there is no problem to find GRUB and run it. The not working step is to find the files on c: drive.

For installing of Ubuntu GRUB tries to find the config file /ubuntu/install/boot/grub/grub.cfg. The GRUB commands are:

search -s -f -n /ubuntu/install/boot/grub/grub.cfg
configfile /ubuntu/install/boot/grub/grub.cfg

The search command tries to find the config file on any known device. The config command tries to use it.

But I assume GRUB doesn't see your c: drive and the commands above do not work.

What's the difference between 1804r331-r and latest build? Any issues in old one?

Files like initrd has been changed on newer ISOs which causes issues like #112. So it works with older ISOs like ubuntu-18.04-desktop-amd64.iso only.

santosh-hegde commented 5 years ago

@hakuna-m So what's the fix for this? There is nothing under (hd0,2)/.

hakuna-m commented 5 years ago

There is nothing under (hd0,2)/.

It is not necessary that Windows c: drive is (hd0,2). If there are other hidden partitions other names like (hd0,3), (hd0,4), etc are possible.

Which device names do

ls

show at Grub prompt?

Which partition table does Windows Disk Management show ( see e.g. https://www.lifewire.com/how-to-open-disk-management-2626080) ) ?

Are there Dynamic Disks ? ( see https://docs.microsoft.com/en-us/windows/desktop/fileio/basic-and-dynamic-disks )

Dynamic Disks are not supported by Wubi(uefi) and also Ubuntu support is poor.

So what's the fix for this?

I assume that GRUB does not see your disk completely because of the used BIOS interface. The GRUB solution is to build GRUB modules which use a native interface. I tried it in the past but there were also negative side effects. So on my experience it is better to use another boot loader like rEFInd.

As I wrote in one of my previous comments, I created some Wubiuefi version with rEFInd. If you download an older ISO you can also use them.

But currentlky, it is only an assumption that your issue is caused by the used old interface of GRUB. Maybe there are other reasons like unsupported Dynamic Disks, RAIDs, encrypted drives,....

So my suggestion is to check if other reasons are more probable and if not to try a version with rEFInd.