0

I've installed grub2 because my partition is no longer supported by the legacy grub but I can't make it display a text menu like in the legacy grub? When I start my pc it gives me the CLI where I need to manually load my configfile? Hence my config file is good but how I can start it automatically with grub2? My OS is openSUSE and I use grub2-mkconfig --output=/boot/grub2/grub.conf to create my config file. Then I use grub2-install /dev/sda2 to install grub2. I've also edited /etc/default/grub to display the menu and commented hideoutmenu line. Please help because this is very anoying bug? Thank you very much!

Update: Please read the question I've openSUSE and Linux is a bit weird. I already tried grub2-mkconfig -o /boot/grub2/grub.conf. I also tried it with grub.cfg. There isn't grub-mkconfig only grub2-mkconfig. There isn't also update-grub (or update2-grub). This is a script that doesn't exist in openSUSE!!?!

Update 2: Maybe it's a video card problem? Windows Os is recognized from my grub2-mkconfig: http://ubuntuforums.org/showthread.php?t=1485072&page=3

Update 3: I also get this error message when I use --force:

/usr/sbin/grub2-bios-setup: Warnung: Dateisystem »ext2« unterstützt keine   
Einbettungen.
/usr/sbin/grub2-bios-setup: Warnung: Einbettung ist nicht möglich. GRUB  
kann in dieser Konfiguration nur mittels Blocklisten installiert werden. 
Blocklisten sind allerdings UNZUVERLÄSSIG und deren Verwendung wird daher 
nicht empfohlen..
installation beendet. Keine Fehler aufgetreten.

Update 4:

  grub2-mkconfig --output=/boot/grub2/grub.cfg
  grub.cfg wird erstellt …
  Linux-Abbild gefunden: /boot/vmlinuz-3.4.4-1.1-desktop
  initrd-Abbild gefunden: /boot/initrd-3.4.4-1.1-desktop
     No volume groups found
  Windows 7 (loader) auf /dev/sdc1 gefunden
  erledigt

Update 5: As requested I use /dev/sda instead of /dev/sda2 and it works better, I don't need --force command.

   grub2-install --boot-directory=/boot/grub2 /dev/sda
   installation beendet. Keine Fehler aufgetreten.

But in this README there is the script update-grub2: https://build.opensuse.org/package/view_file?file=README.openSUSE&package=grub2&project=openSUSE%3AFactory&rev=c3401e0f5ec23451c03caa9b77fa0d99

But I don't have it?

Update 6:

# If you change this file, run 'grub2-mkconfig -o /boot/grub2/grub.cfg'     
afterwards to update 
# /boot/grub2/grub.cfg.
GRUB_DISTRIBUTOR="openSUSE"

GRUB_DEFAULT=2
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=5
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash=silent"
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=800x600

# 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_LINUX_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
GRUB_BACKGROUND=/boot/grub2/themes/openSUSE/background.png
GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt

Update 7: My file grub-mkconfig_lib is also in /usr/share/grub2 and not in /usr/lib/grub: http://forums.opensuse.org/english/get-technical-help-here/pre-release-beta/476722-grub2-broken-12-2-rc1.html?

Update and Fix:

  1. Error: In my grub config file this line GRUB_HIDDEN_TIMEOUT_QUIET=true change to GRUB_HIDDEN_TIMEOUT_QUIET=false and comment this line #GRUB_HIDDEN_TIMEOUT=0.
  2. Error: It only works from /boot and NOT from /boot/grub2 although /boot/grub2 is the default path everywhere. Strange. Maybe it's because I'm using AHCI???
3
  • the filename is grub.cfg not grub.conf Jul 24, 2012 at 1:30
  • Have you run update-grub after modifying /etc/default/grub?
    – lxop
    Jul 24, 2012 at 1:53
  • have you tried to read the generated file before using grub2-install ?, you can still read it though it is not recommended to change it.
    – Hanan
    Jul 24, 2012 at 20:00

3 Answers 3

2

since you are not using the default /boot/grub directory, you need to tell grub to use /boot/grub2:

grub-install --boot-directory=/boot/grub2 /dev/sda2
11
  • Unfortunatel that doesn't work either.
    – Micromega
    Jul 26, 2012 at 10:58
  • what is the error message? Jul 26, 2012 at 11:46
  • See my update 3. I need --force parameter to write grub-install but no matter what it gives me the cli at boot.
    – Micromega
    Jul 26, 2012 at 12:06
  • did you try installing grub to /dev/sda and not to /dev/sda1? you probably already have grub in /dev/sda and you're not overwriting that, and it doesn't know which partition to load more data from. Jul 26, 2012 at 12:15
  • how can this work? sda1 is my swap sda2 my root sda3 my home partition. where is would grub write to sda? does it work? I don't want to skrew my disk?
    – Micromega
    Jul 26, 2012 at 12:26
0

You need to create the grub.cfg file using this command:

grub-mkconfig -o /boot/grub/grub.cfg

It takes the various grub conf files from /etc/grub.d/ and /etc/default/grub, etc to create the grub.cfg file.

The Arch Wiki article on Grub explains this process thoroughly. Though it was written for Arch, I am sure you can adapt it for your system quite easily.

1
  • I've tried grub.cfg and grub.conf to no avail.
    – Micromega
    Jul 24, 2012 at 8:33
0

I made exactly the same mistake. The configuration file is grub.cfg, not grub.conf !

SUSE/OpenSUSE/RHEL/CentOS:

grub2-mkconfig --output=/boot/grub2/grub.cfg 

Debian/Ubuntu

grub2-mkconfig --output=/boot/grub/grub.cfg

Location of grub.cfg?

Different distributions use different locatation for grub.cfg. Ubuntu use /boot/grub/grub.cfg (doc), RHEL/CentOS 7 use /boot/grub2/grub.cfg on BIOS systems (doc), and so does SUSE/OpenSUSE (doc).

1
  • I know this is old but I thought I'd add that Debian/Ubuntu actually has a script to run grub2-mkconfig with the proper output. You just need to run update-grub. Feb 8, 2022 at 21:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .