help: dual boot on hp notebook : installation/efibootmgr stuck/crashes [Solved]

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
wlkl
Level 1
Level 1
Posts: 8
Joined: Thu Jan 02, 2014 10:33 am

help: dual boot on hp notebook : installation/efibootmgr stuck/crashes [Solved]

Post by wlkl » Sun Aug 19, 2018 6:23 am

I got a brandnew hp 250 g6 notebook - windows 10 running

* the live usb runs ok,
* install linux mint runs nice and fast until it gets stuck (for hours I guess forever) in installing grub2

I tried everything I found in forms and google - nothing helped

If you run efibootmgr from the live usb it finds the created mint partition, but it is not in the bootorder. when you try to fix it by
* sudo efibootmgr -o .......
the efibootmgr is stuck forever

the same result with linux mint 18,4, 19 and Ubuntu 18 - even after newest bios update from HP

how can I fix that????????????
Last edited by wlkl on Tue Aug 28, 2018 12:05 pm, edited 2 times in total.

User avatar
catweazel
Level 17
Level 17
Posts: 7122
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: help: dual boot on hp notebook /efibootmgr stuck

Post by catweazel » Sun Aug 19, 2018 6:27 am

wlkl wrote:
Sun Aug 19, 2018 6:23 am
how can I fix that????????????
Check your machine's BIOS for fast boot and disable it. Also start Windwoes and turn off fast startup then shut down completely before trying to install.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

wlkl
Level 1
Level 1
Posts: 8
Joined: Thu Jan 02, 2014 10:33 am

Re: help: dual boot on hp notebook /efibootmgr stuck

Post by wlkl » Sun Aug 19, 2018 5:33 pm

thank you for your tip.

* Bios fastboot was already disabled and the option no longer visible, probably because of usb boot enabled, boot sequence or whatever
* secure boot was also disabled
* I newly disabled windows fast startup and did powerdown
* however, it still stucks in installing grub / efibootmgr
* furthermore, I detected a "general protection fault: 0000 [#1] SMP" during efi processing, as you can see towards the end of the attached syslog
syslog2.doc
(15.89 KiB) Downloaded 22 times
(its a simple textfile, filetype is misleading) - is anybody out there, that can see the cause?

Walter

wlkl
Level 1
Level 1
Posts: 8
Joined: Thu Jan 02, 2014 10:33 am

Re: help: dual boot on hp notebook : installation/efibootmgr stuck/crashes

Post by wlkl » Wed Aug 22, 2018 2:07 pm

hello - is anybody looking at my problem or has everybody given up ?

It would be helpfull to know which is the case, then I could decide how to proceed ....

thanks a lot


wlkl
Level 1
Level 1
Posts: 8
Joined: Thu Jan 02, 2014 10:33 am

Re: help: dual boot on hp notebook : installation/efibootmgr stuck/crashes

Post by wlkl » Wed Aug 22, 2018 2:57 pm

I tried it with refind and given up - I don't remember why. But looking at http://www.rodsbooks.com/refind I'm not sure how to proceed, furthermore, there is dire remark about HP.... Do you have a link to a description that I understand?

User avatar
administrollaattori
Level 14
Level 14
Posts: 5170
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: help: dual boot on hp notebook : installation/efibootmgr stuck/crashes

Post by administrollaattori » Thu Aug 23, 2018 12:02 am

wlkl wrote:
Wed Aug 22, 2018 2:57 pm
I tried it with refind and given up - I don't remember why. But looking at http://www.rodsbooks.com/refind I'm not sure how to proceed, furthermore, there is dire remark about HP.... Do you have a link to a description that I understand?
1. Boot using liveDVD or USB

2. Open Terminal and find EFI-partition

Code: Select all

sudo blkid | grep vfat | grep EFI
3. Mount EFI-partition under /boot (an example /dev/sda2)

Code: Select all

sudo mount /dev/sda2 /boot
4. Download rEFInd deb-package and install it using Gdebi

wlkl
Level 1
Level 1
Posts: 8
Joined: Thu Jan 02, 2014 10:33 am

Re: help: dual boot on hp notebook : installation/efibootmgr stuck/crashes

Post by wlkl » Fri Aug 24, 2018 7:58 am

Hi
I did following

* BIOS
** legacy mode off
** secure boot off
* I booted from USB
* I installed linux mint 18.3 mate 64-bit without grub (ubiquity -b)
* followed all steps from the script above. I didn't see any error message.
* gdebi said rEFInd installed ok

