I have dual BOOT Windows 10 & Ubuntu 16.04 in UEFI mode and secure boot off. Due To degrading of my laptop's battery, system shutdowns(not properly but same as if pressing power button for a long time) on low battery without giving warning. Then when i switch on it gives me CMOS error and when i check the bios, the setting changes automatically to default and boot option show legacy mode. Any Solution? Same Happens In windows also.