So I have an HP EliteBook that is using UEFI instead of BIOS, which I was not aware of before. This is my first encounter with UEFI.
This laptop already had Windows 10 installed, and I wanted to dual boot a linux distribution to access some software that is not available in Windows. I downloaded Linux Mint 17.3 because I wanted to try something different than the standard Ubuntu install. Made a live USB from www.pendrivelinux.com Yumi tool, and proceeded to install Linux Mint.
Installation went through no problem, but then I couldn't boot the computer without USB stick. I can use the USB stick and "start from first hard drive", but without USB stick it says there is no hard drive present or something similar. With the USB stick I tried to mount Windows partition, but it can't because it says Windows is in suspended mode or something such. I read about how you have to turn off something in Windows 10 before you try to dual-boot, but it's too late to change that now, damage is already done. I would prefer to keep my windows disk if at all possible, but I don't mind wiping the linux stuff and starting over.
So I tried downloading the Windows 10 iso from microsoft.com and dd that to a USB stick with the Linux live CD. Doesn't work, I can't get it to boot from any other USB stick than the Live CD I first created from Windows with Yumi, no matter how hard I try. Then I tried making a partition on the hard drive with the Windows 10 installation medium, but that only shows a screen that "installation medium is missing" when I manage to boot into it with syslinux from the Yumi USB stick. So it seems I can't use Windows installation disk to reset the system, because this laptop doesn't have a CD drive.
After reading a lot about UEFI and EFI installations of Linux, I thought maybe I can get it to work with a new installation of a different distribution. So I tried Xubuntu and Ubuntu standard desktop. Both of them install fine, but refuse to boot after some error that I don't remember. So finally I downloaded the Gentoo LiveDVD but that doesn't even start the LiveDVD because it hangs on something like Windows is sleeping please fix your hard drive (like Mint and Ubuntu should have done, if they had then I would have been a lot more aware of the problems facing me). Anyway, nothing I tried installing will fix the issue. All installation mediums I tried just installs some version of GRUB and I have to use the Live USB Yumi stick to select "start from first hard drive" in order to get to the GRUB menu. And even then, they don't include Windows 10 in the GRUB menu, and they don't start themselves.
Linux Mind 17.3 that I installed first is still intact and can be started through the USB stick. And I can get most live distributions to run through the syslinux Yumi USB stick. Gentoo is the only one that completely refuse to start, with reference to Windows sleeping.
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up refind (0.10.3-0ppa1) ...
Installing rEFInd to the ESP...
Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
Try 'modprobe efivars' as root.
I also tried to install rEFInd because I saw some discussion that it might help, but I get the above error and running modprobe efivars doesn't appear to do anything at all.
The linux installs all try to use GRUB. None of the distributions I tried so far have identified the need to use EFI.
So my question is, how can I revert back to before I tried to install any linux distro? How can I let my machine just step back to use EFI again instead of GRUB through USB-stick? Like I said, booting from a different USB doesn't work for whatever reason, so I can't use the rescue files.
Can I edit the EFI partition manually? I tried mounting it, and it's just some files, looks like a normal partition. But I can't find any guide for this through my googling so far...
$ sudo blkid
/dev/sda1: LABEL="Windows RE Tools" UUID="EE9AA08D9AA0543D" TYPE="ntfs"
/dev/sda2: LABEL="SYSTEM" UUID="3EA1-5B19" TYPE="vfat"
/dev/sda4: LABEL="Windows" UUID="FE120EA9120E674D" TYPE="ntfs"
/dev/sda5: UUID="86F6385CF6384EA5" TYPE="ntfs"
/dev/sda6: UUID="ee115c6d-6d07-415f-92af-56ddf14f99f3" TYPE="ext4"
/dev/sda7: UUID="f01d733f-f665-485e-afa5-254ecfecc6ec" TYPE="swap"
/dev/sda9: UUID="00acda3f-fcfe-408d-a6c6-d692e85d3ea7" TYPE="ext4"
/dev/sda10: LABEL="Windows10install" UUID="019A3789077F6B20" TYPE="ntfs"
/dev/sdb1: LABEL="MULTIBOOT" UUID="3696-FEFE" TYPE="vfat"
/dev/sdc1: LABEL="UDF Volume" TYPE="udf"
$ sudo parted
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA TOSHIBA MQ01ACF0 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 1070MB 1068MB ntfs Basic data partition hidden, diag
8 1070MB 1074MB 4194kB bios_grub hidden, bios_grub, legacy_boot
2 1074MB 1451MB 377MB fat32 EFI system partition boot
3 1451MB 1585MB 134MB Microsoft reserved partition msftres
4 1585MB 171GB 170GB ntfs Basic data partition msftdata
5 171GB 172GB 868MB ntfs hidden, diag
6 172GB 457GB 285GB ext4 Basic data partition msftdata
9 457GB 472GB 15.0GB ext4
10 472GB 478GB 5555MB ntfs Windows10install boot, legacy_boot
7 492GB 500GB 8126MB linux-swap(v1)