However, my notebook is still booting to windows. I do not see any indication, the anything else than windows bootloader is running.

disabling fast boot in window and reinstalling rEFInd didn't change the disappointing result


N.B. Has anybody analyzed the reproted general protection fault: 0000 [#1] SMP" during efi processing at line 6381 in https://drive.google.com/open?id=17MABE ... UAWMD0OGPC ???

Of course I might be wrong, but I get the feeling, that I'm trying blindly alternatives, without understanding the cause of the problem.

Aug 19 20:50:17 mint ubiquity: Creating config file /etc/default/grub with new version
Aug 19 20:50:17 mint ubiquity: Installing for x86_64-efi platform.
Aug 19 20:50:18 mint kernel: [ 638.176324] general protection fault: 0000 [#1] SMP
Aug 19 20:50:18 mint kernel: [ 638.176373] Modules linked in: ufs qnx4 hfsplus hfs minix ntfs msdos xfs libcrc32c jfs btrfs xor raid6_pq rfcomm bnep arc4 intel_rapl iwlmvm intel_telemetry_pltdrv intel_pmc_ipc intel_punit_ipc intel_telemetry_core snd_soc_skl snd_hda_codec_hdmi snd_soc_skl_ipc x86_pkg_temp_thermal intel_powerclamp snd_soc_sst_ipc snd_soc_sst_dsp coretemp mac80211 snd_hda_ext_core snd_hda_codec_realtek snd_soc_sst_match snd_hda_codec_generic kvm snd_soc_core uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 snd_compress ac97_bus snd_pcm_dmaengine snd_hda_intel videobuf2_core snd_hda_codec btusb videodev snd_hda_core irqbypass btrtl snd_hwdep media crct10dif_pclmul btbcm btintel snd_pcm bluetooth crc32_pclmul iwlwifi snd_seq_midi snd_seq_midi_event hp_wmi sparse_keymap ghash_clmulni_intel snd_rawmidi pcbc
Aug 19 20:50:18 mint kernel: [ 638.176762] snd_seq aesni_intel snd_seq_device aes_x86_64 crypto_simd cfg80211 glue_helper snd_timer joydev input_leds cryptd binfmt_misc serio_raw intel_rapl_perf snd mei_me mei mac_hid soundcore processor_thermal_device intel_soc_dts_iosf shpchp int3400_thermal acpi_thermal_rel int3403_thermal int340x_thermal_zone int3406_thermal dptf_power tpm_crb hp_wireless parport_pc ppdev lp parport autofs4 aufs nls_utf8 isofs nls_iso8859_1 dm_mirror dm_region_hash dm_log uas usb_storage i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect psmouse sysimgblt fb_sys_fops r8169 drm ahci mii libahci wmi fjes video pinctrl_broxton pinctrl_intel
Aug 19 20:50:18 mint kernel: [ 638.177104] CPU: 0 PID: 25755 Comm: efibootmgr Not tainted 4.10.0-38-generic #42~16.04.1-Ubuntu
Aug 19 20:50:18 mint kernel: [ 638.177149] Hardware name: HP HP 250 G6 Notebook PC/832E, BIOS F.40 05/17/2018
Aug 19 20:50:18 mint kernel: [ 638.177187] task: ffff8a30b1d7c200 task.stack: ffffaaa04349c000
Aug 19 20:50:18 mint kernel: [ 638.177221] RIP: 0010:0xfffffffefb052d58
Aug 19 20:50:18 mint kernel: [ 638.177243] RSP: 0018:ffffaaa04349fac0 EFLAGS: 00010086
Aug 19 20:50:18 mint kernel: [ 638.177271] RAX: 0000000067952730 RBX: 0000000000000002 RCX: 0000000000000004
Aug 19 20:50:18 mint kernel: [ 638.177307] RDX: 0000000000000002 RSI: 0000000000000000 RDI: 0000000000000002
Aug 19 20:50:18 mint kernel: [ 638.177344] RBP: ffffaaa04349fb90 R08: ffffaaa04349fb00 R09: ffffaaa04349fbf0
Aug 19 20:50:18 mint kernel: [ 638.177380] R10: 0000000000000000 R11: ffff8a30b1d7c200 R12: 0000000000000000
Aug 19 20:50:18 mint kernel: [ 638.177417] R13: 0000000000084fb0 R14: ffffaaa04349fbf0 R15: ffffaaa04349fbf8
Aug 19 20:50:18 mint kernel: [ 638.177454] FS: 00007ffa66eef700(0000) GS:ffff8a30bfc00000(0000) knlGS:0000000000000000
Aug 19 20:50:18 mint kernel: [ 638.177496] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Aug 19 20:50:18 mint kernel: [ 638.177526] CR2: 00007ffa66446f50 CR3: 000000017b0fa000 CR4: 00000000003406f0
Aug 19 20:50:18 mint kernel: [ 638.177563] Call Trace:
Aug 19 20:50:18 mint kernel: [ 638.177585] ? ttwu_do_wakeup+0x19/0xe0
Aug 19 20:50:18 mint kernel: [ 638.177607] ? ttwu_do_activate+0x6f/0x80
Aug 19 20:50:18 mint kernel: [ 638.177630] ? try_to_wake_up+0x59/0x3e0
Aug 19 20:50:18 mint kernel: [ 638.177651] ? ttwu_do_wakeup+0x19/0xe0
Aug 19 20:50:18 mint kernel: [ 638.177673] ? mutex_optimistic_spin+0xd7/0x190
Aug 19 20:50:18 mint kernel: [ 638.177700] ? efi_call+0x58/0x90
Aug 19 20:50:18 mint kernel: [ 638.177721] ? virt_efi_query_variable_info.part.4+0x5e/0x110
Aug 19 20:50:18 mint kernel: [ 638.177751] ? virt_efi_query_variable_info+0x69/0x70
Aug 19 20:50:18 mint kernel: [ 638.177779] ? efi_query_variable_store+0x95/0x1b0
Aug 19 20:50:18 mint kernel: [ 638.177807] ? efivar_entry_set+0xc4/0x150
Aug 19 20:50:18 mint kernel: [ 638.177859] ? efivar_create+0x156/0x230
Aug 19 20:50:18 mint kernel: [ 638.177883] ? sysfs_kf_bin_write+0x59/0x70
Aug 19 20:50:18 mint kernel: [ 638.177906] ? kernfs_fop_write+0x11d/0x1a0
Aug 19 20:50:18 mint kernel: [ 638.177930] ? __vfs_write+0x18/0x40
Aug 19 20:50:18 mint kernel: [ 638.177950] ? vfs_write+0xb8/0x1b0
Aug 19 20:50:18 mint kernel: [ 638.177971] ? do_sys_open+0x1b4/0x280
Aug 19 20:50:18 mint kernel: [ 638.177992] ? SyS_write+0x55/0xc0
Aug 19 20:50:18 mint kernel: [ 638.178013] ? entry_SYSCALL_64_fastpath+0x1e/0xad
Aug 19 20:50:18 mint kernel: [ 638.178038] Code: 48 cb 48 8b c1 48 83 c4 20 5b c3 48 8b d1 b9 04 00 00 00 e9 b7 ff ff ff cc cc cc 48 83 ec 28 48 8b 05 15 4b 00 00 4c 8d 44 24 40 <ff> 50 40 48 8b 4c 24 40 33 d2 48 85 c0 48 0f 48 ca 48 8b c1 48
Aug 19 20:50:18 mint kernel: [ 638.178164] RIP: 0xfffffffefb052d58 RSP: ffffaaa04349fac0
Aug 19 20:50:18 mint kernel: [ 638.185289] ---[ end trace 459f04cc6461b243 ]---
Aug 19 20:51:15 mint ntpd[1970]: 217.147.223.78 local addr 192.168.1.145 -> <null>
Aug 19 20:55:09 mint systemd[1]: Starting Cleanup of Temporary Directories...

User avatar
administrollaattori
Level 14
Level 14
Posts: 5170
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: help: dual boot on hp notebook : installation/efibootmgr stuck/crashes

Post by administrollaattori » Fri Aug 24, 2018 10:30 am

wlkl wrote:
Fri Aug 24, 2018 7:58 am
However, my notebook is still booting to windows. I do not see any indication, the anything else than windows bootloader is running.
If you have not set "ubuntu" or "rEFInd" as the first bootable device, or you have no option to choose, you are suffering a HP feature. The fix goes like
UEFI Dual boot in HP computer -> viewtopic.php?f=42&t=243338&p=1300722#p1300722
Last edited by administrollaattori on Fri Aug 24, 2018 12:07 pm, edited 1 time in total.

pensioner77
Level 3
Level 3
Posts: 113
Joined: Sun Dec 28, 2008 12:01 pm

Re: help: dual boot on hp notebook : installation/efibootmgr stuck/crashes

Post by pensioner77 » Fri Aug 24, 2018 11:14 am

I had problems trying to set up a HP laptop to dual boot Mint And the Windows 10. See my posts "pensioner77" particularly the direction to go to the tutorial[ Installing Mint on a Windows 8/8.1/10 Computer.

wlkl
Level 1
Level 1
Posts: 8
Joined: Thu Jan 02, 2014 10:33 am

Re: help: dual boot on hp notebook : installation/efibootmgr stuck/crashes

Post by wlkl » Sat Aug 25, 2018 1:01 pm

answer from pensioner77 above
  • I followed the tutorial Installing Mint on a Windows 8/8.1/10 Computer
  • however it again gets stuck in installing grub2 and in syslog you find again general protection fault: 0000 [#1] SMP and the backtrace is very similair to the one generated by the easy installation (innstall alongside windows), it is even identical another trace I produced with another an easy installation
  • thus, my conclusion: the easy installation and something else installation do the same thing until the error occurs
answer from administrollaattori viewtopic.php?f=46&t=275913#p1516475
  • The fix goes like UEFI Dual boot in HP computer -> viewtopic.php?f=42&t=243338&p=1300722#p1300722
  • copies around grub files in the efi partition - if I understand correctlhttps://forums.linuxmint.com/viewtopic.php?f=46&t=275913#p1516490
    y.
  • However, in my case, the grub2 installation failed. thus, problably my grub2 installation is not correct and I will destroy the whole system by copying around this unfinished grub stuff. If this happens, I'm not sure, whether I will be ever able to fix it.

wlkl
Level 1
Level 1
Posts: 8
Joined: Thu Jan 02, 2014 10:33 am

Re: help: dual boot on hp notebook : installation/efibootmgr stuck/crashes

Post by wlkl » Tue Aug 28, 2018 1:38 am

dual boot on notebook hp 250 g6: the solution step by step

(a) prepare BIOS etc.
  1. BIOS boot: legacy boot off
  2. BIOS boot: secure boot off
  3. BIOS boot bootsequence: put your live media (USB Stick for me) before harddisk/SSD
  4. Window: Fast Boot off (beim drücken des Netzschalters: herunterfahren)
  5. shut down completely
(b) install linux
here I faced the problem, that the normal installation got stuck installing grub2 and/or general protection fault. Thus I need to install without grub
  1. boot from live usb, configure correct keyboard, prepare/delete partitions etc.
  2. in a terminal enter: ubiquity -b . This starts mint installation with the usual panels but without boot installation
(c) install grub
  1. find the EFI partition (small partition dos formatted, in my case sda1
  2. sudo mkdir /boot/efi
  3. sudo mount /dev/sda1 /boot/efi
  4. install grub-efi (e.g. using synaptic). Because we mounted the EFI partition, it will try an EFI installation and gets stuck, just kill it.
(d) activate grub
if you boot now, you land in windows. Because we havn't found anything that works, we will use a dirty trick: overwrite the windows loader by grub in the efi partition. Everything here is done in Linux on the live USB (adapted from UEFI Dual boot in HP computer )
  1. running linux from live USB install grub as described above. As described it does not finisch, but now we find grub on the EFI ( EFI/ubuntu/grubx64.efi )
  2. sudo cp -1 /boot/efi/EFI external; this is for anxious guys like me: copy the whole EFI partition to an external media (like USB or other PC in the network), soi I have a backup in case I destroyed too much
  3. cd /boot/efi/EFI; sudo cp -a Microsoft MicrosoftOrig because we do our dirty trick in the folder Microsoft, we need a copy of it to boot Windows later on
  4. find the window loader in the EFI partition, in my case EFI/Microsoft/Boot/bootmgfw.efi
  5. cd /boot/efi/EFI; sudo cp ubuntu/grubx64.efi Microsoft/Boot copy grub to folder with windows loader
  6. cd /boot/efi/EFI/Microsoft/Boot; mv bootmgfw.efi bootmgfw.efi.orig; mv grubx64.efi bootmgfw.efi copy grub over windows boot loader (anxious as ever, I renamed it beforehand)
  7. its a good idea to rename/remove also EFI/Microsoft/Boot/bootmgr.efi, otherwise it will confuse later grub-mkconfig
(e) boot linux from grub shell
if you remove the live USB and boot now, you land in the grub shell (no longer windows :D ! )

I booted from grub to linux, because I wanted to know as soon as possible, if my linux installed on SSD is running correctly. Alternatively, you could do the next paragraph (f) from the live USB.

I used Terminal Inflection: Instigating a Manual Boot from the GRUB Prompt where you find further details
  1. grub uses an american keyboard. I didn't bother to configure my swiss keyboard, but just looked at the american keyboard layout
  2. ls to see all partitions grub knows about. In my case (hd0,gpt1) etc.
  3. ls (hd0, gpt1)/ try through all partitions until you find the EFI partition and the linux partition - in my case (hd0,gpt1) and (hd0,gpt5)
  4. set root=(hd0,gpt5) – this specifies the partition from which to load the images.
  5. linux /vmlinuz ro root=/dev/sda5 – Load this Linux kernel, with arguments - /vmlinuz is normally a link to the last installed kernel
  6. initrd /initrd.img – load this Initial RAM disk. this is normally alink to the img of the last installed kernel
  7. boot – tell grub to boot with the above specs
(f) configure grub - to linux
This configuration is done running the new linux the SSD.
  1. install grub-efi as explained in a paragraph (c)
    • To do this from the live USB you must tell the installer to work for a different linux installation.
    • This is done by apt-get -o root=/dev/sda5 install grub-efi
    • I'm not sure about the exact syntax, I havn't used it yet
  2. as explained this will not finish, but it started to build a config file /boot/grub/grub.cfg.new - if you don't find the file try update-grub or grub-mkconfig
  3. cd /boot/grub; sudo mv grub.cfg.new grub.cfg - rename the partly built config file to be active
  4. sudo grub-update
Now the system boots directly to the new linux on the SSD :D - at least it did for me

(g) configure grub - show menu
  1. switch off hidden timeout in /etc/default/grub by prepending a # to the pertinent line. Then it's only a comment and looks like

    Code: Select all

    #GRUB_HIDDEN_TIMEOUT=0
  2. I also changed in the same file a set the timeout (how many seconds to show menu before booting to default) to a shorter delay

    Code: Select all

    GRUB_TIMEOUT=3
  3. if the notebook comes back from hibernation, grub uses the timeout after error (30 secs), which I also change

    Code: Select all

    GRUB_RECORDFAIL_TIMEOUT=3
  4. sudo grub-update
Now, booting shows the grub menu and gives me 3 seconds to choose something, before it boots the new linux

(h) configure grub - add windows
  1. edit /etc/grub.d/40_custom to yield

    Code: Select all

        exec tail -n +3 $0
        # This file provides an easy way to add custom menu entries.  Simply type the
        # menu entries you want to add after this comment.  Be careful not to change
        # the 'exec tail' line above.
        menuentry 'Windows 10' {
        	insmod part_gpt
        	insmod fat
        	set root='hd0,gpt1'
        	chainloader /EFI/MicrosoftOrig/Boot/bootmgfw.efi
        } 
    remember, (hd0,gpt1) is my EFI partition and /EFI/MicrosoftOrig/Boot/bootmgfw.efi the windows loader copied to a new location in paragraph (d3)
  2. sudo grub-update
Booting shows the grub menu and me choose between windows and linux. Everything runs ok, until .....

(h) cleanup packages
Software update or Synaptic no longer worked. They complained about broken packages and told me to fix it by sudo dpkg --configure -a. However, dpkg tries to finish installation of grub-efi and, of course, gets stuck forever. I had to manually remove several packages
  1. sudo dpkg -r grub-efi removes the package
  2. sudo dpkg --configure -a if it finishes ok we are done. If it gets stuck again, it mentioned a (dependent) package (e.g. grub-efi-amd64) ==> restart by step 1 above for this package.
:D suprise :D ! Mint update, package manager etc. work, Grub boots with the menu I wish. Even a new linux kernel is automatically integrated.

(i) warning - conclusion
I do not expect an update of grub itself or of the windows loader to work automatically - probably manual steps from this script are necessary. Thus
  1. carefully, document what you had to do, you might need it again, probably when you already forgot some crucial details. Also, if necessary, please document for the community. e.g. in this post.
  2. once the system runs, backup everything
If you know what to do, type fast and everything works ok, you can do this script in an hour. However, neither was true, when i unpacked my new notebook - 10 days ago.
Last edited by wlkl on Fri Aug 31, 2018 7:40 am, edited 16 times in total.

User avatar
administrollaattori
Level 14
Level 14
Posts: 5170
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: help: dual boot on hp notebook : installation/efibootmgr stuck/crashes

Post by administrollaattori » Tue Aug 28, 2018 9:27 am

Please mark topic as [SOLVED], so that someone else can find the solution. :wink:

Post Reply

Return to “Installation & Boot”