Difference between pages "Nx" and "Grub2"

From Linuxintro
(Difference between pages)
(WwWqMIJ7)
 
imported>ThorstenStaerk
 
Line 1: Line 1:
I must express my appcoriatien to this writer for bailing me out of this situation. As a result of browsing throughout the online world and meeting tips that were not helpful, I believed my life was well over. Living without the approaches to the issues you have resolved through the review is a critical case, as well as the ones which may have in a wrong way affected my entire career if I hadn't encountered your web blog. The training and kindness in touching a lot of stuff was tremendous. I am not sure what I would've done if I hadn't come upon such a subject like this. I am able to at this point relish my future. Thanks a lot so much for your reliable and amazing help. I will not be reluctant to recommend your web sites to anyone who ought to have tips about this matter.
+
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