Grub keeps getting deleted

Hi, I am using opensuse leap. I have grub 2 installed in /dev/sda and it keeps getting wiped every 2 days (sometimes every day). This has happened for a month now. Gnome-shell restarts itself usually every day (could it be related?) and sometimes my computer would freeze dhe tell me that it can not unmound /home. HDD is fine because i use windows without any problem. Grub is wiped when using linux (windows doesn’t play any part because i don’t open it). The process happens like this:

  1. I shutdown my computer.
  2. I open laptop.
  3. It sends me to BIOS and there is no boot record at all.
  4. I click save and reboot
  5. It reboots in windows (it was not listed in step 4)
  6. When i use a USB tool to list grub entries, it shows opensuse and i can boot using the USB tool (it doesn’t write anything to HDD).

Can someone help me troubleshoot?

Laptop has EFI and secure boot is disabled.

Show as root

efibootmgr

BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0000,0001,0002
Boot0000* opensuse
Boot0001* Windows Boot Manager
Boot0002* UEFI: silicon -power 0.00

That looks correct opensuse is set to be default boot.

Is it booting correctly?

The current boot is 2 But I don’t know what that is???

Some hardware insists on booting Windows… Is it an HP??

Yeah for now it is.

The last is the USB device that i use to list grub when it is removed from BIOS.

I have an ASUS x550cc.

need to see list when it is broken.

If you boot to Windows does that break it?

I turned my laptop on today and the grub was gone. It sent me to BIOS settings. When i clicked save and reboot, it booted me to windows (even that windows was not listed first before rebooting). I didn’t open windows before.

I managed to boot to grub via one iso software that listed grub files. here is what sudo efibootmgr returns:

BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0001,0002
Boot0001* Windows Boot Manager
Boot0002* UEFI: silicon -power 0.00

Here is the grub output: Screenshot at 13:34:16.png - Imgur

dev/sda3 is supposed to mount /boot/efi

What should i do?

From what it looks like here, it doesn’t. /dev/sda7 gets mounted on /boot/efi
But what’s interesting is the fact that two partitions have the boot flag on

Well how do i fix that? I want to delete /dev/sda7 and use the other one.

Boot flag is not used in EFI booting

Look into each and see what is exactly happening ie what OS it serves. You can have more then one efi boot partition the UEFI should see and use both

To change you would need to reinstall grub2 and point it to the partition you want to use

Hi
You can’t unless you want to break your system…

sda3 (it’s also too big for efi booting partition size needs to be less than 512MB from memory) look like some legacy boot partition, previous install as an MBR boot and not deleted?

Mount /dev/sda3 and inspect to see what’s there, maybe you flipped the type to ef00 at some point?

Is there a BIOS update available for your system from ASUS to help loosing your efi nvram entry?

Else if it keeps going missing there are some tweaks(hacks) that can probably be implemented, but in general of the few ASUS systems I’ve had booting via UEFI they have behaved.

I deleted sda7 and formated sd3 to use vfat and /boot/efi. Now i am trying to install grub there via sudo grub2-install /dev/sda3 and it says “Installing for x86_64-efi platform.
grub2-install: error: cannot find EFI directory.” Any help?

Show gdisk /dev/sda

And don’t boot since your system now is unbootable

Do you have a rescue disk?

Hi
Is the type set to ef00? Is it still the same size, or did you shrink?

I have installed efi on /dev/sda3 it installed ok now but it doesn’t detect windows 10…
output:

GPT fdisk (gdisk) version 0.8.8

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help):

gparted: http://i.imgur.com/S1J5Grv.png
Imgur: The magic of the Internet
http://i.imgur.com/K0dnB2Y.png
http://i.imgur.com/wVycLmX.png

Probably since Windows boot files were deleted in sda7. Need to reinstall or fix Windows now

See my reply above.

So what can i do now? :cry:

Was the reason to have looked into the partitions to see what was really up

Reinstall or use a Windows repair

Why can’t grub make them again? When i installed opensuse, I selected the grup partition and it automatically added windows.