Script for restarting your computer

Hi everybody,

I have openSuse 11.1. I have some problems with the bootloader with some other Distributions and I think that maybe you could help me.

I have installed in a pc 3 OS, i.e. Slackware, ubuntu and windows and I use grub as a bootloader. Everything works fine except the grub-reboot command, which I need in order to restart my pc remotely to any OS I want.

I have tried many solutions, such as this recommended in this link. Though none of these has worked correctly.

I checked out by chance the menu.lst of openSuse and I saw that there is no change of “default 0” to “default saved” in order to restart openSuse to another OS.

So I was wondering how openSuse manages to reboot correctly to another OS through the option that it has in the Leave->restart menu of KDE.

I have already asked slackware and ubuntu forum but with no solution.

Thanks in Advance and sorry if I’m not in the appropriate forum

I’m not certain what you are trying to do, and I am definitely NO GOOD at proposing scripts.

Still, does grubonce do anything that might help you? I use it sometimes when working remotely on my mother’s PC (where her PC is a continent away).

Feathermonkey and I wrote a wiki here on this:
Reboot from CLI to selective partitions - openSUSE

Interestingly enough Oldcpu I’ve been trying this on a different distro.

I don’t have grubonce or grub-reboot and like the OP I can’t get grub-set-default quite working.

Does the grub package tell you where it is coming from if this is still applicable to 11.1?

Grub version grub (GNU GRUB 0.97)

I’m using GNU GRUB - GNU Project - Free Software Foundation (FSF) but I’ve just noticed 8 patches being applied. So I’m starting to think there maybe a patch being applied to grub. Bit unsure how to track this down may have a look at the src.rpm if you confirm this still works in 11.1

If grubonce does not work, one could surf for other methods … I have not tried myself, but I have read of Fedora and Ubuntu users using “bootnext” :
bootnext for Fedora

There may be some things as well in the grub “manual” (that one can find from searching one’s favourite search engine ) … I note this URL of a different method (although it may be rather old) …
Booting once-only - GNU GRUB Manual 0.97

I’m still looking but I would like to point out to the OP that this will only work from the distro that has grub installed.

So if Ub had it(Use Suses Grub I say, and grubonce)and you managed to solve this you could reboot once. Now using grubonce sounds better to me as next time you go back to your default. Might take 2 distro’s to get one.

i.e grubonce on Ub => Slackware now say from slackware you wanted windows, it would take default boot Ub + grubonce windows.

Now if you use default you’re stuffed until you get back to the real machine as it will always go to default. And if the default isn’t the grub one you’re stuffed.

I’m intrigued by what is providing grubonce and I’m looking but I would just let suse take over grub if suse is on the same machine and it is still working on 11.1

Or just mount and edit menu.lst, though you’ll need some kind of editing from windows.

Ok I’ve just checked, Suse’s grub is being patched with something called, grub-grubonce-no-wait.

So if you wish for this in a distro missing it you’ll need to patch grub and manually compile.

I’ve briefly looked for the patch but have lost interest it must be out there some where. Its not really something I’m missing. Or do what I did get the src rpm and take the patch from that.

Grubonce may be openSUSE specific. I note this old archived exchange:
[Pm-utils] Some thoughts about some of the hooks](

simeon_mattes, did you look into the links I provided for bootnext, and also the method noted in the grub manual ?

The grub manual is sort of the same as the debian one.

I didn’t get very far but as it isn’t something I’m missing I didn’t really try. I do think the OP wanted the ability to do something similar to grubonce from any distro which isn’t really possible.

As for suse specific not really sure but I would of thought it is more than possible to use Suse’s grub. Certainly on my Arch install I use Suse’s OO. So I would thought with some knowledge of using src compiles in another distro it would be trivial to use the src.rpm to make a distro specific pkg.

I’m assuming your using different disto grubs? If so why not just use
the “/usr/sbin/grub-set-default” script and copy to your relevant
distro? Also grubonce is just a perl script that can be copied.

Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 (i586) Kernel
up 23:40, 3 users, load average: 0.30, 0.31, 0.22
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME