Automated Default OS Changing - Vista, XP, 2003, Linux

Jay

Member
Hi Fellow NeoSmart Supporters,

I'm trying to develop an automated test suite which boots into Linux, Windows XP, Windows 2003, and Windows Vista. Currently I have all the operation systems installed. My partition setup is as shown below:

/dev/hda1 NTFS Windows XP
/dev/hda2 NTFS Windows 2003
/dev/hda3 NTFS Windows Vista
/dev/hda4 Extended
/dev/hda5 EXT2 Linux Boot
/dev/hda6 EXT2 Linux Root
/dev/hda7 SWAP Linux Swap

Does anyone have any suggestions on how to automatically boot from one OS to the next? Prior to the addition of Windows Vista I used GRUB. The grub.conf file was accessible from every OS so that it could be replaced. I have been experimenting with EasyBCD1.61 and NeoGrub, but I could use some suggestions.

Thank you,
Jay
 
Last edited:
Hello Jay, welcome to NeoSmart Technologies.

You raise an interesting question - quite honestly, it's not going to be easy.

EasyBCD uses the Windows Vista BCD bootloader - which stores all its configuration in a binary-only format located in C:\Boot\BCD and cannot be opened from outside of Windows.

1) Get the BCD to boot both Linux, Vista, and Previous Versions of Windows
2) Use
Code:
bcdedit.exe /default {ID}
to change the default OS for the next reboot by copying bcdedit.exe to each OS.
3) You'll have a problem when choosing between 2k3 and XP because the BCD doesn't boot directly into them, but rather calls NTLDR and Boot.ini to do the dirty work: so when you need to pick either XP or 2k3, you'll have to open up boot.ini and change the default OS from there (or easier to just rewrite Boot.ini completely to boot into only one of them) You'll have to set "Previous version of Windows" as the default in the BCD as well.
4) When about to boot into Linux, you'll have to do two steps:
a) Set the temporary next-reboot-only default OS to Linux:
Code:
bcdedit.exe /bootsequence {ID}
b) Set the OS you want to boot into after Linux as the actual default with the /default switch.

Interesting project though, that's for sure. May I ask what the objective of automated booting between these different operating systems is?
 
Your responce was extremely helpful, and I really appricate your assistance. This has been a great learning experience. EasyBCD and NeoGrub are great tools.

After toying with NeoGrub and moving bootloaders around, I figured out that I could use GRUB to boot directly into Linux, XP, 2003, and Vista. This is definately the prefered option since I can easily modify grub.conf from every OS.

This will be used in an automated RMA test suite. Currently we test Vista seperately. I'm sure our technicians will enjoy the additional automation.
 
Glad to hear it.

If you're using NeoGrub, I strongly recommend using the latest 1.61 beta build - we've rewritten the NeoGrub code from scratch and it's a 1000 times more reliable and supports more filesystems.
 
Back
Top