 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

6th December 2011, 07:39 PM
|
 |
Registered User
|
|
Join Date: Nov 2005
Posts: 132

|
|
|
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 ?
|

9th December 2011, 08:55 PM
|
 |
Registered User
|
|
Join Date: Nov 2005
Posts: 132

|
|
|
Re: grub2 with KDM: reboot on another system
Is kdm working with grub2 with you ?
|

9th December 2011, 09:05 PM
|
 |
Administrator
|
|
Join Date: Aug 2009
Posts: 6,612

|
|
|
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
|

12th December 2011, 04:33 PM
|
 |
Registered User
|
|
Join Date: Nov 2005
Posts: 132

|
|
|
Re: grub2 with KDM: reboot on another system
yes,I did that, but no effect
|

13th December 2011, 04:10 AM
|
 |
Administrator
|
|
Join Date: Aug 2009
Posts: 6,612

|
|
|
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"
|

16th December 2011, 07:47 PM
|
 |
Registered User
|
|
Join Date: Nov 2005
Posts: 132

|
|
|
Re: grub2 with KDM: reboot on another system
Quote:
Originally Posted by DBelton
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 ?
|

9th January 2012, 10:11 AM
|
|
Registered User
|
|
Join Date: Jul 2009
Location: England, UK
Posts: 821

|
|
|
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.
|

18th January 2012, 08:22 PM
|
 |
Registered User
|
|
Join Date: Nov 2005
Posts: 132

|
|
|
Re: grub2 with KDM: reboot on another system
Quote:
Originally Posted by marriedto51
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 ?
|

19th January 2012, 09:16 AM
|
|
Registered User
|
|
Join Date: Jul 2009
Location: England, UK
Posts: 821

|
|
|
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'
|

19th January 2012, 07:47 PM
|
 |
Registered User
|
|
Join Date: Nov 2005
Posts: 132

|
|
|
Re: grub2 with KDM: reboot on another system
Quote:
Originally Posted by marriedto51
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 ? ;-)
|

20th January 2012, 10:23 AM
|
|
Registered User
|
|
Join Date: Jul 2009
Location: England, UK
Posts: 821

|
|
|
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.
|

20th January 2012, 06:01 PM
|
 |
Registered User
|
|
Join Date: Jun 2008
Location: Saudi Arabia
Posts: 23

|
|
|
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)
|

21st January 2012, 02:14 PM
|
 |
Registered User
|
|
Join Date: Nov 2005
Posts: 132

|
|
|
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 ?
|

23rd January 2012, 04:09 PM
|
 |
Registered User
|
|
Join Date: Jun 2008
Location: Saudi Arabia
Posts: 23

|
|
|
Re: grub2 with KDM: reboot on another system
Quote:
Originally Posted by nicofo
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
|

4th February 2012, 07:01 PM
|
 |
Registered User
|
|
Join Date: Nov 2005
Posts: 132

|
|
|
Re: grub2 with KDM: reboot on another system
Quote:
Originally Posted by fduraibi
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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 18:10 (Thursday, 23-05-2013)
|
|
 |
 |
 |
 |
|
|