LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-15-2015, 12:07 PM   #1
mikenash
Member
 
Registered: Dec 2014
Posts: 84

Rep: Reputation: Disabled
grub-mkconfig menu changes


I want to change the menu on a Suse 12 Enterprise system.
I edit the /etc/default zip12grub.conf file execure grug2-mkconfig. Then reboot the system and no changes occur. The zip12grub.conf seems like the correct file to update so I am at a loss as to what the correct process would be.

cat zipl2grub.conf
## This is the template for '@zipldir@/config' and is subject to
## rpm's %config file handling in case of grub2-s390x-emu package update.

[defaultboot]
defaultmenu = menu

[grub2]
target = @zipldir@
ramdisk = @zipldir@/initrd,0x2000000
image = @zipldir@/image
parameters = "root=@GRUB_DEVICE@ @GRUB_EMU_CONMODE@ @GRUB_CMDLINE_LINUX@ @GRUB_CMDLINE_LINUX_DEFAULT@ initgrub quiet splash=silent "

[skip-grub2]
target = @zipldir@
ramdisk = @zipldir@/initrd,0x2000000
image = @zipldir@/image
parameters = "root=@GRUB_DEVICE@ @GRUB_CONMODE@ @GRUB_CMDLINE_LINUX@ @GRUB_CMDLINE_LINUX_DEFAULT@ "

[test-grub2]
target = @zipldir@
ramdisk = @zipldir@/initrd,0x2000000
image = @zipldir@/image
parameters = "root=@GRUB_DEVICE@ @GRUB_CONMODE@ @GRUB_CMDLINE_LINUX@ @GRUB_CMDLINE_LINUX_DEFAULT@ "

:menu
target = @zipldir@
timeout = 16
default = 1
prompt = 1
1 = grub2
2 = skip-grub2
3 = test menu grub2

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

Generating grub configuration file ...
Found linux image: /boot/image-3.12.39-47-default
Found initrd image: /boot/initrd-3.12.39-47-default
Found linux image: /boot/image-3.12.28-4-default
Found initrd image: /boot/initrd-3.12.28-4-default
done

reboot

Storage cleared - system reset.
zIPL v1.24.1-38.17 interactive boot menu

0. default (grub2)

1. grub2
2. skip-grub2

Note: VM users please use '#cp vi vmsg <input> <kernel-parameters>'

Please choose (default will boot in 16 seconds):
Booting default (grub2)
 
Old 04-17-2015, 12:14 AM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Hi:

Quote:
I want to change the menu on a Suse 12 Enterprise system.
What is it that you want to change? (be good if you could give more details)

Have you tried running update-grub as root?

Here's the way to edit your Grub depending on if your using KDE or Gnome.
https://forums.opensuse.org/showthre...indows-entries

https://en.opensuse.org/GRUB

Hope those links help.
 
Old 04-17-2015, 08:29 AM   #3
mikenash
Member
 
Registered: Dec 2014
Posts: 84

Original Poster
Rep: Reputation: Disabled
grub2-mkconfig

Thank you for you reply.
The menu item Iwant to change is as follows:
[test-grub2]
target = @zipldir@
ramdisk = @zipldir@/initrd,0x2000000
image = @zipldir@/image
parameters = "root=@GRUB_DEVICE@ @GRUB_CONMODE@ @GRUB_CMDLINE_LINUX@ @GRUB_CMDLINE_LINUX_DEFAULT@ "
3 = test menu grub2

I did not obtain a third menu item.

I tried these commands update-grub, update-grub2, grub-update, or grub2-update do not appear to exist. I did not find any reference to grub update commands in the Suse Administration Guide. It states to use grub2-mkconfig to update the main configuration file.
 
Old 04-17-2015, 04:25 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
https://activedoc.opensuse.org/book/...t-loader-grub2

Hope this help.

I get the feeling that you might do some of that from yast2 maybe. Not sure on that.
 
Old 04-17-2015, 04:31 PM   #5
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Do you have a /etc/grub.cfg file?

I think you have to launch Yast and than edit what you want.
Look here-
http://unsolicitedbutoffered.blogspo...boot-menu.html

