Grub: Difference between revisions

From 太極
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
= Resources =
= Resources =
* http://www.gnu.org/software/grub/
* http://www.gnu.org/software/grub/
* https://en.wikipedia.org/wiki/GNU_GRUB
* https://help.ubuntu.com/community/Grub2
* https://help.ubuntu.com/community/Grub2
* https://wiki.gentoo.org/wiki/GRUB2
* https://wiki.gentoo.org/wiki/GRUB2
Line 12: Line 13:
[https://itsfoss.com/no-grub-windows-linux/ Fix Grub Not Showing For Windows 10 Linux Dual Boot]
[https://itsfoss.com/no-grub-windows-linux/ Fix Grub Not Showing For Windows 10 Linux Dual Boot]


= Show the grub2 screen =
= /etc/default/grub =
To show the grub2 screen, run 'sudo nano /etc/default/grub' and comment out the line GRUB_HIDDEN_TIMEOUT=0 and change the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="". Remember to run 'sudo update-grub' after any change to grub.
[https://www.howtogeek.com/196655/how-to-configure-the-grub2-boot-loaders-settings/ How to Configure the GRUB2 Boot Loader’s Settings]


= Add a splash image =  
== Show the grub2 screen ==
Follow the instruction at https://help.ubuntu.com/community/Grub2/Displays. Note that Grub2 will search the image based on some priority and there are also some minor requirements on the images. To test
To show the grub2 screen, run '''sudo nano /etc/default/grub''' and comment out the line GRUB_HIDDEN_TIMEOUT=0 and change the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="". Remember to run 'sudo update-grub' after any change to grub.
<pre>
sudo apt-get install grub2-splashimages
sudo cp /usr/share/images/grub/Moraine_Lake_17092005.tga /boot/grub/
sudo update-grub
</pre>


= How do I set the grub timeout and the grub default boot entry? =
== How do I set the grub timeout and the grub default boot entry? ==
https://askubuntu.com/questions/148095/how-do-i-set-the-grub-timeout-and-the-grub-default-boot-entry
https://askubuntu.com/questions/148095/how-do-i-set-the-grub-timeout-and-the-grub-default-boot-entry


Line 34: Line 30:
# '''sudo update-grub'''
# '''sudo update-grub'''
# Reboot
# Reboot
== Grub Customizer - GUI program ==
* [https://www.linuxuprising.com/2018/12/how-to-change-grub-boot-order-or.html How To Change The GRUB Boot Order Or Default Boot Entry In Ubuntu, Linux Mint, Debian, Or Fedora With Grub Customizer]
* [https://mashtips.com/edit-grub-with-grub-customizer/ How to Edit GRUB with GRUB Customizer]
= Add a splash image =
Follow the instruction at https://help.ubuntu.com/community/Grub2/Displays. Note that Grub2 will search the image based on some priority and there are also some minor requirements on the images. To test
<pre>
sudo apt-get install grub2-splashimages
sudo cp /usr/share/images/grub/Moraine_Lake_17092005.tga /boot/grub/
sudo update-grub
</pre>


= Boot into command line =
= Boot into command line =
Line 43: Line 51:


To switch back to GUI, type '''sudo init 5'''. Level 5 is the default.
To switch back to GUI, type '''sudo init 5'''. Level 5 is the default.
= Grub Customizer - GUI program =
[https://www.linuxuprising.com/2018/12/how-to-change-grub-boot-order-or.html How To Change The GRUB Boot Order Or Default Boot Entry In Ubuntu, Linux Mint, Debian, Or Fedora With Grub Customizer]

Revision as of 21:50, 21 December 2019

Resources

Repair/update Grub2

Not see Grub after re-install/upgrade Windows

Fix Grub Not Showing For Windows 10 Linux Dual Boot

/etc/default/grub

How to Configure the GRUB2 Boot Loader’s Settings

Show the grub2 screen

To show the grub2 screen, run sudo nano /etc/default/grub and comment out the line GRUB_HIDDEN_TIMEOUT=0 and change the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="". Remember to run 'sudo update-grub' after any change to grub.

How do I set the grub timeout and the grub default boot entry?

https://askubuntu.com/questions/148095/how-do-i-set-the-grub-timeout-and-the-grub-default-boot-entry

  1. gksudo gedit /etc/default/grub
  2. Change as you like. Save and closed the file.
    • You can change the default from 0 to any number
    • You can change the "hidden timeout" (no menu)
    • You can force the grub menu to show by commenting out the two GRUB_HIDDEN lines with a # at the beginning of the line
    • set the grub menu timeout (default is 10 seconds)
  3. sudo update-grub
  4. Reboot

Grub Customizer - GUI program

Add a splash image

Follow the instruction at https://help.ubuntu.com/community/Grub2/Displays. Note that Grub2 will search the image based on some priority and there are also some minor requirements on the images. To test

sudo apt-get install grub2-splashimages
sudo cp /usr/share/images/grub/Moraine_Lake_17092005.tga /boot/grub/
sudo update-grub

Boot into command line

http://www.linuxandubuntu.com/home/how-to-boot-into-linux-command-line

  1. Highlight the first item (default) and press 'e' in the GRUB menu
  2. Navigate to the line that starts with ‘linux’, change the runlevel to 3 (at the end of the line). Level 3 means multi-user, command-line only system
  3. Press Ctrl+x or F10 to boot into

To switch back to GUI, type sudo init 5. Level 5 is the default.