Re: [SLE] reboot

From: Mark A. Taff (marktaff_at_comcast.net)
Date: 09/17/05

  • Next message: Serge Naggar: "[SLE] kde3.4; suse9.1pro, & xorg.x11"
    To: suse-linux-e@suse.com
    Date: Sat, 17 Sep 2005 14:38:54 -0700
    
    

    On Thursday 15 September 2005 23:56, John D Lamb wrote:
    > 9.3 has a long-click reboot that lets you choose what grub boots.
    >
    > Is there a script for this?
    > I'd like to can remote reboot between SuSE and XP on one box.
    >
    > --
    > JDL

    I would investigate using a dcop call to ksmserver. Get kdcop, if you don't
    have it already. It provides a gui to access an application's dcop
    interface. This is quit handy in figuring out which dcop call will do what
    you want.

    In your case, ksmserver (the kde session manager) has a logout signal that
    will logout and reboot or halt your machine. Telling it which OS to reboot
    into is a function in grub.

    That said, my script GRUB NextBoot (search kde-apps.org) will do this from
    within a kde session. So if you are into the box remotely in an NX session,
    this would work for you.

    However, it seems you are probably using ssh for a command line remote
    session. In that case, you should modify grub nextboot for your own needs.
    All you need to do tell grub what to reboot into. Make a textfile:

    savedefault --stage2=/boot/grub/stage2 --default=$input --once
    quit;

    Where input is the index number from your grub menu.lst; 0 is the first OS, 1
    is the second, etc...

    Then as root, execute `grub < textfile`

    Now that grub will boot into whatever OS you told it to for the nex reboot
    only, now tell it to reboot with a safe logout of KDE:

    `dcop --all-users --all-sessions ksmserver ksmserver logout 0 1 0`
    # 0 2 0 is halt; see KApplication shutdown enums in KDE API

    -- 
    Mark A. Taff
    With sufficient thrust, pigs fly just fine. --RFC 1925
    -- 
    Check the headers for your unsubscription address
    For additional commands send e-mail to suse-linux-e-help@suse.com
    Also check the archives at http://lists.suse.com
    Please read the FAQs: suse-linux-e-faq@suse.com
    

  • Next message: Serge Naggar: "[SLE] kde3.4; suse9.1pro, & xorg.x11"

    Relevant Pages

    • Re: [SLE] reboot
      ... > 9.3 has a long-click reboot that lets you choose what grub boots. ... Your problem will be how to reboot out of windows, ... As to the mechanics of how KDM instructs grub to boot some alternative ...
      (SuSE)
    • Re: Fedora 11 fail because of Anaconda :(
      ... If I let it default the filesystem layout, I can see and partition the ... disk, but always get a popup about not being able to find a disk ... boot image on first reboot. ... There is some sort of grub problem. ...
      (Fedora)
    • [opensuse] Xen in 11.0
      ... By _that_ I mean, play the dumb user and just install the default full desktop, work at the regular real console no serial console, use sub-2TB partitions and an ordinary msdos disklabel, and then use the gui util offered in the main gnome menu to install Xen, reboot into dom0, then use the gui util to create a vm, install opensuse 11.0 into that just as if it was a new bare metal server. ... Same machines I couldn't even get grub* to boot before. ... Thats just booting dom0 on the hardware, ...
      (SuSE)
    • Re: Grub problem
      ... Can you hit a key when the boot screen ... and there is no one around, it sits at the Grub splash screen until someone shows up on Monday and selects a kernel to boot to. ... I'd be checking every crontab I can find for the reboot issue. ... I just spoke to my contact and the keyboardless operation was the cause of the grub hanging problem. ...
      (Fedora)
    • Re: SuSE 8.2 GRUB
      ... GRUB boots up with a nice animated splash screen; ... standard SuSE kernel, try the values from the table in vesafb.txt. ...
      (alt.os.linux.suse)