Linux Mint Stand Alone on HP Laptop with UEFI
The Title probably should have said “HOW TO GET RID OF WINDOWS on a HP Pavilion Laptop. Like the title says, I installed Linux Mint 17.3 (Rosa) on my HP pavilion 17 Laptop. As most of those who have a late model HP laptop Know, HP and Microsoft really messed things up with their Firmware / Bios and UEFI and Secure boot. The way they changed the booting with windows 8.1 and 10, They made it all but impossible to dual boot Linux using Grub as the boot loader. You could change the boot order, but it would revert back to booting windows on the next reboot. There is a work around, and I wrote a Article about it in this blog, called Dual Boot Windows 8.1 with Linux Grub (Boot Order) HP Laptop. The problem was as soon as you installed or upgraded the kernel or made any changes, you where right back to having to press the F-9 key and selecting the Linux that you wanted to boot. It was a Real Pain Because Linux Mint is my everyday OS and I play with several others and boot several times. I only went to windows to upgrade the maps on my Garmin GPS maybe twice a year. So I would have to do the work around all over again. HP would not come out with a new Bios or Firmware to rectify this problem.
I then decided to get rid of windows on my laptop, and reinstall Linux Mint as a stand alone Distribution and use Grub as the primary boot loader for any other Linux Distro’s I wanted to Run. I did not want to have to press F-9 and then choose to boot My Main Distribution, Linux Mint. I wanted it to boot straight into Mint. I also wanted to use the GPT partitioning system and EFI. I like GPT Partitioning because you can have as many primary partitions as you want. No, 4 primary partition limit. There are 2 methods that I used to install a UEFI aware version of Linux. Below is the 1st and 2nd methods.
1. The first thing I did was to boot up with a Linux Mint 17.3 Live DVD you can use any UEFI aware Distro. I then proceeded to remove Everything on the hard drive using Gparted. I removed all of the partitions and data, so that I had a blank hard drive. I didn’t want any Microsoft or Hp crap on the hard drive. Windows 8.1 and 10 installed a restricted partition as well as there own UEFI setup. I then installed Mint telling it to use the whole hard drive and create a new partition table. After the install it booted right into Linux without having to press a key. I logged in and made sure everything was all right and working like it should. I then rebooted using the Live DVD again and when booted up I chose to use Gparted on the live DVD to remove all of the partitions except sda1 which is the /boot/efi partition. Why you ask, did I do that. First of all when you tell linux to use the whole hard drive it makes 3 Partitions Boot, Root, and Swap. It makes /boot/efi sda1 Fat32 512 mb then root and home in the same same partition using all of the drive except for swap it does that on sda2 then it makes swap on sda3 2 x ram size. I then made 3 partitions sda2 25gb for root sda3 8gb for swap and sda4 75gb for home. Leaving the rest of the drive as unformatted free space for other Linux distributions. Another reason I did it this way was to see what Linux Mint would do and how it would set up the partitions for UEFI or EFI which it did with The first partition sda1 fat32 512 mb with flag set (/boot/efi) Now on to the second method.
2. boot up with a live dvd or cd that is UEFI aware and delete every partition on the hard drive then at the beginning of the drive create a 512 mb fat32 partition yes thats right create a fat 32 partition 512 mb in size it will be sda1 called /boot/efi and set the flag. Now create your other linux partitions the way you want them. You can use all primary partitions because GPT partitioning does not have a 4 partition limit. Now install whatever UEFI aware linux Distribution that you want to use being sure to use the partitions that you made. Let grub use the default as it will find the /boot/efi during the install and will put the proper files in there. Now when you boot up it will go right to your distro without a key press.
I then made more partitions and installed another linux uefi aware distro to the Partitions that I just made, putting the grub boot loader in its root partition. I then booted up to my main distro Linux Mint and ran sudo update-grub in the terminal and it found the second linux distro that I just installed.
Note UEFI requires GPT partitioning Non UEFI aware linux distros will not work they need Regular partitioning and MBR (Master Boot Record) I like the fact that you can have more than 16 logical partitions with GPT. I have had cases where I have run out of partitions when multi booting several OS’s. Using a three partition setup for each disto, you could only run 5 distos unless you did not make a swap for some of them. With covential partitioning (MBR) you can only have 4 primary and 16 logical partitions. With GPT you can have as many distros as your hard drive can hold. No need for Logical partitions because you can use all primary partitions. There are several reasons for using GPT, but that is a subject for another discussion.