1

Background on new HP Pavillion 15

  1. usual procedure:

    a. delete windows partitions, preserving only /boot/uefi partition

    b. make several ext4 partitions including two for OSes

    c. install Linux on first OS partition

    c. done this procedure for 10 years

    d. the laptop worked perfectly this way since delivery

  2. after update with synaptic, reboot hung tried several times the scroll looked as expected - daemons started, etc - up to the point where it hung

  3. installed 16.04 from DVD on second OS partition no issues reported in install

  4. boot after new install and got the blue screen with error code 0xc0000225

  5. all diagnostics pointed to by the blue screen passed CPU, memory, disk, etc

  6. web search suggests the /boot/uefi partition is corrupt

Question: Can I reformat the /boot/uefi partition or salvage it in some way?

George Udosen
  • 36,677
  • How about enabling CSM and just installing in legacy mode? – You'reAGitForNotUsingGit May 26 '17 at 15:13
  • 3
    HP is not UEFI dual boot friendly. You generally have to do a work around. You can back up /EFI/ubuntu and /EFI/Microsoft and delete the ESP/FAT32 partition and create new FAT32 partition with boot flag to make new ESP. And restore files. But often you can do this if sda1 or change to correct FAT32 partition: sudo dosfsck -t -a -w /dev/sda1 If only booting Ubuntu you can rename boot of shimx64.efi to be "Windows Boot Manager" or use fallback/hard drive entry /EFI/Boot/bootx64.efi which is really shim.http://askubuntu.com/questions/486752/dual-boot-win-8-ubuntu-loads-only-win/486789#486789 – oldfred May 26 '17 at 15:35
  • The UEFI bootloaders are just files in a FAT filesystem. Copy them to a USB, see if dosfsck has anything to say about the filesystem. – ubfan1 May 26 '17 at 15:35

1 Answers1

1

A screen shot of the error message you're seeing may be helpful. I Googled it and found several pages, like this one, which show screen shots that make it look like this may be a Windows error. If so, then it sounds like your installation method left some Windows files intact, which have somehow been activated and are now trying to take control of the computer. (Side note: If you completely delete an OS from an EFI-based computer, be sure to delete its files on the EFI System Partition (ESP) to prevent this "zombie OS" syndrome! In your case, completely deleting the ESP and allowing the Ubuntu installer to create a new one would have been appropriate.) If my suspicion is correct, then deleting those Windows files from the ESP should work around this problem.

If the ESP (mounted at /boot/efi in Ubuntu) is damaged, or if the Windows boot manager has returned, zombie-style, it should be possible to boot the computer by using my rEFInd boot manager on a USB flash drive or CD-R. Note, however, that you may need to disable Secure Boot if it's enabled. Once the computer has booted, you should be able to investigate further, such as:

  • Use dosfsck to check for filesystem damage on the ESP. (Be sure to unmount it first.)
  • Look for leftover Windows files on the ESP. (They normally reside in /boot/efi/EFI/Windows, as seen from Ubuntu.)
  • Check the boot order with sudo efibootmgr -v. Pay attention to the BootOrder line; the first item there indicates the boot loader that the computer tries to launch first. If the Boot#### line corresponding to the first BootOrder line is Windows, then this explains the problem. Deleting the Windows files should fix the problem; or you can adjust the boot order with the -o option to efibootmgr. In extreme cases, you might need to add a new boot entry for Ubuntu. (Sometimes they go missing, either because of EFI bugs or because of accidents with tools like efibootmgr.)

In an extreme case, if the ESP is badly damaged, I recommend:

  1. Back up what you can from the ESP. A file-level backup (using cp, tar, zip, or similar tools) is fine.
  2. Try using dosfsck on the ESP.
  3. If dosfsck doesn't fix the problem, create a fresh FAT filesystem on the ESP by unmounting it and using mkdosfs on it.
  4. After creating a fresh filesystem, restore the original files and adjusting the /etc/fstab file to mount it using its new serial number (UUID= item in /etc/fstab; learn the new serial number by using blkid).
  5. If you still can't boot, you'll have to (re-)install a boot loader.
    • Boot Repair can completely re-install GRUB in a somewhat automated way.
    • Alternatively, if you're successfully booting via rEFInd or some other temporary tool, you can run sudo grub-install followed by sudo update-grub. This is a bit less thorough than Boot Repair, but is likely to be sufficient; and is less likely to create new problems through overkill.
    • Yet another option is to install rEFInd via its Debian package, PPA, or (if you're using Ubuntu 17.04) refind package in Ubuntu. This will bypass GRUB. You'll need to jump through a few extra hoops to get it working with Secure Boot, though.
Rod Smith
  • 44,284
  • 7
  • 63
  • 105
  • I did the following steps after consulting the answers posted (all comparatively non-invasive and reversible):
    1. mount /dev/sda1 /mnt/sda1
    2. cd /mnt/sda1
    3. tar cvf /sda1-backup.tar *
    4. cd
    5. umount /dev/sda1
    6. dosfsck -t -a -w /dev/sda1 (no complaints)
    7. mount /dev/sda1 /mnt/sda1
    8. efibootmgr -v revealed it was trying to boot from EFI/Microsoft/xxx first
    9. mkdir /mnt/sda1/EFI/junk ; mv /mnt/sda1/EFI/Microsoft junk There was no Windows directory there just HP, Microsoft, and ubuntu

    Reboot. Failed to boot.

    – Stewart Brown May 28 '17 at 21:36
  • In that case, see my step #5. – Rod Smith May 29 '17 at 00:51