FedoraForum.org - Fedora Support Forums and Community
Results 1 to 15 of 15
  1. #1
    Join Date
    Nov 2005
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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 !

  2. #2
    Join Date
    Nov 2005
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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 !

  3. #3
    Join Date
    Aug 2009
    Posts
    11,390
    Mentioned
    98 Post(s)
    Tagged
    0 Thread(s)

    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

  4. #4
    Join Date
    Nov 2005
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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 !

  5. #5
    Join Date
    Aug 2009
    Posts
    11,390
    Mentioned
    98 Post(s)
    Tagged
    0 Thread(s)

    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"

  6. #6
    Join Date
    Nov 2005
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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 ?
    Install XGL on Fedora, easily: Automatic Installation of XGL
    NEW - propose to install compiz-fusion as well !

  7. #7
    Join Date
    Jul 2009
    Location
    England, UK
    Posts
    969
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

  8. #8
    Join Date
    Nov 2005
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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 ?
    Install XGL on Fedora, easily: Automatic Installation of XGL
    NEW - propose to install compiz-fusion as well !

  9. #9
    Join Date
    Jul 2009
    Location
    England, UK
    Posts
    969
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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'

  10. #10
    Join Date
    Nov 2005
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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 ? ;-)
    Install XGL on Fedora, easily: Automatic Installation of XGL
    NEW - propose to install compiz-fusion as well !

  11. #11
    Join Date
    Jul 2009
    Location
    England, UK
    Posts
    969
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

  12. #12
    Join Date
    Jun 2008
    Location
    Saudi Arabia
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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/

  13. #13
    Join Date
    Nov 2005
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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 !

  14. #14
    Join Date
    Jun 2008
    Location
    Saudi Arabia
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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
    Fahad Alduraibi
    http://fadvisor.net/

  15. #15
    Join Date
    Nov 2005
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.
    Install XGL on Fedora, easily: Automatic Installation of XGL
    NEW - propose to install compiz-fusion as well !

Similar Threads

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •