P
Peter
Hi,
My program needs to: upgrad new OS images to client systems, modify boot.ini
file to point to the new OS, then reboot the system to the new OS, if it
failes, boot back to the previous version of OS.
All these have to be done through my program running on the client systems.
Assume I have been able to put the OS image to somewhere (either a partition
on the same disk or different disks) in target system, I have the following
questions:
1) How can I modify the boot.ini to "point to" the new OS? Bootcfg seems
workable, but I have problem to boot back to the previous version. Here is
the problem (pasted from my posts to other ng):
the modified boot.ini aft the commands looks as:
partition(1), it never worked! The commands I used as:
What's wrong with it? How can I work around it or there are other better
ways than "bootcfg"?
2) All I know "bootcfg" does is to chang default from one partition to
another, but within the same disk, can I use the command to swith the
default to a different disk? For example, I have boot.ini in one system (two
physical disks)
---------------------------------------------------------------
[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Advanced
Server" /fastdetect
multi(0)disk(0)rdisk(1)partition(1)\WINNT="Microsoft Windows 2000 Server
Japanese" /fastdetect
---------------------------------------------------------------
Can I change it to:
-------------------------------------------------------------------
[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(1)partition(1)\WINNT
[operating systems]
....
....
------------------------------------------------------------------
if I can, what the command should look like?
3) Is 'shutdown' shell command a standard component in XP (and win server
2003) system? In other words, if my client system are XP (and Wind Server
2003), am I safe to call 'shutdown' (after modifying boot.ini file) to
reboot the (remote) client systems in my program?
Any anwser/input is appreciated,
Peter
My program needs to: upgrad new OS images to client systems, modify boot.ini
file to point to the new OS, then reboot the system to the new OS, if it
failes, boot back to the previous version of OS.
All these have to be done through my program running on the client systems.
Assume I have been able to put the OS image to somewhere (either a partition
on the same disk or different disks) in target system, I have the following
questions:
1) How can I modify the boot.ini to "point to" the new OS? Bootcfg seems
workable, but I have problem to boot back to the previous version. Here is
the problem (pasted from my posts to other ng):
andC:\>attrib c:\boot.ini -s -r -hI used the following to modify the boot.ini file on PC:
C:\>bootcfg /default /ID 2-------------------------------------My original boot.ini file is as:
[boot loader]
timeout=30
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
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows XP Embedded" /fastdetect
the modified boot.ini aft the commands looks as:
default to--------------------------------------
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows XP Embedded" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
---------------------------------------That's fine, but when I try to change it back, i.e. change the
partition(1), it never worked! The commands I used as:
The boot.ini file never changed, it is always:C:\>attrib c:\boot.ini -s -r -h
C:\>bootcfg /default /ID 1
Professional" /fastdetect[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows XP Embedded" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP
What's wrong with it? How can I work around it or there are other better
ways than "bootcfg"?
2) All I know "bootcfg" does is to chang default from one partition to
another, but within the same disk, can I use the command to swith the
default to a different disk? For example, I have boot.ini in one system (two
physical disks)
---------------------------------------------------------------
[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Advanced
Server" /fastdetect
multi(0)disk(0)rdisk(1)partition(1)\WINNT="Microsoft Windows 2000 Server
Japanese" /fastdetect
---------------------------------------------------------------
Can I change it to:
-------------------------------------------------------------------
[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(1)partition(1)\WINNT
[operating systems]
....
....
------------------------------------------------------------------
if I can, what the command should look like?
3) Is 'shutdown' shell command a standard component in XP (and win server
2003) system? In other words, if my client system are XP (and Wind Server
2003), am I safe to call 'shutdown' (after modifying boot.ini file) to
reboot the (remote) client systems in my program?
Any anwser/input is appreciated,
Peter