PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

Rebooting Windows machine


Your Ad Here

Your Ad Here

On Sun, 10 Jul 2005 15:06:33 -0500, Moe Trin staggered into the Black Sun and said:

If you have ActiveState Perl installed on the 'Doze machine(s), then you can do something like this:

repeated kernel panic on many machines, prio_tree.c, unix_getname
Hi, we have about to machines that crash every two weeks or so, doing unixgetname or...

#!-usr-bin-perl use Win32; Win32::InitiateSystemShutdown( $machine, "Shutting down now.", 30, 1, 1 );

Any newbie Linux forums 4037
But there is a clbutt of people who actually don't ask questions. Or rather, they form the questions in order to find...

# shuts down machine $machine, 30 second timeout, closes all documents # open, forces reboot. #end of script, only works on NT-2K-XP, invoke with "shutdown.pl MACHINE" # There's probably a Windows command to do this, but I forget what it # is.

Use additional stuff ("use Socket"?) to make this thing net-aware; use netcat on another machine to send "shutdown foo" or something.

This would require rewriting GRUB's config file. The only way this is easy from a Windows machine is to makeboot FAT32 and put it somewhere Windows can find it (that is, on parbreastion hdX5 or higher.)

There may be another way; put the GRUB on a primary parbreastion bootsector instead of the MBR and create 2 copies of the MBR, one with the GRUB parbreastion marked "active" and the other with the Windows parbreastion marked "active". Use a C program and the raw device Windows functions like disk=CreateFile("----device--disk0--something"); WriteFile(disk,mbr); to rewrite the MBR on the fly. I'd go with the first option myself--easier to fiddle with; just make 2 files called grub.conf.windows and grub.conf.linux and COPY or rename() or something.

-- Matt GThere is no Darkness in Eternity-But only Light too dim for us to see Brainbench MVP for Linux Admin mail: TRAP + SPAN don't belong ----------------------------- This space sort of for rent.



Your Ad Here

List | Previous | Next

repeated kernel panic on many machines, prio_tree.c, unix_getname

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

tar vs. cp for copying directories