Grub2

From RHS Wiki
Jump to navigation Jump to search

Change Grub2 background image[edit]

  1. Choose a background image following this criteria:
    • Format: PNG | JPG | JPEG | TGA
    • JPG/JPEG images must be 8-bit (256 color)
    • Images should be non-indexed, RGB
  2. Copy to Default folder: /usr/share/images/desktop-base/ or other folder
  3. Edit /etc/default/grub
    • Add: GRUB_BACKGROUND="/path/to/the/image.jpg"
  4. Run:
update-grub


Some images that will work:

 
Halcón Milenario
 
Kali

Boot order and default[edit]

/boot/grub/grub.cfg

Repair broken grub2 ubuntu[edit]

Boot from life usb

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
boot-repair

Ubuntu server resolution[edit]

Edit /etc/default/grub and set:

GRUB_CMDLINE_LINUX_DEFAULT="splash vga=789" ??
GRUB_CMDLINE_LINUX_DEFAULT="splash vga=792" # 1024x768@24bit

Save and run:

sudo update-grub
sudo reboot

Permanently add options to grub linux line[edit]

This is needed to fix a bug on raedon Edit /etc/default/grub and add nomodeset to GRUB_CMDLINE_LINUX_DEFAULT:

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
GRUB_CMDLINE_LINUX=""

Save and run:

sudo update-grub