I have a Win 7/11.10 dual boot system with Grub 2 as the default bootloader. However, I want to make Windows bootloader the default bootloader (grub 'dos' like interface scrares the hell out of my sister) so when I start the PC I will have the following boot options: 1. Windows 7 2. Ubuntu
NB: A process to reverse this operation so Grub can be the default bootloader again will also be appreciated
Edit that file, from terminal run
(file has comments to help you). Find that line and set Windows number (number of Windows line in Grub, starting from 0). In my case that will be
Then save file and close gedit. Run that command to update grub:
There is a programm for windows called easy bcd. Install it when running windows and the proceed a described in the following link:
how to use easy bcd
Nevertheless I think also the other answers are valid as the question was basically how to avoid that the sister is scared by grub to choose windows if necessary.
PART 1:
Make Windows (ANY variant) the default Grub2 menu option.
Description: This sets Windows as the default boot option, and (with NO user action) the PC will auto-launch Windows on startup.
STEPS:
A. List your current menu items
B. Edit setup file
Set the boot default to your Windows boot partition (eg.)
WARNING: Just setting 'GRUB_DEFAULT=n', will NOT work after kernel updates, etc.
(Save the file and close.)
C. Update grub settings
Now, on boot, you will AUTOMATICALLY default to MS Windows.
PART 2: (Optional Extra)
Hide the Grub2 menu, and use the default menu option.
Description: This both hides the startup menu, and shortens the (usually 10 second) timeout. The PC will auto-launch whatever the default option is on startup.
NOTE: The user just needs to hold down the Shift key (on startup), to again see the Grub2 menu.
STEPS:
D. Edit setup file
Uncomment the line '#GRUB_HIDDEN_TIMEOUT=0', to look like:
(Save the file and close.)
E. Update grub settings
Now, on boot, you will AUTOMATICALLY boot to the default menu option, UNLESS you hold down the Shift-key at boot time. Then the grub2 menu will re-appear.
FURTHER DOCUMENTATION:
http://ubuntuforums.org/showthread.php?t=1195275
Grub2 can be set to boot any system by default, but to change the order they appear in would be difficult.
It is also possible to hide the grub boot menu (for your sister) and only show it by pressing the shift key. I recommend caution here. Details here.
There are two ways setting the default boot using editing a grub file.
These are described in the Ubuntu Communuity Documentation Grub2 page
The two ways are
Boot which ever operating system you booted last time, the "saved method"
This is the on I use. It lets me decide which one I going to use and will allow me to reboot into that system, handy when I'm updating.
Boot a specific operating system by default, your exact question
To start we need to find out what we are booting, open a terminal (dash, type terminal, … ) and type in grep menuentry /boot/grub/grub.cfg
From mine you can see why I prefer the "saved" method.
Now you are ready to edit the grub file…
Type in the terminal sudo nano -B /etc/default/grub and your password if asked
and the nano editor will open, thus (for mine)...
In my preferred way, I made these changes from the standard grub file:
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
In the way you are asking far to this
grep …
output prior. For my system if I wanted to only allways boot my Window XP, I set GRUB_DEFAULT to "Windows NT/2000/XP (loader) (on /dev/sda1)", everything between the "'s.GRUB_DEFAULT="Windows NT/2000/XP (loader) (on /dev/sda1)"
You could set GRUB_DEFAULT to the line number in the menu entry list (with 0 being the first), but when the kernel in Ubuntu is updated grub adds the new kernel to the top of the list, you would have to change the number, since Windows is the last one in the menu entry list. You can see this in my menu entry list.
Important last step
Now you have to run update-grub to update the system generated grub.cfg file in the /boot/grub directory.
Type into your computer sudo update-grub and your password if asked…
Notes on nano
nano is especally easy to use in the terminal. Move around with the arrow keys. Type in you addtions, delete the unwanted.
The " -B" (or " --backup") option backs up the previous version of it to the current filename suffixed with a ~. Very handy in case of the dreaded Fat pfinger effect.
When you are though, Crtl-O will allow you to save your edits by hitting Enter. Closing nano without saving, Ctrl-X These and other options are shown at the bottom of the terminal screen with the ^ indicating Ctrl
Notes about nano, sudoeditor, and other editors.
Some in the Ubuntu community suggest sudoedit instead of nano. I recommend nano (which is the default sudoedit editor in later distributions of Ubuntu) instead of sudoedit because the default can be overridden in non-obvious ways (unless you are an administrator). sudoedit is safer in that it automatically saves a backup copy of the edited file, but the "
-B
" command line option in nano does the same thing. nano is safer than other editors like vi or emacs because it doesn't have scary shell escapes.If you prefer not to use the nano editor and prefer the Gnome Text Editor, instead of sudo nano -B use gksu gedit. I generally do this for large files, and
/etc/default/grub
could easily be considered a large file. Thus type in gksu gedit /etc/default/grub instead of sudo nano -B /etc/default/grub. Note that the Gnome text editor does not automatically make a backup!Notes on my grub file
I made some changes to grub for my personal needs. Such as the background picture of the moon launch. How to do these are discussed at the Ubuntu Community Documentation page on Grub2, recommended.
Good luck!
If you would rather use the bios to set this, reboot your computer and enter the bios (by pressing DEL in my case).
Go to Boot Options --> (This step may vary) Hard Disk Drive priority --> 1st Priority -> Windows Boot Loader
The second step may vary depending on how you installed Ubuntu / Windows
The key is that if ubuntu is set to a higher priority (HDD priority or boot device priority), you should replace that with the Windows Boot Loader
Most reliable way is to use Windows' own tool that Microsoft ships on every Windows CD
bootrec /fixmbr
If that didn't work, try
bootrec /fixboot
insteadWhy has nobody mentioned Clover EFI bootloader? I got 5 OSs to boot, always the choice that I want to boot Windows 10, macOS High Sierra, macOS Mojave, Linux, Ubuntu 19.04 and last but not least Phoenix OS aka Android OS distributed over one hard drive.
I can even trugh mine hackintosh, my Windows 10 existing HDD virtualizes all data including the OS in front of me without restarting macOS, so I would definitely recommend Clover to any of you.
The problem of using grub to dual boot Windows 10 and Ubuntu, is that Windows update would refuse to run. If you are OK with not being able to update Windows 10, then grub is the best bootloader.
If otherwise, Windows update is needed for your work (Windows Defender etc...), then BCDEdit is the way to go.