Fedora Linux Support Community & Resources Center
  #1  
Old 6th December 2011, 07:39 PM
nicofo Offline
Registered User
 
Join Date: Nov 2005
Posts: 132
linuxfirefox
grub2 with KDM: reboot on another system

Hello,
with Fedora 16 comes grub2 and its integration with KDM: normally, it is possible to chose another system to restart with from KDM, like this:

However for me it doesn't work, although I have informed KDM so (System Settings > Login Screen > Shutdown > Boot manager) and modified /etc/default/grub as indicated http://ksmanis.wordpress.com/2011/04...pport-for-kdm/

Is it working with you ?
Any idea ?
__________________
Install XGL on Fedora, easily: Automatic Installation of XGL
NEW - propose to install compiz-fusion as well !
Reply With Quote
  #2  
Old 9th December 2011, 08:55 PM
nicofo Offline
Registered User
 
Join Date: Nov 2005
Posts: 132
linuxfirefox
Re: grub2 with KDM: reboot on another system

Is kdm working with grub2 with you ?
__________________
Install XGL on Fedora, easily: Automatic Installation of XGL
NEW - propose to install compiz-fusion as well !
Reply With Quote
  #3  
Old 9th December 2011, 09:05 PM
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 7,320
linuxfirefox
Re: grub2 with KDM: reboot on another system

I haven't tried using the grub2/KDM feature yet, but did you run grub2-mkconfig after you edited your /etc/default/grub file?

Code:
su -
(root password)

grub2-mkconfig -o /boot/grub2/grub.cfg
Reply With Quote
  #4  
Old 12th December 2011, 04:33 PM
nicofo Offline
Registered User
 
Join Date: Nov 2005
Posts: 132
linuxfirefox
Re: grub2 with KDM: reboot on another system

yes,I did that, but no effect
__________________
Install XGL on Fedora, easily: Automatic Installation of XGL
NEW - propose to install compiz-fusion as well !
Reply With Quote
  #5  
Old 13th December 2011, 04:10 AM
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 7,320
linuxfirefox
Re: grub2 with KDM: reboot on another system

They just had some updates that changed /etc/default/grub that might pertain to your issue here.

In particular, these 2 lines they added to the /etc/grub/default may be what you need:

Code:
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
You could try adding these 2 lines to your /etc/default/grub file, then run [b]grub2-mkconfig -o /boot/grub2/grub.cfg and see if that helps you out

They also added these lines as well, but wouldn't make any difference in your case:
Code:
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
# GRUB_TERMINAL="serial console"
# GRUB_SERIAL_COMMAND="serial --unit=0 --speed=9600"
Reply With Quote
  #6  
Old 16th December 2011, 07:47 PM
nicofo Offline
Registered User
 
Join Date: Nov 2005
Posts: 132
linuxfirefox
Re: grub2 with KDM: reboot on another system

Quote:
Originally Posted by DBelton View Post
They just had some updates that changed /etc/default/grub that might pertain to your issue here.

In particular, these 2 lines they added to the /etc/grub/default may be what you need:

Code:
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
You could try adding these 2 lines to your /etc/default/grub file, then run [b]grub2-mkconfig -o /boot/grub2/grub.cfg and see if that helps you out

They also added these lines as well, but wouldn't make any difference in your case:
Code:
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
# GRUB_TERMINAL="serial console"
# GRUB_SERIAL_COMMAND="serial --unit=0 --speed=9600"
Hi,
thanks for the suggestion.
I have tested with "GRUB_SAVEDEFAULT=true": it's working... BUT it is not what I want:
With this option, the system you choose in grub becomes the new default entry at the next startup.
It's the only purpose of it (see http://www.gnu.org/software/grub/manual/grub.html for instance).

Any other suggestion ?
__________________
Install XGL on Fedora, easily: Automatic Installation of XGL
NEW - propose to install compiz-fusion as well !
Reply With Quote
  #7  
Old 9th January 2012, 10:11 AM
marriedto51 Offline
Registered User
 
