Hi Folks,
Suppose we have two machines, A and B, each dual-boot Linux/Windows. Suppose that Linux is the "default" OS on reboot -- i.e. if you switch the machine on and do nothing, Linux is what you get.
Let's start with both in Linux. Now, sitting at A, I want B to reboot into Windows, but without going to B.
One solution which has occurred to me is that, while at A, I can log in to B, su root, edit the LILO or GRUB config so that the boot order is reversed, and then tell B to reboot.
So far so good. I can even make this into a script, so that when logged into B I can issue something like "boot Windows".
But then, how to restore the original boot order without having to go to B, choose Linux from the boot menu, boot Linux, and re-edit the config file? I somehow doubt that you can do this while B is in Windows ... and I basically want the whole thing to be remote, from A.
If there were some capability in the boot loader itself that could restore a default boot configuration prior to actually booting the OS which is currently "on top", this would make the whole thing scriptable.
To be precise about this:
1. A & B running Linux. 2. At A, tell B to "boot Windows". 3. B reboots. 4. LILO/GRUB sees that Windows is "on top" and selects this as the OS to boot into. 5. LILO/GRUB *also* restores the original config file with Linux "on top". 6. LILO/GRUB then boots into Windows.
The effect would be that the next re-boot would be into Linux.
Any ideas or comments?
With thanks, Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@nessie.mcc.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 21-Jul-05 Time: 13:37:10 ------------------------------ XFMail ------------------------------
Let's start with both in Linux. Now, sitting at A, I want B to reboot into Windows, but without going to B.
lilo -R
or try this if you feel braver:
http://www.cs.utk.edu/~england/
Don't know how to do it from Windows, but you could default to Linux and that would give you the option of rebooting into either.
Joe
Ted,
Suppose we have two machines, A and B, each dual-boot Linux/Windows. Suppose that Linux is the "default" OS on reboot -- i.e. if you switch the machine on and do nothing, Linux is what you get.
Let's start with both in Linux. Now, sitting at A, I want B to reboot into Windows, but without going to B.
One solution which has occurred to me is that, while at A, I can log in to B, su root, edit the LILO or GRUB config so that the boot order is reversed, and then tell B to reboot.
So far so good. I can even make this into a script, so that when logged into B I can issue something like "boot Windows".
But then, how to restore the original boot order without having to go to B, choose Linux from the boot menu, boot Linux, and re-edit the config file? I somehow doubt that you can do this while B is in Windows ... and I basically want the whole thing to be remote, from A.
If there were some capability in the boot loader itself that could restore a default boot configuration prior to actually booting the OS which is currently "on top", this would make the whole thing scriptable.
To be precise about this:
- A & B running Linux.
- At A, tell B to "boot Windows".
- B reboots.
- LILO/GRUB sees that Windows is "on top" and selects this as the OS to boot into.
- LILO/GRUB *also* restores the original config file with Linux "on top".
- LILO/GRUB then boots into Windows.
The effect would be that the next re-boot would be into Linux.
My instant reaction was to think that grub could do this, but I can't find anything to suggest it does, maybe someone else knows better. Anyway, it appears that lilo has an option which will do exactly what you want:
From man lilo:
-R command line This option sets the default command for the boot loader the next time it executes. The boot loader will then erase this line: this is a once-only command. It is typically used in reboot scripts, just before calling `shutdown -r'. Used without any arguments, it will cancel a lock-ed or fallback command line.
I assume that you could do: lilo -R windows (or whatever); shutdown -r now
and it would boot into windows. Then on next boot it'll go back to Linux, or whatever the default is.
Hope that helps
Dave
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 21 Jul, 2005, at 13:39, (Ted Harding) wrote:
- A & B running Linux.
- At A, tell B to "boot Windows".
With LILO its a doddle..
lilo -R windows
assuming windows is the name of the boot option for windows, then reboot..
This isn't a permanent change so the next reboot would revert to the normal LILO behaviour..
John
On Thu, 21 Jul 2005 13:39:44 +0100 (BST) (Ted Harding) Ted.Harding@nessie.mcc.ac.uk wrote:
Hi Folks,
Suppose we have two machines, A and B, each dual-boot Linux/Windows. Suppose that Linux is the "default" OS on reboot -- i.e. if you switch the machine on and do nothing, Linux is what you get.
Let's start with both in Linux. Now, sitting at A, I want B to reboot into Windows, but without going to B.
One solution which has occurred to me is that, while at A, I can log in to B, su root, edit the LILO or GRUB config so that the boot order is reversed, and then tell B to reboot.
So far so good. I can even make this into a script, so that when logged into B I can issue something like "boot Windows".
But then, how to restore the original boot order without having to go to B, choose Linux from the boot menu, boot Linux, and re-edit the config file? I somehow doubt that you can do this while B is in Windows ... and I basically want the whole thing to be remote, from A.
If there were some capability in the boot loader itself that could restore a default boot configuration prior to actually booting the OS which is currently "on top", this would make the whole thing scriptable.
To be precise about this:
- A & B running Linux.
- At A, tell B to "boot Windows".
- B reboots.
- LILO/GRUB sees that Windows is "on top" and selects this as the OS to boot into.
- LILO/GRUB *also* restores the original config file with Linux "on top".
- LILO/GRUB then boots into Windows.
The effect would be that the next re-boot would be into Linux.
Any ideas or comments?
1 Dont use lilo as repeated writing to the boot sector may leave you unbootable 2 Grub maybe fine but I would, use network booting.
I have been playing with this for auto instalation, but all you need is either
a> a pxe and the first google result is http://www.kegel.com/linux/pxe.html b> etherboot http://etherboot.sourceforge.net/
I have 3com cards so use etherboot, this allows me to deside what to boot from either the files in a tftp directory or from the DNS server.
Regards
Owen S
On Thu, 21 Jul 2005 20:03:36 +0100 Owen Synge owens.singh@ntlworld.com wrote:
On Thu, 21 Jul 2005 13:39:44 +0100 (BST) (Ted Harding) Ted.Harding@nessie.mcc.ac.uk wrote:
Hi Folks,
Suppose we have two machines, A and B, each dual-boot Linux/Windows. Suppose that Linux is the "default" OS on reboot -- i.e. if you switch the machine on and do nothing, Linux is what you get.
Let's start with both in Linux. Now, sitting at A, I want B to reboot into Windows, but without going to B.
One solution which has occurred to me is that, while at A, I can log in to B, su root, edit the LILO or GRUB config so that the boot order is reversed, and then tell B to reboot.
So far so good. I can even make this into a script, so that when logged into B I can issue something like "boot Windows".
But then, how to restore the original boot order without having to go to B, choose Linux from the boot menu, boot Linux, and re-edit the config file? I somehow doubt that you can do this while B is in Windows ... and I basically want the whole thing to be remote, from A.
If there were some capability in the boot loader itself that could restore a default boot configuration prior to actually booting the OS which is currently "on top", this would make the whole thing scriptable.
To be precise about this:
- A & B running Linux.
- At A, tell B to "boot Windows".
- B reboots.
- LILO/GRUB sees that Windows is "on top" and selects this as the OS to boot into.
- LILO/GRUB *also* restores the original config file with Linux "on top".
- LILO/GRUB then boots into Windows.
The effect would be that the next re-boot would be into Linux.
Any ideas or comments?
1 Dont use lilo as repeated writing to the boot sector may leave you unbootable 2 Grub maybe fine but I would, use network booting.
I have been playing with this for auto instalation, but all you need is either
a> a pxe and the first google result is http://www.kegel.com/linux/pxe.html b> etherboot http://etherboot.sourceforge.net/
I have 3com cards so use etherboot, this allows me to deside what to boot from either the files in a tftp directory or from the DNS server.
sorry correcion I use pxe boot not etherboot
Regards
Owen S
main@lists.alug.org.uk http://www.alug.org.uk/ http://lists.alug.org.uk/mailman/listinfo/main Unsubscribe? See message headers or the web site above!