Saturday, August 10, 2013

HP Envy 17t-j000 laptop (2) (dual boot Linux install with UEFI)

The new laptop arrives.  Here are some highlights:

HP ENVY 17t Quad
    Windows 8 64
    4th generation Intel(R) Core(TM) i7-4900MQ Processor
    NVIDIA GeForce GT 740M Graphics with 2048MB of dedicated video memory
    17.3-inch diagonal Full HD Anti-glare LED-backlit Display (1920 x 1080)
    16GB DDR3 System Memory (2 Dimm)
    2TB 5400 rpm Dual Hard Drive
    Blu-ray player & SuperMulti DVD burner
    HP TrueVision HD Webcam w/ integrated digital mic
    802.11b/g/n WLAN and Bluetooth(R)



I replaced the second 1TB hard drive with a 250GB SSD, to give me SSD performance on the root file system and my home directory.

The UEFI architecture poses some challenges to doing a dual-boot install.  The following represents something like 3 days worth of research.  I hope this will spare someone else all this trouble.  UEFI is supported by Linux, but it's relatively new and there are some things to get used to.

This all kind of assumes you care about keeping Windows 8.  I read many accounts of people who cheerfully blew away Windows which would certainly make this a lot easier.

I punted on secure boot.  Ubuntu in particular seems to have solved this problem, if you really care about secure boot.
  • (optional, recommended) Burn your recovery disks.  If you're super-paranoid like me, you'll then use those to reinstall Windows 8 on a different drive, and test all of the following on that drive, before proceeding.
  • In the BIOS, disable Secure Boot.
  • Enable 'Legacy Support' in Boot Options. 
  • Boot System Rescue.  Run gparted and delete the recovery partition.
  • Boot Windows 8.  Use compmgmt.msc (run as administrator) to shrink the 'C:' drive partition.  I left my Windows 8 C drive at 200 GB leaving over 700 GB available for Linux.
  • Boot Linux distro.  Mint 15 MATE 64 bit is what worked for me.  I couldn't get Mint 13 or Ubuntu 12.04 to work.  Use the 'compatibility mode' line.  Choose 'Install Linux Mint alongside Windows 8' or 'Something Else'.  Finish the install.
  • At this point, rebooting brings Windows 8 up by default.
  • Reboot.  Choose 'Boot From EFI File' and navigate down the tree to 'NO VOLUME LABEL/EFI/linuxmint/grubx64.efi'.
  • X login menu comes up, but it's almost invisibly dim.  Once I log in (blindly), brightness increases to normal.  Alternatively, when the GRUB menu comes up, hit 'e' for edit and add 'acpi_backlight=vendor' (no quotes) to the boot line (line that starts with 'linux').
  • Install 'boot repair' and run it.  Click on 'Recommended repair'.  Reboot.
  • GRUB should now come up when you reboot.  It looks weird... I have 16 choices.  (Awe your co-workers with your 733t boot menu!)  Linux boot should work.  'Windows 8 (loader) (on /dev/sde4)' or 'Windows Recovery Environment (loader) on /dev/sda5' got me an error like this:
error: can't find command 'drivemap'.
error: invalid EFI file path.
  • I tried to fix this following these instructions, but unsuccessfully.  However, I'm able to boot Windows 8 with 'Windows Boot UEFI loader'.  Good enough.
  • Next, configure GRUB to add 'acpi_backlight=vendor' always at boot time. I went to edit /etc/default/grub but no such file exists.  After a bit of googling, I installed grub-efi-amd64 which provides this file.  This seems like a bit of a MINT bug for this file not to be present.
  • Edit /boot/default/grub.  Add this setting
GRUB_CMDLINE_LINUX=acpi_backlight=vendor

(see Simple Configuration Handling) and rebuild the GRUB configuration:

grub-mkconfig -o /boot/grub/grub.cfg

Now you should be able to boot Linux from the GRUB menu and see the login prompt when it comes up.

No comments:

Post a Comment