1

I have a fully working EFI dual-boot of Windows 7 and Ubuntu 14.04.3 in that I can select either Ubuntu or Windows from my grub menu and that OS boots correctly.

However, on my Ubuntu install when I use sudo reboot or otherwise issue a restart command it does not return to the UEFI BIOS or GRUB menus. Instead it always returns immediately to the Ubuntu OS and does not give me any option to switch OS to Windows.

This is a major issue for me as I wish to use grub-reboot to boot into my Windows 7 OS remotely. Currently I can only achieve this by using grub-reboot then powering off and physically pressing the on switch on my PC.

Am I missing some option for the reboot command that allows me to "fully" restart back to the GRUB menu or UEFI BIOS?

  • Is system UEFI or BIOS? Grub does have a one time reboot, UEFI has a one time boot, but older BIOS is more limited. – oldfred Feb 16 '16 at 15:47
  • The system is all UEFI, and I've switched off non-UEFI booting for simplicity. – thehug0naut Feb 16 '16 at 15:51
  • Not sure if this was expected, but I just ran [ -d /sys/firmware/efi ] && echo "Installed in UEFI mode" || echo "Installed in Legacy mode" and got back "Installed in Legacy mode" even though I installed everything using with non-EFI booting disabled and grub is 100% running in EFI mode – thehug0naut Feb 16 '16 at 16:17
  • Now best to see details. If Windows & Ubuntu are not in same boot mode, you can only dual boot from UEFI menu, not grub menu. Post the link to the Create BootInfo summary report. Is part of Boot-Repair: https://help.ubuntu.com/community/Boot-Info – oldfred Feb 16 '16 at 17:05
  • http://paste.ubuntu.com/15093633/ – thehug0naut Feb 16 '16 at 17:56
  • Have you tried grub's reboot command. sudo grub-reboot 'Windows Boot Manager (on /dev/sda1)' This requires GRUB_DEFAULT=saved in /etc/default/grub (and then regenerating grub.cfg) – oldfred Feb 16 '16 at 19:32
  • Yes this was what I tried and it works perfectly, but I must completely shut down the system and then press the power button to make use of it. The command sudo reboot does not reboot my system to grub as stated above. – thehug0naut Feb 16 '16 at 19:50
  • It sounds like your firmware is defective and is not feeding the OS the EFI variables as it should. (I've seen this on one or two computers -- mostly relatively old EFI systems.) You may want to check for a firmware update (probably called a "BIOS update" by the manufacturer) and see if that helps. – Rod Smith Feb 16 '16 at 21:12
  • As far as I know I'm running the latest "BIOS" for my motherboard - its an Asus P8Z77-I deluxe so I'm running version 1201. Is there anything else you think I could try? – thehug0naut Feb 16 '16 at 22:17
  • I only know efibootmgr can set a one time boot. ` -n | --bootnext XXXX set BootNext to XXXX (hex). http://linux.die.net/man/8/efibootmgr If you set it to the Windows UEFI entry in Hex does it boot Windows one time? Never used it, do not know much about it. Perhaps Rod Smith knows more? But Windows updates may reset system to only boot Windows or boot Windows first. – oldfred Feb 17 '16 at 00:54
  • This is just providing me an alternative way to do the "grub-reboot" command. Either method would work correctly IF I could actually restart my PC from command prompt and it actually returned to the grub-menu or UEFI "BIOS" prompt. My problem is NOT setting the one-time reboot setting; it is getting my PC to properly restart. According to Rod Smith this could be hardware or firmware related, so unless someone else provides a another line of attack it looks like I'm stuck :( – thehug0naut Feb 20 '16 at 13:35

2 Answers2

0

sudo reboot and shutdown -r now from the terminal should work properly. May be something wrong with your grub2 setup. Try grub customizer

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer
grub-customizer

to fix your default O/S and other options.

If something wrong with your boot may be you need to try boot-repair from a Live USB/CD

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair
Ashu
  • 3,966
  • There isn't anything wrong that I can see in my grub configuration - it works perfectly except I can't reboot to the grub selection menu, only power off to reach it.

    Also I can't edit one character, but you need to have grub-cutomizer as the last command in the first section

    – thehug0naut Feb 16 '16 at 14:47
  • So you are saying that the commands sudo reboot and sudo shutdown -r now should be taking me back to the grub menu? Are there specific logs I can look at to see if there is a problem with the reboot process? – thehug0naut Feb 16 '16 at 14:59
  • dmesg, kern.log and look for other logs under /var/log – Ashu Feb 16 '16 at 16:03
  • Neither suggested option has resolved the issues with my sudo reboot command. So far I haven't found anything useful in any of the logs – thehug0naut Feb 16 '16 at 16:04
0

Due to an unrelated issue I needed to rollback my kernel version.

Imagine my surprise when my reboot issue was resolved by rolling back to 3.13.0-79-generic (also successful with 3.13.0-77-generic) and purging all later kernel entries.

During the rollback process I noted that my "reboot" always returned to the latest kernel despite not even returning to the grub menu. Perhaps if I had noticed this sooner it would have prompted me to try a rollback and purge back when I originally asked the question.

I now wonder if there is an underlying kernel/hardware conflict which caused my system to reboot improperly.