Do you have Grub (Legacy) or Grub2? From what I understand Grub2 is not installed by default.
https://forums.opensuse.org/showthre...tion-Suse-12-1

https://tr.opensuse.org/SDB:The_Boot_Manager_Grub



Hopefully another member that's running Open Suse will see this thread and chime in.
 
Old 04-17-2015, 04:33 PM   #6
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Thank You for joining the thread: jefro-
 
Old 04-17-2015, 08:11 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
Perhaps the OP had better be more forthcoming.
That looks like the grub2 replacement for zipl - that means zLinux on system z hardware. I haven't had the opportunity to look into that, so if that is the case, I see 2 options:
i) talk to Suse for some decent doco (post a link if you get one pls)
ii) go back to zipl

Edit: looks like Suse have done their normal trick, and more or less forced yast on you.

Last edited by syg00; 04-17-2015 at 08:47 PM.
 
Old 04-20-2015, 11:03 AM   #8
mikenash
Member
 
Registered: Dec 2014
Posts: 84

Original Poster
Rep: Reputation: Disabled
Progress mkconfig - grub2-zipl-setup

I made some progrees using mkconfig and grub2-zipl-setup. I have not found any documentation for grub2-zipl-setup but it appears to help.
My plan is to first update grub to include a new boot selection using address 15c1. I can boot off 15c1 and I now have a menu option. However, it will still attempt to use ccw-0.0.15c0-part3. I review the results in file /boot/zipl/config/after executing grub2-zipl-setup. It shows root=/dev/disk/by-path/ccw-0.0.15c0-part3 and not root=/dev/disk/by-path/ccw-0.0.15c1-part3.

Modifing /etc/default/zipl2grub.conf.in and /etc/default/grub provides a new menu selection but does not change the root= to device 15c1.
tried updating parameters= to include root=/dev/disk/by-path/ccw-0.0.15c1-part3 but only appends this information to parameters=.

The problem I am having is how does the root= get updated so I can change it to /dev/disk/by-path/ccw-0.0.15c1-part3!
I looked at grub2-install and tried grub2-install 15c1 and this did not work.

Modify /etc/default/zipl2grub.conf.in
[Test-15c1]
target = @zipldir@
ramdisk = @zipldir@/initrd,0x2000000
image = @zipldir@/image
parameters = "root=@GRUB_DEVICE@ @GRUB_EMU_CONMODE@ @GRUB_CMDLINE_LINUX@ @GRUB_CMDLINE_LINUX_TEST@ initgrub quiet splash=silent "

Modify /etc/default/grub
GRUB_CMDLINE_LINUX_TEST=" hvc_iucv=8 TERM=dumb resume=/dev/disk/by-path/ccw-0.0.15c1-part2 crashkernel=204M-:102M cio_ignore=all,!ipldev,!condev"

Results:
parameters = "root=/dev/disk/by-path/ccw-0.0.15c0-part3 hvc_iucv=8 TERM=dumb resume=/dev/disk/by-path/ccw-0.0.15c1-part2 crashkernel=204M-:102M cio_ignore=all,!ipldev,!condev initgrub quiet splash=silent "

Listings:
cat zipl2grub.conf.in
## This is the template for '@zipldir@/config' and is subject to
## rpm's %config file handling in case of grub2-s390x-emu package update.

[defaultboot]
defaultmenu = menu

[grub2]
target = @zipldir@
ramdisk = @zipldir@/initrd,0x2000000
image = @zipldir@/image
parameters = "root=@GRUB_DEVICE@ @GRUB_EMU_CONMODE@ @GRUB_CMDLINE_LINUX@ @GRUB_CMDLINE_LINUX_DEFAULT@ initgrub quiet splash=silent "

[skip-grub2]
target = @zipldir@
ramdisk = @zipldir@/initrd,0x2000000
image = @zipldir@/image
parameters = "root=@GRUB_DEVICE@ @GRUB_CONMODE@ @GRUB_CMDLINE_LINUX@ @GRUB_CMDLINE_LINUX_DEFAULT@ "
[Test-15c1]
target = @zipldir@
ramdisk = @zipldir@/initrd,0x2000000
image = @zipldir@/image
parameters = "root=@GRUB_DEVICE@ @GRUB_EMU_CONMODE@ @GRUB_CMDLINE_LINUX@ @GRUB_CMDLINE_LINUX_TEST@ initgrub quiet splash=silent "