Join Date: Jul 2009
Location: England, UK
Posts: 910
linuxfirefox
Re: grub2 with KDM: reboot on another system

I think I have found the answer to this...

On most systems using grub2, the system commands are just named grub-mkconfig, grub-reboot, etc. On Fedora (presumably to distinguish from legacy grub) they are grub2-mkconfig, grub2-reboot etc.

The login manager expects to run grub-reboot, but we only have grub2-reboot, so a fix (for me at least) is to make a new symbolic link:
Code:
su -c 'ln -s grub2-reboot /sbin/grub-reboot'
Hope that helps.
Reply With Quote
  #8  
Old 18th January 2012, 08:22 PM
nicofo Offline
Registered User
 
Join Date: Nov 2005
Posts: 132
linuxfirefox
Re: grub2 with KDM: reboot on another system

Quote:
Originally Posted by marriedto51 View Post
I think I have found the answer to this...

On most systems using grub2, the system commands are just named grub-mkconfig, grub-reboot, etc. On Fedora (presumably to distinguish from legacy grub) they are grub2-mkconfig, grub2-reboot etc.

The login manager expects to run grub-reboot, but we only have grub2-reboot, so a fix (for me at least) is to make a new symbolic link:
Code:
su -c 'ln -s grub2-reboot /sbin/grub-reboot'
Hope that helps.
Hi,
unfortunately it doesn't work for me.
grub[2]-reboot is the only command you've symlinked ?
__________________
Install XGL on Fedora, easily: Automatic Installation of XGL
NEW - propose to install compiz-fusion as well !
Reply With Quote
  #9  
Old 19th January 2012, 09:16 AM
marriedto51 Offline
Registered User
 
Join Date: Jul 2009
Location: England, UK
Posts: 910
linuxfirefox
Re: grub2 with KDM: reboot on another system

I've had another look, and at some stage I think I must also have symlinked /boot/grub/grub.cfg to /boot/grub2/grub.cfg -- perhaps that has an impact?
Code:
su -c 'ln -s ../grub2/grub.cfg /boot/grub/grub.cfg'
Reply With Quote
  #10  
Old 19th January 2012, 07:47 PM
nicofo Offline
Registered User
 
Join Date: Nov 2005
Posts: 132
linuxfirefox
Re: grub2 with KDM: reboot on another system

Quote:
Originally Posted by marriedto51 View Post
I've had another look, and at some stage I think I must also have symlinked /boot/grub/grub.cfg to /boot/grub2/grub.cfg -- perhaps that has an impact?
Code:
su -c 'ln -s ../grub2/grub.cfg /boot/grub/grub.cfg'
unfortunately no, still not working... Any other symlink ? ;-)
__________________
Install XGL on Fedora, easily: Automatic Installation of XGL
NEW - propose to install compiz-fusion as well !
Reply With Quote
  #11  
Old 20th January 2012, 10:23 AM
marriedto51 Offline
Registered User
 
Join Date: Jul 2009
Location: England, UK
Posts: 910
linuxfirefox
Re: grub2 with KDM: reboot on another system

Well, I've just tested on a second F16 installation.

All I have created manually is the pair of symlinks
Code:
/sbin/grub-reboot -> grub2-reboot
/boot/grub/grub.cfg -> ../grub2/grub.cfg
My /etc/default/grub contains
Code:
GRUB_DEFAULT=saved
#GRUB_SAVEDEFAULT=true
so that /boot/grub2/grub.cfg contains the line
Code:
set default="${saved_entry}"
near the top, but the menuentry definitions do not contain "savedefault".

The only other thing I can think is that this machine has been rebooted at least once with the default grub config which I believe includes "GRUB_SAVEDEFAULT=true". That will have forced grub to write the saved entry to the grub environment as per the definition of the function savedefault in /boot/grub2/grub.cfg.

Perhaps you could try either: setting the GRUB_SAVEDEFAULT option, remaking /boot/grub2/grub.cfg, and rebooting, then removing GRUB_SAVEDEFAULT and remaking /boot/grub2/grub.cfg; or: manually invoking the grub commands
Code:
saved_entry="menu entry title"
save_env saved_entry
at the grub command prompt.
Reply With Quote
  #12  
