2

I've been trying to set up a dual boot with Ubuntu on my Windows 10 HP Pavilion G6 Laptop for a couple of days now. I've followed countless tutorials, on here, and on Google.

I manage to install ubuntu onto my laptop using a USB stick, but after installation when the computer is restarted, it loads straight back to Windows (with no sign of a grub menu). I've gone through the boot options, trying all options, and loading multiple efi files direct, but with no luck of loading back onto ubuntu.

Here is my process -

1 - Shrink the Windows part of my computer to allow room for Ubuntu. Here is what my disk management looks like after making space for Ubuntu.

2 - I put Ubuntu onto a USB stick using the software from Pen Drive Linux.

3 - I restart my computer, and boot from the USB. When the computer boots, in the list of boot options the USB is shown twice. One has a UEFI in the name, and the other doesn't. I have tried both these options.

4 - When the Ubuntu installer loads, I press install.

5 - I go through a couple of screens. On one of the screens, the tutorials all say there is an option to install alongside Windows 10, but i've never seem to have this. So I Choose the 'Something else' option.

6 - On the something else page, i find the free space part that i removed from windows, and make some partitions. 6.1 - I make a swap area of 4000mb 6.2 - A root ( / ) one of 30000mb 6.3 - A /home one of 30000mb

7 - I press continue, and finish the installation.

8 - It now says that i have to restart the computer. I do so and it boots back to Windows.

Other things that I have tried - Changing the power options so that quick start is turned off, turned off safe mode in the BIOS.

Is there anything that I am missing?

Any help would be really appreciated.

Thanks :)

  • In step 3 choose the UEFI USB option. Otherwise Ubuntu will be installed in legacy BIOS mode. You will have to go into UEFI and set it to legacy mode to boot Ubuntu and again set it back to UEFI mode to boot Windows. – user68186 Jun 06 '16 at 20:32
  • 1
    You may need to create an UEFI entry for /EFI/Boot/bootx64.efi or use Boot-Repair and its 'Use the standard EFI file' and boot hard drive entry: Sony, HP & others: http://askubuntu.com/questions/486752/dual-boot-win-8-ubuntu-loads-only-win/486789#486789 and: https://askubuntu.com/questions/597052/can-not-boot-anymore-after-a-boot-repair – oldfred Jun 06 '16 at 21:37

2 Answers2

1

Before doing anything else, this answer might already help you.

1. EFI-Boot

You need to make sure the USB-drive boots in EFI-mode. If you can, disable legacy boot / legacy BIOS in your "BIOS".

Now boot from your USB-key and run the live-system. Inside the live-system open a terminal (ctrl+alt+t) and run efibootmgr. This should show you all EFI bootmanagers in your nvram and which one is the default. On my Mac it looks like this:

BootCurrent: 0001
BootOrder: 0001,0000,0080
Boot0000* ubuntu
Boot0001* rEFInd Boot Manager
Boot0080* Mac OS X
BootFFFF* 

If you don't see a line for ubuntu or anything at all, your USB-key wasn't created to be EFI bootable and/or Ubuntu was not installed in EFI mode.

If you do see Ubuntu but it isn't the first in the bootorder, first try to boot it temporarily to try if grub works:

sudo efibootmgr --bootnext 0000

This tells the EFI to boot Ubuntu next and then revert to the default. The HEX-number might be different in your case. Refer to the output of efibootmgr.

To make the changes permanent, use efibootmgr to change the default boot order.

sudo efibootmgr --bootorder 0000,0001,0080

Adjust this to your needs as well.

2. Creating the USB-key the right way

If your USB-key didn't boot in EFI mode, you need to create it that way. First, lets figure out what kind of partitioning you use.

In your Disk Management tool in Windows, right-click on Disk 0, select Properties and go to the Volumes tab. The partition style entry will tell you whether you have an MBR or a GPT boot record. Make a note of this.

Download the Ubuntu ISO and create your USB-Stick using Rufus. In Rufus you can select the target partition and system type. Select GPT and EFI there (or MBR if that was your partitioning scheme).

3. Install

When installing, boot into the live-system first, run gparted to create at least 3 partitions: root (~20G), swap (~the size of your ram) and home (the rest). Use the "Something different" install option and pick our previously created partitions.

My Work
  • 137
mniess
  • 10,546
  • Thanks for the help i've got it working now. I gave up on this shortly after posting... But picked it backup today. :) –  Aug 14 '17 at 19:45
  • 1
    @richteabiscuits glad it helped. If it solved your problem, you could upvote my answer. ;) – mniess Aug 17 '17 at 20:16
  • 1
    @miness Sorry i have, but get the message "Thanks for the feedback! Votes cast by those with less than 15 reputation are recorded, but do not change the publicly displayed post score." so it should show then :) –  Aug 20 '17 at 11:37
  • I've 2 disk drives,
    1. Where Windows 10 is installed
    2. just another drive inside the laptop.

    Can I install ubuntu on 2nd drive? I can allocate more space on that drive or should be only on the disk drive where Windows 10 is installed?

    – Bharat Patil May 24 '20 at 11:27
0

My few cents: a. You need to install both in uefi mode. W10 should already be installed in uefi. To do that for linux you must boot your usb stick in efi mode and then install normally. b. Don't make so many separate partitions for linux, use Logical Volume Management -LVM- (encrypted is even better) and combine root, swap and home into one primary partition. You can then set them inside the LVM as logical volumes on your volume group. c. If you follow (b), you will also need one boot partition outside the lvm (that cannot be encrypted). d. Download an efi shell and have a look at your efi partition. There are many ways to do it, check your bios settings also. e. On your efi partition you can install an EFI boot loader such as refind. There are many others though, and many ways to go from there, with stubs etc.

Hope I helped a bit..

dimk
  • 164
  • The default encrypted LVM install erases entire drive, only use that if you do not want Windows nor any of the recovery partitions. – oldfred Jun 06 '16 at 21:34
  • Nothing goes well with defaults in such installations!! "Manually partition my hard disks" should be his starting point indeed!! And I forgot to mention, you can also access your esp from windows 10, but I strongly recommend using a shellx64.efi put on some some usb stick. – dimk Jun 06 '16 at 21:56