DualBoot
How to change the order of OS'es in menu:
Login as "root" and edit your /boot/grub/grub.conf (or menu.lst).You'll see a line saying something like "default 0". Change the 0 to 1 or 2 or whatever is needed. The way you tell is based on what order your Linux and Windows options are listed in. If Windows is the second option to choose from, then use "default 1". Save the file and reboot.
http://users.bigpond.net.au/hermanzone/p18.htm
http://www.sysint.no/nedlasting/mbrfix.htm
MbrFix /drive <num> savembr <file> Save MBR and partitions to fileMbrFix /drive <num> restorembr <file> Restore MBR and partitions from fileMbrFix /drive <num> fixmbr {/vista} Update MBR code to W2K/XP/2003 or Vista Drive numbering <num> starts on 0.
Partition numbering <part> starts on 1.
There is no concept uninstall in boot loaders, because if you uninstall a boot loader, an unbootable machine would simply remain. So all you need to do is overwrite another boot loader you like to your disk, that is, install the boot loader without uninstalling GRUB.
For example, if you want to install the boot loader for Windows, just run FDISK /MBR on Windows XP (not Vista)!.
On XP NTLoader can be repaired:
cd c:\
FIXBOOT C:
FIXMBR
BOOTCFG /rebuild
GRU uses /boot/grub/menu.lst for boot menu
NTLoader uses boot.ini http://support.microsoft.com/kb/289022/en-us
There is no Boot.ini file in Windows Vista.
Ways to modify the boot menu in Vista are:
bcdedit.exe, located in the Windows\system32\
http://neosmart.net/dl.php?id=1
http://www.sysint.no/en/Download.aspx
restoring Windows boot loader: http://support.microsoft.com/kb/927392
bootrec has the following options:
/FixMbr
The /FixMbr option writes a Windows Vista-compatible MBR to the system partition. This option does not overwrite the existing partition table. Use this option when you must resolve MBR corruption issues, or when you have to remove non-standard code from the MBR.
/FixBoot
The /FixBoot option writes a new boot sector to the system partition by using a boot sector that is compatible with Windows Vista. Use this option if one of the following conditions is true:
• The boot sector has been replaced with a non-standard Windows Vista boot sector.
• The boot sector is damaged.
• An earlier Windows operating system has been installed after Windows Vista was installed. In this scenario, the computer starts by using Windows NT Loader (NTLDR) instead of Windows Boot Manager (Bootmgr.exe).
/ScanOs
The /ScanOs option scans all disks for installations that are compatible with Windows Vista. Additionally, this option displays the entries that are currently not in the BCD store. Use this option when there are Windows Vista installations that the Boot Manager menu does not list.
/RebuildBcd
The /RebuildBcd option scans all disks for installations that are compatible with Windows Vista. Additionally, this option lets you select the installations that you want to add to the BCD store. Use this option when you must completely rebuild the BCD.
The MBR is in the first sector of our hard disks. One sector of a hard disk is 512 bytes in size.
The MBR contains three important parts:
the hard disk's 64 byte partition table
2 byte 55aa signature to indicate to the BIOS that it is a bootable device.
That only leaves 446 bytes of room for the bootloader.
No bootloader can actually fit into such a small space. When we say we are installing a bootloader to our Master Boot Record, we don't really mean that exactly. The bootloader only puts a small code there just enough to point the BIOS somewhere else on the disk where there is more room. The part that fits in the MBR is called the 'IPL' or 'stage one' of the bootloader. That's the only thing that gets changed, and it's the only thing that needs to be changed again now.
Normally the simplest place to put 'stage2', the main (functional) part of a bootloader is in an operating system partition. Your Windows NTLDR second stage lives in your Windows partition and Grub stage2 lives in your Ubuntu partition.
The main part of the bootloader, be it Grub, LiLo or NTLDR, is the part that actually does the real work of booting the operating system's kernel.
When we are dual or multi-booting, Stage2 also gives us a Menu which allows us to choose which operating system you want during boot-up. When you were using Grub, if you choose Windows, GRUB redirects the BIOS back to Windows boot sector and the NTLDR bootloader, to 'chainload' Windows. It works like a relay system.
The problem is when you delete the Ubuntu partition, that second, vital part of Grub will suddenly be gone. When you try to boot up, your MBR will be pointing to an empty space, and there will be nothing there to offer you a menu to choose Windows anymore either.
You'll get a black monitor background with white text on it: 'GRUB error 22'
Meaning, 'No such partition. This error is returned if a partition is requested in the device part of a device- or full file name which isn't on the selected disk.' Grub won't be there anymore and you won't be able to boot Windows or any other operating system you might have installed. You'll just have one of those black screens with the white typing on it and a blinking cursor.
You can avoid that situation by moving GRUB out of Ubuntu and installing it in it's own partition, Keep GRUB and Make a Dedicated GRUB Partition
Or you can prepare your MBR for deleting GRUB. This can be easily done by overwriting the 446 bytes of bootloader code in the MBR with code for another bootloader before you delete the Ubuntu partition, and GRUB along with it.
Well, don't worry if you have deleted Ubuntu already, you can still overwrite your Master Boot Record's IPL code later at any time.
You can replace Grub's MBR code with the equivalent code for NTLDR and make the MBR point directly to Windows like it used to by simply using the same software you used when Windows was installed in the first place. This will overwrite GRUB's version of the 'IPL' in your MBR (or 'boot sector'), and replace it with the Windows version again.
The way to do that is very simple, exactly the same way you did it the first time. (Remember?)
You just re-install Windows....Well, that is one way to do it, but it will take you a while. There are a couple of faster ways...
Windows XP 'Recovery Console'
Just put in your Windows XP install CD, and boot into the recovery console and use the so-called 'FIXMBR' command.
dual boot : http://support.microsoft.com/kb/919529
http://www.oszone.net/4985/XP_after_Vista
Bootsect.exe Command-Line Options:
If you have installed XP on a Vista machine, in the Boot Menu, you may no longer be able to see Vista as an option. This occurs because when a different version of Windows is installed, it rewrites the MBR to call its own boot loader.
So if you install Vista on a boot menu incorporates the options from the older OS's boot menu. But, on the other hand, if you install XP on Vista, it will overwrite the MBR with one that does not recognize the newer Vista's Boot Loader.
bootsect.exe is distibuded within EasyBCD 1.7.2 http://neosmart.net
So if you find that Vista is missing as an option in a multi-boot you can resolve this issue, as follows : Open cmd in XP.
Run D:\Boot\ Bootsect.exe –NT60 All
Where D: is the Drive letter.
Reboot. You will now be able to see the Vista menu option/s.
Now To restore the entry for XP, open an elevated and enter this:
Bcdedit –create {ntldr} –d “Put Description of Menu here”
Restart Computer.
http://softwareblogs.intel.com/2008/02/26/dual-boot-windows-vista-and-windows-server-2008/
http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=3819612&SiteID=17
http://forum.oszone.net/post-775764.html