Hello all,
I am fairly new at Linux and have learned over the last half year + on Linux Mint and have been extremely satisfied. However, I wanted to try a rolling release distro and tried TW, and have been very impressed so far.
However, I updated GRUB recently on my mint partition and it overwrote the bootloader I installed when I installed SUSE. Originally, SUSE was not listed on Grub at all. After “grub2-update” it now shows up on the grub menu, but it does not boot when selected.
I understand I need to edit my grub config file, but I cannot figure out what I need to do. Any suggestions would be greatly appreciated.
Thanks!
If you need to change anything you edit ‘/etc/default/grub/’. Then to update ‘grub.cfg’ (mine looks like this):
# update-grub2
Generating grub configuration file ...
Found theme: /boot/grub2/themes/OpenMandriva/theme.txt
Found background: /boot/grub2/themes/OpenMandriva/terminal_background.png
Found linux image: /boot/vmlinuz-4.1.12-nrjQL-desktop-1omv
Found initrd image: /boot/initrd-4.1.12-nrjQL-desktop-1omv.img
Found linux image: /boot/vmlinuz-4.1.9-nrjQL-desktop-1omv
Found initrd image: /boot/initrd-4.1.9-nrjQL-desktop-1omv.img
Found linux image: /boot/vmlinuz-4.1.3-nrjQL-desktop-3omv
Found initrd image: /boot/initrd-4.1.3-nrjQL-desktop-3omv.img
Found linux image: /boot/vmlinuz-4.1.3-nrjQL-desktop-1omv
Found initrd image: /boot/initrd-4.1.3-nrjQL-desktop-1omv.img
Found linux image: /boot/vmlinuz-3.19.8-nrjQL-desktop-1omv
Found initrd image: /boot/initrd-3.19.8-nrjQL-desktop-1omv.img
Found linux image: /boot/vmlinuz-3.18.16-nrjQL-desktop-1omv
Found initrd image: /boot/initrd-3.18.16-nrjQL-desktop-1omv.img
No volume groups found
Found OpenMandriva Lx 2015.0 (2015.0) on /dev/sdc14
Found Os GNU/Linux (NAME=openSUSE) on /dev/sdc2
Found NAME="openSUSE Leap" on /dev/sdc4
done
Okay, what do I have to do to /etc/default/grub? Here is what it looks like on my Mint partition (that my computer is booting into):
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
This is what the /etc/default/grub file looks like in my OpenSUSE partition (that the computer is not currently using)
# Modified by YaST2. Last modification on Sat Nov 7 11:10:41 MST 2015
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# For the new kernel it try to figure out old parameters. In case we are not able to recognize it (e.g. change of flavor or strange install order ) it it use as fallback installation parameters from /etc/sysconfig/bootloader
# If you change this file, run 'grub2-mkconfig -o /boot/grub2/grub.cfg' afterwards to update
# /boot/grub2/grub.cfg.
GRUB_DISTRIBUTOR=""
GRUB_DEFAULT=saved
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=8
GRUB_CMDLINE_LINUX_DEFAULT="resume=/dev/disk/by-uuid/23ca735b-26b0-437b-a1ab-63f117cc7b23 splash=silent quiet showopts"
# kernel command line options for failsafe mode
GRUB_CMDLINE_LINUX_RECOVERY=single
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM=0x01234567,0xfefefefe,0x89abcdef,0xefefefef
# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=gfxterm
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
# Skip 30_os-prober if you experienced very slow in probing them
# WARNING foregin OS menu entries will be lost if set true here
GRUB_DISABLE_OS_PROBER=false
# Set to 'y' for grub to be installed on an encrypted partition
GRUB_ENABLE_CRYPTODISK=n
SUSE_BTRFS_SNAPSHOT_BOOTING=true
GRUB_BACKGROUND=/boot/grub2/themes/openSUSE/background.png
GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt
You shouldn’t need to edit ‘/etc/default/grub’ if all you want is to boot in to installed operating systems. My best guess is first to run ‘grub2-mkconfig -o /boot/grub2/grub.cfg’ in your mint partition. If that doesn’t give you a bootable openSUSE entry then I’d run ‘efibootmgr’. the line ‘BootOrder’ lists available choices with the 1st one in the list being the one it’s using. If there is an entry for ‘opensuse’ you can change the boot order (# efibootmgr -o) to use that. This example shows me changing my boot order from using OpenMandriva Lx 3 Beta to using openSUSE:
# efibootmgr
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0002,0000,0001,0004,0005,0003,0007,0008
Boot0000* openmandriva
Boot0001* opensuse
Boot0002* grub
Boot0003* UEFI:CD/DVD Drive
Boot0004* Hard Drive
Boot0005* CD/DVD Drive
Boot0007* UEFI:Removable Device
Boot0008* UEFI:Network Device
linux-x4xg:~ # efibootmgr -o 0001,0000,0002,0004,0005,0003,0007,0008
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0001,0000,0002,0004,0005,0003,0007,0008
Boot0000* openmandriva
Boot0001* opensuse
Boot0002* grub
Boot0003* UEFI:CD/DVD Drive
Boot0004* Hard Drive
Boot0005* CD/DVD Drive
Boot0007* UEFI:Removable Device
Boot0008* UEFI:Network Device
IF none of that works you can use the Super Grub2 disk to rescue your openSUSE boot loader. Just follow the instructions:
http://www.supergrubdisk.org/
Hope this helps.
On Mint, that should be
grub-mkconfig -o /boot/grub2/grub.cfg
That is, “grub” rather than “grub2”. And you probably need to run that with “sudo”.