The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 33,482β€…    Votes:  10β€…    βœ… Solution
Tags: dual-boot   grub2  
Link: πŸ” See Original Answer on Ask Ubuntu ⧉ πŸ”—

Title: Edit grub from Windows?
ID: /2016/10/07/Edit-grub-from-Windows_
Created: October 7, 2016    Edited:  April 13, 2017
Upload: December 3, 2023    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false

The title of the question is what the OP proposed solution to the problem is. The title could be changed to β€œHow can I have Grub boot to the last used OS choice automatically?”.

This should arguably be default grub behavior. For example, I might be using Windows for a week playing Mass Effect IV and never come into Ubuntu. Or I might be testing something in Ubuntu 14.04 with a specific Kernel and I don’t like having to pick it every time over 50 reboots.

There is a link in various comments above to a Stack Exchange answer proposed as a duplicate question. We can reference an AskUbuntu Q&A too: How to get grub2 to remember last choice?

In summary edit /etc/default/grub, comment out one line and insert two lines below it:

#GRUB_DEFAULT=0 # Rather than first menu option, we'll default to last  OS.

Then save the changes and run sudo update-grub.

Voila! Whilst working in Windows and automatic updates happen at 3 am the system reboots to Windows and applies Stage 3 of 3.

OP is proposing β€œEdit Grub from Windows?” in the title as a solution to the problem. However, after stating the reason why, it becomes clear the title should be changed to something like: β€œHow do I ensure Windows automatic update reboots go to Windows instead of Ubuntu?”.

If the question was β€œHow do I reboot to the last OS choice?” it’s an obvious duplicate of the link. The proposed new title (or something shorter) has merit because others may search on the same problem. I know I’ve had the Windows update-reboot-update problem before and never would have imagined to search on the link here.

PS You can edit Grub from Windows but, why would you want to?

⇧ How to understand frequency in powertop Call Grub (MBR) from Linux  β‡©