UEFI boot M5B3/Win8.1 on HP DM1 4301 laptop

Here you'll find a place for solutions and hints.

Please use one of the support subforums below for questions or if you have any issues and need support.

UEFI boot M5B3/Win8.1 on HP DM1 4301 laptop

Postby akbrian » Feb 25th, '15, 05:39

My laptop originally shipped with pre-installed Windows 8, with a traditional hard drive. From the factory it was set to UEFI and Secure boot enabled. Shortly after purchasing it (used) last year I replaced the hard drive with a SSD. I had briefly tried to dual boot it, but it was not convenientwith the HP bios quirks. I set the Bios to compatibility mode and installed Mageia 4 by itself, which worked fine.

In order to assist in the testing of Mageia 5, I recently tried a dual boot install with a wiped SSD. I really don't need Windows 8.1, but some want or need it, so I thought I'd give it try. I have to say upfront, that I did get the dual boot working, but couldn't seem to avoid a trip into bios every boot to manually choose grub2-efi. It seems if the HP bios found a MS efi file, it would default to that. In the end, I wiped 8.1 off the SSD to avoid this annoyance, because I really don't like it anyway. What follows is my experience.

This is my travel computer, so I don't normally use it unless I'm traveling, so I had a few days to play around with it. A clean Windows 8.1 install is easier to do now than in the past. Previously I had to work around the HP modified version of windows 8 imaged on the "recovery' partition. Now you can download the the ISO or USB version on the Microsoft website. You don't need to know the product key, to either download it or install it, if the target computer originally shipped with it. The bios (in UEFI mode) will tell the MS installer what the OEM installed OS was. This is a huge improvement over trying to setup a dual boot clean install with only the recovery image from the manufacturer. You can go straight to 8.1 if 8 was the oem OS. One catch though, is the download is via a windows exe file which creates the iso (or USB image), and it does have to be done from within windows, of any flavor, on any computer. It does not have to be the "target" computer. Here's the link;

http://windows.microsoft.com/en-us/wind ... resh-media

I burned it to DVD and then used a USB DVD burner connected to the laptop for the Windows install. I turned UEFI on and Secureboot off in bios prior to the install. I did a simple install using the default MS partitioning scheme. A description and discussion of this is here;

https://technet.microsoft.com/en-us/lib ... 24839.aspx

It looks like this;
Image
an alternative is this;
Image

Here are a description of the default MS partitions;
1) 300M Fat32 WinRE partition holds some MS command prompt tools for repair. You can delete this partition later, if you want. If you need these MS tools later, you can either use the bootable install media or download a free copy of Windows PE for from Microsoft, a bootable live media with Windows repair tools.
2) 100M Fat32 "System" (EFI) the MS equivalent of /boot/efi. This is really too small.
3) 128M MS super secret format MSR "Microsoft System Reserve"
4) Windows primary partition.
5)opt Windows recovery image.

Here's a discussion of ways to get the Windows installer to use a different partition configuration. It's halfway down the page.

http://superuser.com/questions/834765/h ... c-with-ssd

In my case, I did the default install, skipping the recovery image partition and giving Windows 80Gof my 256G SSD. Then i use the latest Gparted live CD and deleted the WinRE partition and then grew the "System" (/boot/efi) partition into that space, giving me a 400m /boot/efi. It would have been cleaner to do custom partitioning in the first place, but this did work fine.

I don't know if the problems with Gparted compatibility have been fixed or not, but it did work for me. You might want to use something else.

During the following Mageia 5 beta3 install, I mounted the /boot/efi partition, and let the Mageia install create /,swap, and home.

EDIT TO ADD: I used a Mageia 5 Beta 3 x86_64 DVD as my install source.
EDIT TO ADD: I disabled MS 8.1 "fast boot" prior to the modifying the windows partition or installing Mageia. A how to is here;
http://winaero.com/blog/how-to-disable- ... ndows-8-1/


I could boot into either OS fine post install, but I'd have to <esc>, then F9 to choose Mageia (by name) in BIOS. As said before, it would default to MS. Both the MS and Mageia .efi files were in the /boot subdirectory of /boot/efi/EFI along with the MS and Mageia subdirectories. When I deleted the MS entries, then it would boot automatically into Grub, however, then I couldn't boot into windows from grub2-efi.