:menu
target = @zipldir@
timeout = 16
default = 1
prompt = 1
1 = grub2
2 = skip-grub2
3 = Test-15c1


cat grub
# Modified by YaST2. Last modification on Fri Jan 23 15:29:43 EST 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=SLES12
GRUB_DEFAULT=saved
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=8
GRUB_CMDLINE_LINUX_DEFAULT=" hvc_iucv=8 TERM=dumb resume=/dev/disk/by-path/ccw-0.0.15c0-part2 crashkernel=204M-:102M cio_ignore=all,!ipldev,!condev"
# kernel command line options for failsafe mode
GRUB_CMDLINE_LINUX_RECOVERY="hvc_iucv=8 TERM=dumb noresume x11failsafe crashkernel=204M-:102M"
GRUB_CMDLINE_LINUX_TEST=" hvc_iucv=8 TERM=dumb resume=/dev/disk/by-path/ccw-0.0.15c1-part2 crashkernel=204M-:102M cio_ignore=all,!ipldev,!condev"
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=auto
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux -- > Also tried with this option enabled!
#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"
# 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=true
# Set to 'y' for grub to be installed on an encrypted partition
GRUB_ENABLE_CRYPTODISK=n
SUSE_BTRFS_SNAPSHOT_BOOTING=true
GRUB_CMDLINE_XEN_DEFAULT="crashkernel=204M-:102M"

Results:
cat config
## This file was written by 'grub2-install/grub2-zipl-setup'
## filling '/etc/default/zipl2grub.conf.in' as template
## with values from '/etc/default/grub'.
## In-place modifications will eventually go missing!

[defaultboot]
defaultmenu = menu

[grub2]
target = /boot/zipl
ramdisk = /boot/zipl/initrd,0x2000000
image = /boot/zipl/image
parameters = "root=/dev/disk/by-path/ccw-0.0.15c0-part3 hvc_iucv=8 TERM=dumb resume=/dev/disk/by-path/ccw-0.0.15c0-part2 crashkernel=204M-:102M cio_ignore=all,!ipldev,!condev initgrub quiet splash=silent "

[skip-grub2]
target = /boot/zipl
ramdisk = /boot/zipl/initrd,0x2000000
image = /boot/zipl/image
parameters = "root=/dev/disk/by-path/ccw-0.0.15c0-part3 hvc_iucv=8 TERM=dumb resume=/dev/disk/by-path/ccw-0.0.15c0-part2 crashkernel=204M-:102M cio_ignore=all,!ipldev,!condev "
[Test-15c1]
target = /boot/zipl
ramdisk = /boot/zipl/initrd,0x2000000
image = /boot/zipl/image
parameters = "root=/dev/disk/by-path/ccw-0.0.15c0-part3 hvc_iucv=8 TERM=dumb resume=/dev/disk/by-path/ccw-0.0.15c1-part2 crashkernel=204M-:102M cio_ignore=all,!ipldev,!condev initgrub quiet splash=silent "

:menu
target = /boot/zipl
timeout = 16
default = 1
prompt = 1
1 = grub2
2 = skip-grub2
3 = Test-15c1
 
Old 04-21-2015, 02:03 PM   #9
mikenash
Member
 
Registered: Dec 2014
Posts: 84

Original Poster
Rep: Reputation: Disabled
I think I got things working but not seemless. I update /etc/fstab to use the new changed device address. Executed grub2-zipl-setup, grub2-mkconfig -o /boot/grub2/grub.cfg and finally mkinitrd. Not sure why mkinitrd was needed because I would have expected grub2-mkconfig to do this. To use the original address I update /etc/fstab and execute the three commands and performed earlier.
 
Old 04-21-2015, 08:12 PM   #10
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Glad to hear you got it working.

Is your Menu now right in OpenSuse?
 
Old 04-22-2015, 10:23 AM   #11
mikenash
Member
 
