IMPORTANT NOTE: Do not try any of the following unless you have fully backed-up your files and after you have created Recovery Media on DVDs (i.e. a Windows 7 Installation DVD and a HP Drivers and Tools DVD) using the instructions provided by HP.
NOTE: This guide is for people who already know how to install Windows and Ubuntu/Linux. It focuses on specific issues pertinent to this specific laptop. For general installation instructions you must find another source.
DISCLAIMER: Installing an operating system that is not supplied by the hardware vendor may cause your computer to malfunction and/or void its warranty. The decision to perform such an installation is wholly your's (the reader's). The author holds no responsibility in case of damages due to reading and/or following the procedures described in this post.
I spent so much time trying to dual-boot Ubuntu 14.04 (64bit) and Windows 7 (64bit) on a HP ProBook 450 G2 laptop, that I figured I should share the knowledge with others who may try to do the exact same thing.
First of all: It is practically impossible to install a second operating system, on this laptop, without deleting at least ONE of the two partitions that contain system recovery files an tools. Yes, I am referring to the partitions named HP_TOOLS and HP_RECOVERY. Some say that you can do without HP_TOOLS (so you may choose to delete this one with no problem) and keep only HP_RECOVERY. I have not explored this option which could be useful, if you ever want to perform a "factory reset" and end up with the same setup that makes it impossible to install a second OS! If you are unsure, or if you already know that you will want to perform a factory reset in the future, then you must not perform any of the steps proposed below.
Why it is impossible to keep both of these partitions? Because the disk is partitioned with MBR, and so allows for only 4 partitions (and perhaps many logical drives inside the forth partition). The minute you resize one of the four existing partitions and try to create a fifth one (for Ubuntu), Windows presents you with a message that, to create the fifth partition, you have to convert the disk to a -so called- "dynamic" disk. DO NOT DO THIS if you plan to install Ubuntu under any circumstances. I did, thinking that a dynamic disk is perhaps Microsoft's term for a GPT disk, and later found out that no operating system, other than Microsoft's own, can use partitions on a dynamic disk. :(
To cut a long story short, after a lot of experimentation and unfortunate surprises*, I "chose" to partition my disk from scratch (thus deleting both HP_TOOLS and HP_RECOVERY), using MBR partitioning. This means that I created an "msdos" partition table, in GParted terms. I did the partitioning using the Ubuntu live USB stick, but you may do it during Windows 7 installation. However, it may be better to do it in Ubuntu, because this way you can be 100% sure that the partitions will be found by the Ubuntu installation program, which you will run AFTER the Windows 7 installation is completed (and this takes some time).
So, the steps that led to a successful installation are:
- From your functioning Windows installation -if you haven't done so previously- create the Windows 7 Installation DVD and the HP Drivers and Tools DVD using the instructions provided by HP.
- In the BIOS, make sure that in the Boot options the "Legacy" mode is selected (not UEFI hybrid, nor UEFI native). This was already selected in my laptop, but I played A LOT with the other options and eventually had to return to choosing the Legacy mode.
- Set the Boot order to:
a. Optical Drive
b. USB Hard Disk
c. USB Generic Device (this was needed for my USB flash drive)
d. Notebook Hard Disk
- If you have experimented with GPT partitioning, or if you have converted your basic disk to a dynamic disk, you have to delete all partitions and partition your disk from scratch using MBR (msdos) partitioning. If you have useful files on your computer, you must absolutely back them up before you re-partition your disk. My computer was brand new so I did not have any files of my own on it yet and I could skip the backing-up step.
- Install Windows 7 normally from the DVD. Be sure you select an appropriate size for the Windows partition and leave free space for Ubuntu. For me 100-150Gb is quite enough for Windows, because I do not install a lot of programs and I keep my personal files elsewhere (i.e. on another partition which is shared by both operating systems).
- Install Ubuntu normally, on a partition different than the one where you just installed Windows on. Usually during this step, I also create a separate NTFS or FAT32 partition for my personal files, and I make this partition available to both Windows and Ubuntu.
- In Ubuntu, you may have to disable the "gfxmode" of GRUB 2. I had to, because it messed up the Windows 7 boot screen. While Windows 7 did in fact boot ok after selecting its entry in the GRUB menu, the screen shown during Windows startup was corrupt (garbled). This made me think that I had a Windows boot problem, which was not the case. The OS was loading ok, only the splash screen failed to display correctly. This problem went away by setting GRUB 2 to use a text mode, not a graphical/hi-res mode.**
If you ever try it, let me know if you had a different -hopefully better- experience along the way.-
UPDATE: January 27, 2015
Unfortunately, after all this trouble, I found out that the WiFi works very unreliably in Ubuntu. I am now using Windows most of the time and only boot into Ubuntu occasionally, to install any updates and check to see if the problem has been solved.
* I tried A LOT to create a UEFI configuration, by partitioning my disk with GPT and changing the BIOS boot options and then trying to install Windows 7. Unfortunately, the Windows 7 setup program does not accept the use of GPT partitions for Windows installation. I am not sure if this is specific to my copy of Windows 7, but if you are working with the same one (the one created by HP recovery tools), by all means DO NOT waste time with UEFI and GPT partitioning!
** To disable the graphical GRUB 2 menu, enable the line GRUB_TERMINAL=console in /etc/default/grub, and perform a "sudo update-grub".