tags:

views:

86

answers:

1

I'm setting up a test bed where I am testing a device connection across multiple Windows OSs. I can't do it in a VM (cannot virtualize access to device) so I have quite a multi-boot system. I have a script to automate the process, but I want it go ahead and finish, selecting the next OS to boot and run its test.

One problem is that XP/2K3 use boot.ini while Vista and later use BCDEdit. I could manually have two scripts... one for each XP/2K3 to edit boot.ini. And then to BCDEdit for Vista systems. I'd hate having to hardcode each one though, esp if I have to change order and/or toggle off certain OSs depending on the test conditions.

BCDEdit also uses GUID for their entries, meaning setting up on different machines would mean figuring out which GUID to go to next.

Any thoughts or hints? Are there any utilities that help automate this?

+1  A: 

I'm assuming your various flavors of Windows are housed on different partitions. Use an Ubuntu LiveCD to install GRUB and write several configuration files, each of which has one OS selected as the default. Make a HD partition for /boot, and store the GRUB configs in the same location.

Each of your Windows partitions will need to install the Ext2 IFS driver, and mount the EXT2 partition you made before as z: or something. Then your test script can do something like:

mountvol z: %bootvolname%
copy /y boot_to_vista_64.lst z:\boot\grub\menu.lst
shutdown -r -f -t 0 

%bootvolname% is a bit complicated, and is OS-specific. You'll need to store it with each OS partition, and you can get it by doing mountvol z: /l while that OS is running.

Ben Straub