Registered: Dec 2014
Posts: 84

Original Poster
Rep: Reputation: Disabled
Summary grub-mkconfig menu changes

I thank everyone for their replys.
My stategy was to first create process with a new menu item with the changed IPL address. Then create the process just to update the address of the IPL volume. I was able to do this but I believe I have uncovered a couple of defects.

The change with the menu process involved changing the /etc/default/zipl2grub.conf.in, /etc/fstab, and
/etc/default/grub files. Update the bootloader and execute the grub2-zipl-setup, grub2-mkconfig and
mkinitrd commands.

The ipl address change process was much simpler. Update /etc/fstab and the bootloader then execute
the grub2-zipl-setup, grub2-mkconfig and mkinitrd commands.

The first defect is documentation for the command grub2-zipl-setup. I could not find any reference to
grub2-zipl-setup documentation. There is no zipl.conf file and this command is the replacement for the
zipl command on Suse 12. It needs to be documented.

The second is the command grub2-mkconfig. does not work as I expect it to work After using this
command I am still unable to successfully ipl a system using the grub2 menu. I am forced to bypass
this menu to successfully ipl. I can successfully ipl a system using the grub2 menu after I execute the
mkinitrd command. I believe the grub2-mkconfig command is a replacement on Suse 12 for the
mkinitrd command and should not be required on Suse 12.

I could have mis-interpreted this ipl address change process so I would greatly appreciate all reviews,
questions, and opinions on this matter.
 
Old 04-22-2015, 11:16 PM   #12
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Do you think that something may have went wrong while running 'grub2-mkconfig' and may have left you with a corrupt config file?

I looked and couldn't find any documentation on grub2-zipl setup either.

The mkinitrd cmd creates initial ramdisk images for the preloaded modules.
The grub2-mkconfig cmd should create a new configuration based on the currently running system
(what's found in/boot)

You may be right that grub2-mkconfig is the replacement for the other (mkinitrd).

The dracut world is/has taken the place of mkinitrd to generate new initrd/initramfs files for boot; this is tangentially connected to grub due to 2 new features, hostonly and dracut_rescue_image.
http://initrd.org/wiki/Grub_2_Tips_%26_Tricks
 
Old 04-23-2015, 08:48 AM   #13
mikenash
Member
 
Registered: Dec 2014
Posts: 84

Original Poster
Rep: Reputation: Disabled
grub-mkconfig menu changes

Not sure if the /boot/grub2/grub.cfg or /boot/zipl/config files were corrupted. They appeared to be what I expected. I am able to replace the entire system back to the initial setup so if there is corruption it is from one of the commands and not from prior attempts to find a process. So I strongly suspect that grub2-mkconfig is not doing everything it needs to do. Thank you to everyone who replied.
 
Old 04-23-2015, 04:49 PM   #14
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by mikenash View Post
Not sure if the /boot/grub2/grub.cfg or /boot/zipl/config files were corrupted. They appeared to be what I expected. I am able to replace the entire system back to the initial setup so if there is corruption it is from one of the commands and not from prior attempts to find a process. So I strongly suspect that grub2-mkconfig is not doing everything it needs to do. Thank you to everyone who replied.
Grub2-mkconfig can take a long time maybe that's the issue.
At least it did in this thread.
https://forums.opensuse.org/showthre...-mkconfig-take

Always glad to help; you are Welcome mikenash:-
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grub-mkconfig sees both installed oses (deb & mint), but lists both as deb part. slacker_ Linux - General 14 06-22-2014 05:07 AM
unrecognized initrd file with grub-mkconfig (Arch linux). hen770 Linux - General 2 09-06-2011 02:30 PM
[SOLVED] Grub : Lost my windows partition, can't find menu.lst in /boot/grub.Someone can help? lucid_dino Ubuntu 9 11-01-2010 01:51 PM
[SOLVED] lost grub menu after windows installation & forgot to backup menu.lst jesman1 Linux - Kernel 4 08-12-2010 11:57 PM
Grub Menu doesn't reflect menu.lst file fatsheep Linux - Software 4 06-11-2007 01:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration