LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Boot to windows from centos, boot from centos to windows (https://www.linuxquestions.org/questions/linux-newbie-8/boot-to-windows-from-centos-boot-from-centos-to-windows-748413/)

brettmehaffey 08-18-2009 08:07 AM

Boot to windows from centos, boot from centos to windows
 
I'm trying to setup a dual boot server using Windows 2003 Server and CentOS 5. I need to be able to control and change the boot order remotely. Should I use grub, or windows boot manager and how should I configure them?

monsm 08-18-2009 10:00 AM

Up to you. I think you should be able to update boot order remotely either way with the correct permissions.

I presume Windows 2003 server still uses boot.ini or a similar text file?

Mons

malekmustaq 08-18-2009 11:54 AM

brettmehaffey,

Yes you can. But this needs more configurations to do in order to exploit it.

This may help you: http://tldp.org/HOWTO/Remote-Serial-...rnel-grub.html

at least this one too: http://forums.remote-exploit.org/bac...blem-grub.html

hope it helps.

schneidz 08-18-2009 01:53 PM

i dual boot win-2k and rh-9 at home and from what i can tell windows cant modify /boot/grub/menu.lst (also i never been able to ssh into win-2k).


a few lines of bash can modify /boot/grub/menu.lst before a reboot.

adityasharma 08-18-2009 04:51 PM

Quote:

Originally Posted by schneidz (Post 3648372)
i dual boot win-2k and rh-9 at home and from what i can tell windows cant modify /boot/grub/menu.lst (also i never been able to ssh into win-2k).


a few lines of bash can modify /boot/grub/menu.lst before a reboot.

definatly it possible but would suggest o use grub as the loader and let u control windows from it

brettmehaffey 08-19-2009 08:26 AM

Yes, Windows Server 2003 still has the boot.ini file.

What changes do I need to make to the file?

Right now when I boot, it boots to the CentOS 5, OS.

Currently, I have to choose "other", in grub to get to the windows load.

monsm 08-19-2009 08:39 AM

Quote:

Originally Posted by brettmehaffey (Post 3649408)
Yes, Windows Server 2003 still has the boot.ini file.

What changes do I need to make to the file?

Right now when I boot, it boots to the CentOS 5, OS.

Currently, I have to choose "other", in grub to get to the windows load.

Don't remember the details of boot.ini. Its got similar things to menu.lst but in a different syntax.
However, since you already have CentOS as boot and can do Windows boot from Grub, the easiest (and probably most secure) is to stick with that.

Check some of links above form the others. I guess in searches your keywords would be "ssh grub".

Mons

brettmehaffey 08-19-2009 11:11 AM

It isn't the config I need.

I need to be able to reboot in a diff os remotely.

So if i'm in CentOS and need to be in windows, I would like to choose the default boot os before rebooting, while I have remote access.

Currently, I have to be at the console to choose the os. This will not work for me due to shipping server to remote location and will not have tech onsite to choose the os if I reboot it.

It all needs to be managed remotely.

schneidz 08-19-2009 12:58 PM

robooting to windows from linux is the easy part.
all you do is 'vi /boot/grub/menu.lst' and change default from '0' to '1' and then sudo /sbin/shutdown -r now.

that should reboot into windows. now on windows you need to be able to ssh in (perhaps cygwin would help you there -- but i have no experience with that since i dont use windows much.) then you need the ability to edit the grub menu.lst from within windows. perhaps windows has some ext2 reading/ writing program but i am not sure.

mushroomboy 08-19-2009 01:09 PM

Quote:

Originally Posted by schneidz (Post 3648372)
i dual boot win-2k and rh-9 at home and from what i can tell windows cant modify /boot/grub/menu.lst (also i never been able to ssh into win-2k).


a few lines of bash can modify /boot/grub/menu.lst before a reboot.

You would have to assume that he doesn't have ext as the /boot fs? If he is using ext there are a couple ext2 drivers for windows, then he could mount the partition that has /boot and edit the menu.lst! Or he could be using fat32 for the /boot partition, then there would be native support on either system. There are pleny of creative ways to get menu.lst to be edited from windows. Just think outside the box... =) I would say use the ext drivers.

monsm 08-19-2009 02:14 PM

Quote:

Originally Posted by mushroomboy (Post 3649794)
You would have to assume that he doesn't have ext as the /boot fs? If he is using ext there are a couple ext2 drivers for windows, then he could mount the partition that has /boot and edit the menu.lst! Or he could be using fat32 for the /boot partition, then there would be native support on either system. There are pleny of creative ways to get menu.lst to be edited from windows. Just think outside the box... =) I would say use the ext drivers.

Good point. Schneidz suggestion should work for going from CentOS to Windows, but then you need to do something like this to go back from Windows to CentOS...

For manipulating the boot order it might actually be easier to change from Grub to the Windows boot loader since it would be easier to edit boot.ini from linux then menu.lst from Windows.

This is an old boot.ini I used ones a few years ago:
Code:

[boot loader]
timeout=10
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /NoExecute=OptIn
C:\UBUN_HD0.BIN="Ubuntu Linux (Removed)"

As you see you have a list of OSes and a default one selected with a timeout. You have to set the whole thing before the "=" sign in the default statement.
This example booted Ubuntu and I think I created the file using the dd command in Linux. You have to google that, don't remember what I did exactly. But ones the .bin file was created I just copied it to the C drive and edited boot.ini. This worked with WinXP, not sure if it will with 2003, you'll have to try it.

So you have your choices. Either this or finding a reliable ext driver for Windows...

Mons

mushroomboy 08-19-2009 04:35 PM

or you could think a little farther outside the box, just use fdisk on either and manually set a different active partition for booting... =) the biggest hint in all this is breaking down the boot process and how it all works.

http://www.fs-driver.org/

There are working ext drivers... But really think how you want all this to go down.

jefro 08-19-2009 05:25 PM

Run a virtual machine and use both at the same time...


All times are GMT -5. The time now is 03:16 PM.