Old 20th January 2012, 06:01 PM
fduraibi Offline
Registered User
 
Join Date: Jun 2008
Location: Saudi Arabia
Posts: 35
linuxfirefox
Re: grub2 with KDM: reboot on another system

thanks marriedto51

i just created those two symlinks and it works now, cool.

-- my setup is fresh installed F16 + grub2 + kde 4.7.4 (latest)
__________________
Fahad Alduraibi
http://fadvisor.net/
Reply With Quote
  #13  
Old 21st January 2012, 02:14 PM
nicofo Offline
Registered User
 
Join Date: Nov 2005
Posts: 132
linuxfirefox
Re: grub2 with KDM: reboot on another system

Thanks, this time it works (finally )
The problem was, as you mentioned, the option "GRUB_SAVEDEFAULT=true" which was activated in my /etc/default/grub
I have removed it, regenerated grub.cfg => I have the option to reboot instantly.

PS: do you think it's a bug ? I don't see why the option GRUB_SAVEDEFAULT is not compatible with the ability to reboot from KDE ?
__________________
Install XGL on Fedora, easily: Automatic Installation of XGL
NEW - propose to install compiz-fusion as well !
Reply With Quote
  #14  
Old 23rd January 2012, 04:09 PM
fduraibi Offline
Registered User
 
Join Date: Jun 2008
Location: Saudi Arabia
Posts: 35
linuxfirefox
Re: grub2 with KDM: reboot on another system

Quote:
Originally Posted by nicofo View Post
Thanks, this time it works (finally )
The problem was, as you mentioned, the option "GRUB_SAVEDEFAULT=true" which was activated in my /etc/default/grub
I have removed it, regenerated grub.cfg => I have the option to reboot instantly.

PS: do you think it's a bug ? I don't see why the option GRUB_SAVEDEFAULT is not compatible with the ability to reboot from KDE ?
I don't think it is a bug, since i still have the option "GRUB_SAVEDEFAULT=true" in my /etc/default/grub and the reboot menu works. Also i did the same to my home pc and got the reboot menu working. Both systems have that option.

But i think the bug is in the boot menu not recognizing and using grub2 instead of old grub
__________________
Fahad Alduraibi
http://fadvisor.net/
Reply With Quote
  #15  
Old 4th February 2012, 07:01 PM
nicofo Offline
Registered User
 
Join Date: Nov 2005
Posts: 132
linuxfirefox
Re: grub2 with KDM: reboot on another system

Quote:
Originally Posted by fduraibi View Post
I don't think it is a bug, since i still have the option "GRUB_SAVEDEFAULT=true" in my /etc/default/grub and the reboot menu works. Also i did the same to my home pc and got the reboot menu working. Both systems have that option.

But i think the bug is in the boot menu not recognizing and using grub2 instead of old grub
OK, you're right. The problem was not the option "GRUB_SAVEDEFAULT=true", but the fact that the line
set default="${saved_entry}"
is transformed to
set default=0
in /boot/grub2/grub.cfg although "GRUB_DEFAULT=saved" is in /etc/default/grub.
This happens after a kernel update... (I haven't noticed that in my previous post since I had regenerated /boot/grub2/grub.cfg)

So for me this is a second bug.
__________________
Install XGL on Fedora, easily: Automatic Installation of XGL
NEW - propose to install compiz-fusion as well !
Reply With Quote
Reply

Tags
grub2, kdm, reboot

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I have to reboot system before Write DVD mfaridi Using Fedora 3 10th May 2010 01:49 PM
System Lock up Can't reboot - what now? hnt Servers & Networking 3 6th February 2007 06:28 AM
spca5xx and system reboot scorpio2002 Hardware & Laptops 0 26th May 2006 07:34 AM
Fedora When Reboot System abu skndr Using Fedora 4 5th March 2005 01:15 PM
System doesn't reboot mlalkm Using Fedora 1 4th January 2005 11:04 AM


Current GMT-time: 05:58 (Saturday, 20-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat