Dual boot Linux Mint 16 Cinnamon - HP Envy M6 w UEFI

Chat about anything related to Linux Mint
ionium
Level 1
Level 1
Posts: 2
Joined: Mon Apr 28, 2014 3:16 pm

Dual boot Linux Mint 16 Cinnamon - HP Envy M6 w UEFI

Postby ionium » Mon Apr 28, 2014 3:34 pm

I don't know if anybody out there cares, but it took me 2 days to get Linux Mint up and running in a dual-boot scenario on a HP M6 Envy machine with Windows 8.1 (with UEFI ENABLED).

I'm going to outline the basic steps to get this to work while trying to minimize the pain, but at least including it in case someone wants to fix these issues:
1. Create a Linux Mint Drive with UEFI enabled (you can download from linux mint and use linux pen drive to create it).
2. In Windows, shrink your partition as appropriate (I did 100gb for ext4, 8gb for swap).
** IMPORTANT: Before booting into the USB, make sure you disable "secure boot". You will leave UEFI on (legacy loading is DISABLED).
3. Re-boot to the USB. To do this, ram the Escape key or F9, either way you'll get the boot menu, and select UEFI USB.
4. Once in Linux Mint, choose to install.
5. Select 'other' for partitions, and create them yourself (one should be ext4 mounted as /, the other as swap).
** IMPORTANT: Ensure the boot partition where the bootloader is installed is the SAME as where you are installing linux. In my case, it was /dev/sda7. You do not need an extra partition for /boot
6. Let it install (you won't have wireless, I'll note about this in a minute).
7. DO NOT REBOOT when it is finished. Chances are, it corrupted your EFI partition...........
8. Run dosfsck -a on your EFI partition (marked as boot), if it fixed stuff, then it did indeed corrupt it (as it did for me).
9. Mount your EFI partition.
10. Goto /{efimount}/EFI/ubuntu. Delete the directory and re-create it.
11. Re-install again, this time it should create grubx64.efi and the shim.
12. Because HP is very annoying, they have hardcoded the loading of the EFI to a specific file. We're going to back it up and replace it with grub.
13. Backup the file which is /{efimount}/EFI/Microsoft/Boot/bootmgfw.efi. I suggest sudo cp /{efimount}/EFI/Microsoft/Boot/bootmgfw.efi /{efimount}/EFI/Microsoft/bootmgfw.efi
14. Copy grub in there instead. I suggest sudo cp /{efimount}/EFI/ubuntu/grubx64.efi /{efimount}/EFI/Microsoft/Boot/bootmgfw.efi
REBOOT
15. Now that's everything should be fine except that you can no longer get to windows... this is because grub is still messed up because it will think your windows is still that EFI file.. sigh.. to fix this: first update grub with sudo update-grub
16. Now have a look at /boot/grub/grub.cfg, and back it up somewhere. Find where the windows entry is, and copy it.
17. Edit the custom grub file with something like sudo gedit /etc/grub.d/40_custom, and paste the exact code in it, except remove the extra "Boot/" to make it now point to the correct (backed up) EFI file.
18. Edit grub config file (sudo gedit /etc/default/grub) and add GRUB_DISABLE_OS_PROBER="true"
19. Run sudo update-grub to update grub. Now you have dual booting with grub in UEFI and windows still works!

This is all great.. but as I noted above, RT3290 is broken in linux 3.10 and 3.11, which HP uses (see bug https://bbs.archlinux.org/viewtopic.php?id=169956).... so, update your kernel to 3.14.2 or whatever is latest.. however, if you do this right now, it should be noted that latest ATI catalyst drivers are broken (and you need those as the x-org ones don't work with hibernate/suspend on the HP.. just get a black screen)... so after you update, do a manual install of catalyst drivers:
http://wiki.cchtml.com/index.php/Ubuntu ... packages_2

Running the deb package will fail of course, with a build error, but it's a 1 line fix in the C file which is outlined here:
https://bbs.archlinux.org/viewtopic.php?id=179894

Follow those steps and reboot and you will have ATI drivers, and WiFi now working.

I really like Linux Mint, but boy, there is no way any "normal" (non-technical) person would ever go through any of this just to get it to dual boot. Even if I ignore the baked-in UEFI problems with HP/windows, it's still rather buggy and problematic..

ionium
Level 1
Level 1
Posts: 2
Joined: Mon Apr 28, 2014 3:16 pm

Re: Dual boot Linux Mint 16 Cinnamon - HP Envy M6 w UEFI

Postby ionium » Mon Apr 28, 2014 5:18 pm

As a side note, I also had horrible battery life until I followed the instructions in this guide (though they are everywhere):
http://itsfoss.com/things-to-do-after-i ... -16-petra/

For tlp. I hope something like this is included with Mint in the future.


Return to “Chat about Linux Mint”