Tomorrow will be the last day I can play around with this for awhile,as I'll be traveling for a few weeks. If anyone would like me to try something, I'll give it a go. Like I said earlier, this isn't really a problem for me, but it would be nice to have a little nice solution for others to use that must have Windows. Later I'll probably try a Windows 8.1 virtual machine form inside Mageia.

1st Edit: added Mageia install source
2nd edit: I added note that I disabled Windows 8.1 "fast boot" prior to install of Mageia.
3rd edit: for > from
Last edited by akbrian on Feb 26th, '15, 00:45, edited 1 time in total.
akbrian
 
Posts: 46
Joined: Sep 10th, '11, 01:56

Re: UEFI boot M5B3/Win8.1 on HP DM1 4301 laptop

Postby doktor5000 » Feb 25th, '15, 20:36

Thanks for sharing, moved this to the tips&tricks subforum, as it may also help others.

For the UEFI question regarding your HP bios quirks, cannot really help you further with that.
You might want to look a bit deeper and efibootmgr: https://wiki.archlinux.org/index.php/Un ... efibootmgr
Or maybe also reFind, this also seems to be pretty popular for multi-boot systems.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: UEFI boot M5B3/Win8.1 on HP DM1 4301 laptop

Postby martinw » Feb 26th, '15, 10:46

For the HP BIOS issue, by default it will load and boot the /EFI/Microsoft/Boot/bootmgfw.efi file. You can defeat this behaviour by moving that file - I move it to the directory above (/EFI/Microsoft). The BIOS then looks at the EFI variables (as set by efibootmgr) to determine the file to boot from.

I use the rEFInd boot manager, which automatically detects the file in its new location. If you are using grub2, you will probably need to edit its configuration file to tell it where to look.

Note that from time to time Windows Update will replace the bootmgfw.efi in its old location. When this happens, the laptop will revert to booting directly into Windows. You just need to move the file again. Fortunately this doesn't happen very often.

I'm surprised you say 100MB is not enough for the EFI partition. My 100MB partition is only 28% used. Does grub2 really use that much extra space?
martinw
 
Posts: 608
Joined: May 14th, '11, 10:59

Re: UEFI boot M5B3/Win8.1 on HP DM1 4301 laptop

Postby doktor5000 » Feb 26th, '15, 21:08

martinw wrote:For the HP BIOS issue, by default it will load and boot the /EFI/Microsoft/Boot/bootmgfw.efi file. You can defeat this behaviour by moving that file - I move it to the directory above (/EFI/Microsoft). The BIOS then looks at the EFI variables (as set by efibootmgr) to determine the file to boot from.

I use the rEFInd boot manager, which automatically detects the file in its new location. If you are using grub2, you will probably need to edit its configuration file to tell it where to look.

It would probably be really helpful if you could add that into our wiki, as special case for HP, maybe at https://wiki.mageia.org/en/UEFI_how-to# ... c_hardware

And also separately mention rEFInd as an alternative to grub2-efi including some more details as you seem to use it happily since quite some time.
This is currently pretty hidden at https://wiki.mageia.org/en/About_EFI_UE ... t_Managers
and https://wiki.mageia.org/en/EFI:_can_no_ ... ith_rEFInd
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: UEFI boot M5B3/Win8.1 on HP DM1 4301 laptop

Postby martinw » Mar 1st, '15, 22:57

OK, I've added a note about HP machines at https://wiki.mageia.org/en/UEFI_how-to#Instructions_to_specific_hardware. I'll add some notes on rEFInd once Mageia-5 has stabilised (I had hoped my patch for drakboot would be accepted, which would make this much easier...).
martinw
 
Posts: 608
Joined: May 14th, '11, 10:59

Re: UEFI boot M5B3/Win8.1 on HP DM1 4301 laptop

Postby doktor5000 » Mar 1st, '15, 23:02

martinw wrote:I had hoped my patch for drakboot would be accepted, which would make this much easier...

Which one, the one from https://bugs.mageia.org/show_bug.cgi?id=15153 ?
Best ping Thierry again in that report, usually he's kinda busy and might have missed your answer.
Otherwise I can ask again on mageia-dev mailing list.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: UEFI boot M5B3/Win8.1 on HP DM1 4301 laptop

Postby martinw » Mar 1st, '15, 23:13

doktor5000 wrote:Best ping Thierry again in that report, usually he's kinda busy and might have missed your answer.

OK, just done that.
martinw
 
Posts: 608
Joined: May 14th, '11, 10:59


Return to The magician suggests...

Who is online

Users browsing this forum: No registered users and 1 guest

cron