Difference between pages "Nx" and "Grub2"

From Linuxintro
(Difference between pages)
(Yskz9OhLZ)
 
imported>ThorstenStaerk
 
Line 1: Line 1:
Wow, this is fantasticVery heuflpl for the busy parent on the go, needing quick and easy recipes with what is currently in the frig.Anyone have any suggestions for the best three food combination? I entered chicken, rice and mushroom and found many great ideas.Congratulations on your success and thank you for the heuflpl recipe search engine!
+
To configure the GRUB2 bootloader on SUSE Linux, use the file /etc/grub2/grub.cfg. I can be generated by the command
 +
grub2-mkconfig -o /boot/grub2/grub.cfg
 +
from /etc/default/grub and the files in /etc/default/grub
 +
 
 +
/etc/grub.d/*____
 +
                  \
 +
                    --- (grub2-mkconfig -o /boot/grub2/grub.cfg --->  /etc/grub2/grub.cfg
 +
                  /
 +
/etc/default/grub
 +
 
 +
 
 +
The best way to add a menu item to your grub2 boot menu is to add the command menuentry to the end of /etc/grub.d/40_custom like this:
 +
* change /etc/grub.d/40_custom to look like:
 +
<pre>
 +
#!/bin/sh
 +
exec tail -n +3 $0
 +
# This file provides an easy way to add custom menu entries.  Simply type the
 +
# menu entries you want to add after this comment. Be careful not to change
 +
# the 'exec tail' line above.
 +
 
 +
menuentry linuxintro{
 +
}
 +
</pre>
 +
* call grub2-mkconfig:
 +
<pre>
 +
# grub2-mkconfig -o /boot/grub2/grub.cfg
 +
Generating grub.cfg ...
 +
Found theme: /boot/grub2/themes/openSUSE/theme.txt
 +
Found linux image: /boot/vmlinuz-3.7.10-1.40-desktop
 +
Found initrd image: /boot/initrd-3.7.10-1.40-desktop
 +
Found linux image: /boot/vmlinuz-3.7.10-1.16-desktop
 +
Found initrd image: /boot/initrd-3.7.10-1.16-desktop
 +
  No volume groups found
 +
error: syntax error.
 +
</pre>
 +
* woops ;) Add a volume to the configuration in /etc/grub.d/40_custom:
 +
<pre>
 +
#!/bin/sh
 +
exec tail -n +3 $0
 +
# This file provides an easy way to add custom menu entries.  Simply type the
 +
# menu entries you want to add after this comment. Be careful not to change
 +
# the 'exec tail' line above.
 +
 
 +
menuentry linuxintro{
 +
  set hd=(hd0,0)
 +
}
 +
</pre>
 +
* and run mkconfig again:
 +
# grub2-mkconfig -o /boot/grub2/grub.cfg

Revision as of 13:59, 18 January 2016

To configure the GRUB2 bootloader on SUSE Linux, use the file /etc/grub2/grub.cfg. I can be generated by the command

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

from /etc/default/grub and the files in /etc/default/grub

/etc/grub.d/*____
                 \
                   --- (grub2-mkconfig -o /boot/grub2/grub.cfg --->  /etc/grub2/grub.cfg
                 /
/etc/default/grub


The best way to add a menu item to your grub2 boot menu is to add the command menuentry to the end of /etc/grub.d/40_custom like this:

  • change /etc/grub.d/40_custom to look like:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry linuxintro{
}
  • call grub2-mkconfig:
# grub2-mkconfig -o /boot/grub2/grub.cfg 
Generating grub.cfg ...
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found linux image: /boot/vmlinuz-3.7.10-1.40-desktop
Found initrd image: /boot/initrd-3.7.10-1.40-desktop
Found linux image: /boot/vmlinuz-3.7.10-1.16-desktop
Found initrd image: /boot/initrd-3.7.10-1.16-desktop
  No volume groups found
error: syntax error.
  • woops ;) Add a volume to the configuration in /etc/grub.d/40_custom:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry linuxintro{
  set hd=(hd0,0)
}
  • and run mkconfig again:
# grub2-mkconfig -o /boot/grub2/grub.cfg