1

I have a Sony Vaio and dual boot windows 10 and Ubuntu 16.04. All of the sudden, the main windows partition stopped working. It would just load infinitely. I tried to use boot repair to fix it. I don’t know if that could have even fixed it. Anyways, it did not work. So I am using Ubuntu. Then, I restarted my computer and now all of the sudden before I even get the option to choose an OS to boot, I get this error. It just brings me to vaio care. If I select start troubleshooting, I get the same error. I now have practically no use out of my computer and have no idea why it stopped working suddenly. Please help me at least be able to use one of my operating systems again. I do not want to lose data on either partition. Update: When I used boot-repair it told me to turn off secure boot in BIOS setup. Now, I discovered that the Ubuntu partition still works when Secure Boot is disabled, but not when it is enabled. When Secure Boot is enabled, I get the error stated above and can only access BIOS setup. If I try to access my Windows memory in Ubuntu, I get this error:

"Unable to Access 932 GB Volume" Error mounting /dev/sda5 at /media/millar/4484E74A84E73D54: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" "/dev/sda5" "/media/millar/4484E74A84E73D54"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 1).
Metadata kept in Windows cache, refused to mount.
Failed to mount '/dev/sda5': Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.

Contents of fstab file:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda10 during installation
UUID=3c429404-bec5-4f99-8d13-6f01585040cb /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda3 during installation
#UUID=12E6-1CD7  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/sda9 during installation
UUID=7e7a010e-81fc-4de0-93c9-14cd77f4260f none            swap    sw              0       0
UUID=12E6-1CD7  /boot/efi   vfat    defaults    0   1
Organic Marble
  • 23,641
  • 15
  • 70
  • 122
  • Is that a typo in the title eti should be efi? The /EFI/BOOT is not where grubx64.efi is usually run from, that whould be /EFI/ubuntu/grubx64.efi. If you are actually booting shim from /EFI/BOOT/bootx64.efi, then grubx64.efi should also be present, and that's what your error message indicates. Are you booting that way, with bootx64.efi? Since it was working, what was changed to make it fail? Can you use the EFI menu (some function key at power-up) to select Windows (or Ubuntu)? – ubfan1 Dec 24 '17 at 23:51
  • Yes, it was a typo. I think I am booting from grubx64.efi because that is the error I keep getting. I added an update clarifying my problem some more, and I think it answers the other questions you asked. Pressing function keys when my computer starts does not do anything btw. – millar37098 Dec 29 '17 at 17:14
  • Please add a link in your question to the boot-repair report. – ubfan1 Dec 29 '17 at 17:32
  • Hey, I just posted a different question with all the details I can think of. Here is the pastebin link to the boot-repair report:http://paste.ubuntu.com/26240501/ – millar37098 Dec 29 '17 at 17:52
  • Here is the link to the new question: https://askubuntu.com/questions/990615/cannot-boot-error-failed-to-open-efi-boot-grubx64-efi-not-found – millar37098 Dec 29 '17 at 17:53
  • Sorry for being so inconvenient – millar37098 Dec 29 '17 at 17:53
  • Sony is not known to be easy to dual boot. Some of the work arounds. Boot-Repair should automatically do copy file with 'use standard EFI file': http://askubuntu.com/questions/150174/sony-vaio-with-insyde-h2o-efi-bios-will-not-boot-into-grub-efi Sony, HP & others workarounds: http://askubuntu.com/questions/486752/dual-boot-win-8-ubuntu-loads-only-win/486789#486789 – oldfred Dec 29 '17 at 20:21

1 Answers1

0

The other question you refer to has a different disk, so I'll ignore it for this answer.

You a gpt partitioned disk with no MBR (so no legacy boot, good), with 10 partitions, two of which (sda1 and sda3, bad) appear to be (incomplete) EFI partitions. I looks like sda3 is the most complete, and is the one used, so you may treat sda1 as a backup.

To fix sda3, copy /EFI/ubuntu/grubx64.efi to /EFI/Boot/grubx64.efi.
When fstab is fixed (see below), sda3 will be mounted at /boot/efi.
You may also mount sda3 anywhere like /mnt on the live media if you like. Once mounted (below assumes /boot/efi), copy the files with the cp command.

cp /boot/efi/EFI/ubuntu/grubx64.efi  /boot/efi/EFI/Boot/grubx64.efi 

cp Then check that the size of /boot/efi/EFI/Boot/bootx64.efi is the same as /boot/efi/EFI/ubuntu/shimx64.efi -- if different, copy /boot/efi/EFI/ubuntu/shimx64.efi to /boot/efi/EFI/Boot/bootx64.efi (note the name change). That probably fixes the error message about missing /EFI/Boot/grubx64.efi. The /EFI/Boot files are a fallback bootloader, and this setup will boot with either secure boot enabled or disabled.

Fix the /etc/fstab file -- uncomment (remove the #) on the mount at /boot/efi of the EFI partition.

#UUID=12E6-1CD7  /boot/efi       vfat    umask=0077      0       1  

should be

UUID=12E6-1CD7  /boot/efi       vfat    umask=0077      0       1  

Windows seems to have been hibernated instead of shutdown. Also the filessystem is marked "dirty" (from your other question), so go into the Windows power options and make sure the "shutdown" is not set to "hibernate". You should be able to boot Windows directly from the EFI menu (some function key at power-up to select boot device/OS) -- just choose Windows. Run chkdsk on sda5 (probably Windows C:, check the size, or just chkdsk all the Windows "disks").

With Windows disks cleaned up and Windows shutdown properly, run

 sudo update-grub  

from Ubuntu, and that should update the grub menu to include Windows. Some machines may not boot Windows from Grub with secure boot enabled, so if you don't want to use the EFI menu to boot Windows, disable secure boot.

See oldfred's links for Sony tweaks.

At some point, you might backup the sda3 to sda1. It's good to have a copy of the EFI boot files in case something happens to the working set.

At some later date, you might clean up the old kernels in /boot by purging their packages.

ubfan1
  • 17,838
  • What do you mean the other questions has a different disk? I posted that question and it is the same disk. Maybe I do not understand what you are referring to. Anyways, I do not know where to find /EFI/ubuntu/grubx64.efi or any of those files – millar37098 Dec 30 '17 at 17:09
  • Also, can you clarify what you mean by copy to? Do you want me to replace the contents of one file with the other or just concatenate? – millar37098 Dec 30 '17 at 17:11
  • I also need clarification on what to do with the fstab file. I added the contents of my fstab file to the question. I do not know what part you are wanting me to uncomment – millar37098 Dec 30 '17 at 17:16
  • In the other question, the fdisk on the partition produced nonsense, so I ignored the rest. Below that, the valid output marks the sda5 ntfs filesystem as "dirty". – ubfan1 Dec 30 '17 at 20:09