Re: remote control of dual boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stewart Nelson wrote:

Hi,

I have a conventional dual-boot system:
Win XP on IDE primary master, grub in MBR,
FC2 on primary slave.

If either Windows or FC2 is running, I can
access it with VNC.  Of course, a reboot will
switch to the default OS, if the other is running.
However, I don't know how to switch back.

Is there a good way to boot FC2 from Windows?
Or to boot Windows from FC2?



Here is how I would do it. I would make my linux be the default OS to boot into. You mentioned that you can control both OS'es remotely so this shouldn't be a problem. If you are in windows, then you can just reboot to boot into linux. While in linux, you can reboot into windows by executing the following commands:


enter grub with:
grub --no-floppy (don't probe floppy drives makes it go faster if you do not have a drive like all my machines)
in the grub command line:
savedefault --default=2 --once (replace 2 with the appropriate selection that is your windows option in grub.conf)
quit
Then you can reboot and it will boot into Windows. When you reboot again, it will go back into Linux.


Here is a simple python batch file you can use that I wrote off of the top of my head:


#!/usr/bin/python import os, sys

#Replace the following with the appropriate choice
DOSCHOICE=2

pipe = os.popen("/sbin/grub --no-floppy", 'w')
pipe.write('savedefault --default=DOSCHOICE --once\nquit\n')
pipe.close()

os.system('/sbin/shutdown -r now &')
sys.exit(0)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux