# Triple boot a system



## g.ramesh (May 8, 2003)

Hi

I have a pc with XP Prof SP3 installed. Please telle me is it possible to install Win 7 and Ubuntu 10.04 LTS on top of XP and triple boot?


----------



## surferdude2 (Jul 7, 2010)

Supposedy that's not a problem..Haven't done it myself though:

http://raviratlami1.blogspot.com/2009/01/how-to-dual-triple-boot-windows-7-with.html


----------



## Elvandil (Aug 1, 2003)

If you have the space, install Ubuntu last. It most likely will create a boot menu for all 3.


----------



## g.ramesh (May 8, 2003)

Thanks for your replies. My HD is formatted in to 3 partitions with NTFS. I read that for installing a Linux system some swap space and unformatted space is required. In that case what to do?


----------



## Elvandil (Aug 1, 2003)

When you install Ubuntu, you will get the option to partition any space where you want it installed. It will do it automatically if you let it, or you can choose the advanced options and choose where to have your root partition, swap space, and Home or other directory. So if you set aside a large enough space for Ubuntu, you can just delete it and leave it unallocated. Install 7 to the place where you want that, and then boot up Ubuntu and install to the empty space you left for it.


----------



## g.ramesh (May 8, 2003)

Elvandil said:


> When you install Ubuntu, you will get the option to partition any space where you want it installed. It will do it automatically if you let it, or you can choose the advanced options and choose where to have your root partition, swap space, and Home or other directory. So if you set aside a large enough space for Ubuntu, you can just delete it and leave it unallocated. Install 7 to the place where you want that, and then boot up Ubuntu and install to the empty space you left for it.


Hi Elvandil

thanks for the reply, as said I installed Ubuntu last and it is showing the following options on boot up:

Ubuntu, with Linux 2.6.32-21-generic
Ubuntu, with Linux 2.6.32-21-generic (recovery mode)
Memory test (Memtest 86+)
Memory test (Memtest 86+, serial console 115200)
Windows 7 (loader) (on /dev/sda2)

When I select Win7 it is then giving option to boot into win7 or other windows installations (i.e xp)
Is it ok, why not even older version of windows is not shown in first screen?

I used the first option of Linux i.e. Ubuntu, with Linux 2.6.32-21-generic. 
What does other options for?

Please tell me.


----------



## TheOutcaste (Aug 8, 2007)

When you installed WIn 7, it replaced the XP Boot sector with it's own, so the Win 7 bootloader is used for both XP and Win 7. To boot XP, you have to go through the Win 7 boot loader now.
The Win 7 boot loader was the only one that Linux would have seen, as XP now goes through it.

The 2nd option is used if the first won't boot, similar to Windows Safe Mode.
The next two are to run Memory diagnostics. The serial console option let's you run the program and send the output to a console connected to the serial port (another PC connected via the serial port).


----------



## g.ramesh (May 8, 2003)

TheOutcaste said:


> When you installed WIn 7, it replaced the XP Boot sector with it's own, so the Win 7 bootloader is used for both XP and Win 7. To boot XP, you have to go through the Win 7 boot loader now.
> The Win 7 boot loader was the only one that Linux would have seen, as XP now goes through it.
> 
> The 2nd option is used if the first won't boot, similar to Windows Safe Mode.
> The next two are to run Memory diagnostics. The serial console option let's you run the program and send the output to a console connected to the serial port (another PC connected via the serial port).


Thanks TheOutcaste for your reply.

I was going through an article where it says Ubuntu can be installed within win7 using VMware player (of course there is WUBI option as well)
I think this is a good option instead of installing Ubuntu on a seperate partition as I am not able to see the Ubuntu partition either in xp or win 7 and save some data on it.
Now that much of hard disk space is exclusively reserved for Linux.

I would like to reclaim that space by uninstalling Ubuntu and installing it again thru VMware player within win 7 (or xp which is better?).

Please suggest.


----------



## TheOutcaste (Aug 8, 2007)

I've not used VMWare or WUBI so can't really comment. I have an older Ubuntu install (Version 8 I think) in Virtual PC 2007, but don't use it much. MS doesn't provide the VM Additions to let you drag and drop between the Host and a Linux guest, so VMWare has an advantage there. The Linux - Unix forum would be a better place to get info on which may be better.

Uninstalling it should be as simple as booting with the Win 7 DVD, choosing the *Repair your computer* option, then opening a Command Prompt and typing *bootrec /fixboot* to restore the Win 7 Boot loader.
More info on the bootrec tool here:
How to use the Bootrec.exe tool in the Windows Recovery Environment


----------



## TerryNet (Mar 23, 2005)

I moved your thread to Linux and Unix from XP; don't know if you'll get a whole lot of different advice here, but at least a few different eyes will see it.

Wubi is fine. I advise using it if you are shy about partitioning (as I was when first starting to use Ubuntu), but having Ubuntu truely in its own partition is better, so I wouldn't advise you to "go backwards."

If you want to have, in effect, multiple OSes running at the same time then a virtual machine is a good option. I use Oracle's VirtualBox and various people here have said that VMware Player is better. Both are free.

If your big concern is data access my suggestion is to just keep your data in Windows as Ubuntu has no problem accessing it. Even better is to have a separate data partition shared by all 3 of your systems. But, if you want to access data in Ubuntu from Windows maybe Three Ways To Access Linux Partitions (ext2/ext3) From Windows On Dual-Boot Systems will have a solution for you.


----------



## jiml8 (Jul 3, 2005)

> I was going through an article where it says Ubuntu can be installed within win7 using VMware player (of course there is WUBI option as well)
> I think this is a good option instead of installing Ubuntu on a seperate partition as I am not able to see the Ubuntu partition either in xp or win 7 and save some data on it.


Or, of course, you could make the better choice and install Win 7 as a VM within Ubuntu.


----------



## g.ramesh (May 8, 2003)

TerryNet said:


> I moved your thread to Linux and Unix from XP; don't know if you'll get a whole lot of different advice here, but at least a few different eyes will see it.
> 
> Wubi is fine. I advise using it if you are shy about partitioning (as I was when first starting to use Ubuntu), but having Ubuntu truely in its own partition is better, so I wouldn't advise you to "go backwards."
> 
> ...


Thanks a lot TerryNet for your reply. I will see the link above and will come back to you.


----------



## saikee (Jun 11, 2004)

The Xp has boot loader NTLDR. Win7 has the equivalent called boomgr and Linux the popular boot loader is Grub. The default version in Ubuntu 10.04 is Grub2 which can reside inside a NTFS partition.

NTLDR can boot 10 OSes as it displays a maximum of 10 choices. Both bootmgr and Grub2 can boot over 100 OSes.

There is no technical diffulty to install the 3 systems in any order. However the minium work is achieved by installing Xp, then Win7 and Ubuntu.

This is due to NTLDR cannot load bootmgr as it is not forward compatible. bootmgr on the other hand can load NTLDR. In the above sequence the XP will be installed in the C drive and Win7 is then installed in a D drive. The installer of Win7 will place bootmgr inside the C drive as this is the standard arrangement. The boot mgr replaced NTLDR and offers Xp as a second choice to WIn7. If Xp is specified bootmgr will load NTLDR which then in turn load Xp. There will be no boot loader residing in the D drive.

Grub2 is a lot cleaner. When Ubuntu is installed as the last system it will take over the MBR and automatically configure to boot whatever in the C drive by having found a boot loader inside. It will not know there are two WIndows inside and so the Win7 bootmgr will be loaded if WIndows is specified.

All 3 boot loaders can be restored by its own installation CD or DVD so it is a simple effort to reasemble them again if needed.

XP, WIn7 and Ubuntu are all booted by their own boot loaders individually but every boot loader is capable of booting another boot loader if all systems are installed as a stand alone operating systems. 

If one system is placed as a guest inside a host in a virtual machine then only the host system is booted. The guest systems are called up by loading a file inside the host system.. In such a case the boot loaders of the guest systems are not active.


----------



## lewmur (Sep 11, 2006)

Wubi vs virtual. Wubi is a full install of Ubuntu that handles all of your hardware. It merely uses exitsting ntfs file system instead of creating a Linux partition. It will not run quite as fast as a native install but I doubt you would notice the difference. When you boot the computer you choose which OS to run.

A virtual session, VMware, Msft or Virtual Box, OTOH, shares the Host OS's resources but runs simultaneously. You can actually run several OS's at the same time. The drawback is that each virtual session takes away memory from the host. IOW, if you only have 1gb of ram and you assign 512mb to the quest os, you will only have 512mb left for the host. Second, you might not be able to access all of your hardware from the guest.


----------



## g.ramesh (May 8, 2003)

saikee said:


> All 3 boot loaders can be restored by its own installation CD or DVD so it is a simple effort to reasemble them again if needed.


As I was not able to use the partition where Linux is installed from win to save some files, I used GParted and tried to free some space. When I freed some and moved around swap and Linux to bring this free space next to a primary partition where xp is installed (as already 4 partitions are there I was not allowed to make this as a Shared partition among all three oses).

Then I merged Xp partition and free sapce and moved xp to right, then when I tried to boot into XP it was showing fault /ntldr. Then I merged back the XP partition and unallocated sapce and tried boot again. Now also is shows the following message when I try to boot in to XP

" Windows failed to start. A recent hardware or software change might be the cause. To fix the problem:
1. Insert your windows installation disc and restart your computer.
2. choose your language settings and then click "NEXT"
3.Click "Repair" your computer.

If you do not have this disc, contact your system administrator or computer manufacturer for assistance.

File: \ntldr
Status: OX0000225

Info: The selected entry could not be loaded because the application is missing or corrupt. "

I u/l the screenshots from GParted before and after I merged the unallocated space to xp partition and the link is

" http://www.4shared.com/file/kwy9JguJ/gparted1.html "

and the output of fdisk -lu is given below

sudo fdisk -lu

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa3c6a3c6

Device Boot Start End Blocks Id System
/dev/sda1 16126 236026979 118005427 f W95 Ext'd (LBA)
/dev/sda2 * 236027904 561364991 162668544 7 HPFS/NTFS
/dev/sda3 561364992 565270527 1952768 82 Linux swap / Solaris
/dev/sda4 565270528 625141759 29935616 83 Linux
/dev/sda5 16128 236026979 118005426 7 HPFS/NTFS

Above you said all 3 boot loaders can be restored by its own installation CD or DVD, please tell me how to restore XP boot loader so that I can be able to boot into XP.

Although booting in to win 7 and Ubuntu is normal.


----------



## saikee (Jun 11, 2004)

I need you to paste the output of

```
sudo fdisk -l
```
which gives the information in terms of cylinders.

I don't suppose you know which partition holds which system. From your description you had Xp to start with and then added Win7 and Ubuntu.

Ubuntu or Linux partition has partition ID 83 so sda3 and sda4 are likely to be the Ubuntu partitions with sda3 either the /boot or /.

The Win7 and XP must reside in an active primary partition and this can only be sda1 to sda4. Any partition above sda4 is logical partition which if used will cause one of the primaries converted into an extended partition. You have converted sda1 as the extended partition with only one logical partition sda5 inside and it is type 7. Therefore sda5 is likely to be your Win7 as it cannot boot unless from the Xp primary partition which evidently is your sda2. sda2 has been maeked active by the "*".

Your current problem is that while WIn7 and Ubuntu boot the Xp in the sda2 doesn't.

My guess is that you might have altered your partition layout resulting the partition number changed in the Xp. This can be confirmed if you post the hidden file boot.ini in sda2. You can boot up Ubuntu which will mount sda2 under the name you used in Xp and post the content of boot.ini here. Hidden file in MS Windows are visible in Linux.

I don't actually know exactly your problem of Xp not booting. However the booting code is always stored in the boot sector at the beginning of the partition and Gparted only changes the filing system but not the boot sector. Thus moving Xp to the right will result in the boot sector becoming empty and so you should lose both Xp and Win7. However you have also do more changes to the partitions to make them boot so I am a bit lost especially on your original partition layout and I doubt if you know it yourself.

In conclusion confirm the following

(1) Post "sudo fdisk -l" output here
(2) Post boot.ini in sda2 here and also show us the contents of directory of sda2 which should have \boot and bootmgr for booting Win7 plus boot.ini, NTLDR and possibly NTdetect.com for booting Xp.
(3) Post /boot/grub/grub.cfg of Ubuntu here

Tell us your original set up like if Xp occupied the full hard disk, do you have an manufacturer's utility partition etc.


----------



## g.ramesh (May 8, 2003)

saikee said:


> I need you to paste the output of
> 
> ```
> sudo fdisk -l
> ...


Output of fdisk -l is as below

sudo fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa3c6a3c6


```
Device      Boot      Start         End      Blocks       Id    System
/dev/sda1               2            14692   118005427     f    W95 Ext'd (LBA)
/dev/sda2    *         14693        34944   162668544     7   HPFS/NTFS
/dev/sda3              34944        35187     1952768     82   Linux swap / Solaris
/dev/sda4              35187        38914    29935616     83   Linux
/dev/sda5                 2          14692   118005426     7    HPFS/NTFS
```



> You can boot up Ubuntu which will mount sda2 under the name you used in Xp and post the content of boot.ini here.


the boot .ini contents are below:

;

;Warning: Boot.ini is used on Windows XP and earlier operating systems.

;Warning: Use BCDEDIT.exe to modify Windows Vista boot options.

;

[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" /NOEXECUTE=OPTIN /FASTDETECT



> I don't suppose you know which partition holds which system. From your description you had Xp to start with and then added Win7 and Ubuntu.
> Your current problem is that while WIn7 and Ubuntu boot the Xp in the sda2 doesn't.


double true!



> (2) Post boot.ini in sda2 here and also show us the contents of directory of sda2 which should have \boot and bootmgr for booting Win7 plus boot.ini, NTLDR and possibly NTdetect.com for booting Xp.


boot.ini output is give above and the contents of directory of sda2 are


```
/media/C$ ls
AUTOEXEC.BAT  BOOTSECT.BAK            IO.SYS         $RECYCLE.BIN
Boot          bootsqm.dat             MSDOS.SYS      RECYCLER
Boot.BAK      CONFIG.SYS              MSOCache       System Volume Information
boot.ini      Documents and Settings  NTDETECT.COM   TTAdvance
  Game                    ntldr          WINDOWS
bootmgr       Intel                   Program Files  Wonderland Demo v1.12
```
*or in long form*

```
/media/C/Boot
/media/C/Documents and Settings
/media/C/Game
/media/C/Intel
/media/C/MSOCache
/media/C/Program Files
/media/C/$RECYCLE.BIN
/media/C/RECYCLER
/media/C/System Volume Information
/media/C/TTAdvance
/media/C/WINDOWS
/media/C/Wonderland Demo v1.12
/media/C/AUTOEXEC.BAT
/media/C/boot.ini
/media/C/Boot.BAK
/media/C/bootmgr
/media/C/BOOTSECT.BAK
/media/C/bootsqm.dat
/media/C/CONFIG.SYS
/media/C/IO.SYS
/media/C/MSDOS.SYS
/media/C/NTDETECT.COM
/media/C/ntldr
```



> However you have also do more changes to the partitions to make them boot so I am a bit lost especially on your original partition layout and I doubt if you know it yourself.


very much true



> (3) Post /boot/grub/grub.cfg of Ubuntu here


I do not know what happened to the file boot.cfg, I have seen earlier in this folder now it is not there. What is available when I issue find command is


```
/boot$ sudo find . -name boot*
./grub/boot.mod
./grub/boot.img
```



> Tell us your original set up like if Xp occupied the full hard disk, do you have an manufacturer's utility partition etc.


Yes initially the XP occupied full hard disk, then I think I used partition magic to create other partitions. I do not have a manufacturer's utility partition


----------



## g.ramesh (May 8, 2003)

I stumbled upon bootscript from sourceforge.net ( http://bootinfoscript.sourceforge.net/ ) and Results.txt is u/l and link is

http://www.4shared.com/document/Ya7SScVL/RESULTS.html
Please see.


----------



## lewmur (Sep 11, 2006)

Somehow or another, you converted the XP partition from primary to logical. You have to be very careful in changing it back because you could lose ALL the partitions. Your safest bet is to create an image of sda5, delete it, then delete sda1. Then create a new primary partition in the freed space. Finally, restore the image to what should now be sda1.


----------



## saikee (Jun 11, 2004)

From your boot.ini

```
default=multi(0)disk(0)rdisk(0)partition([B][COLOR="Red"]1[/COLOR][/B])\WINDOWS

[operating systems]

multi(0)disk(0)rdisk(0)partition([B][COLOR="Red"]1[/COLOR][/B])\WINDOWS="Microsoft Windows XP Professional" /NOEXECUTE=OPTIN /FASTDETECT
```
This would suggest that when your Xp was installed it was in the 1st partition and that should corresponds to sda1.

Thus you need to change the number *1* to *2* to reflect its new position in sda2 and not the original sda1. You can do it in Linux by using the nano editor by command
"sudo nano <full filename>"

As I predicted your sda2 is the booting partition for both Win7 and Xp as it has \boot, boomgr, NTLDR, NTDECT.com and boot.ini.

If your Win7 boots alright then the boot sector of sda2 will have the Win7 booting code and that is normal. The Xp in this case will be indirectly booted by bootmgr as described below:

The booting process starts with Grub2 in the MBR. When you select Windows from the Grub's menu then Grub2 loads the boot sector code of sda2 into memory. The boot sector code of Win7 only loads bootmgr and nothing else. The bootmgr then has its own menu inside which Xp is either named as "Older version of Windows" or simply "Xp home" etc. If Xp is selected then bootmgr will load the NTLDR which has the booting menu described by boot.ini. Therefore in booting Xp you have to go through Grub2 and Win7 bootloaders first. The required NTLDR is inside sda2. It is not missing or corrupt but the reported error is just generic.

My suggestion is to use Linux to edit the boot.ini and change the partition reference as suggested above. You save the file but check it with Win7 to see if it has been hidden. Sometimes editing a hidden file with Linux can result the file in showing up in Windows and so you may need to hide it again with command (in Win7 command prompt)

```
attrib +r +s +h boot.ini
```
At this stage I would try correcting boot.ini and only proceed to rebuild the bcd if this fails.

By the way the Grub file I requested is /boot/grub/grub.cfg, not boot.cfg.


----------



## g.ramesh (May 8, 2003)

> Thus you need to change the number 1 to 2 to reflect its new position in sda2 and not the original sda1


I am trying it right now.



> By the way the Grub file I requested is /boot/grub/grub.cfg, not boot.cfg.


I am extremely sorry to miss it. The grub.cfg contents are


```
/boot/grub$ more grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  set saved_entry=${prev_saved_entry}
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z ${boot_once} ]; then
    saved_entry=${chosen}
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfa
il; fi; fi
}
insmod ext2
set root='(hd0,4)'
search --no-floppy --fs-uuid --set 2d89a664-cef7-4043-8211-449863a0026f
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
insmod ext2
set root='(hd0,4)'
search --no-floppy --fs-uuid --set 2d89a664-cef7-4043-8211-449863a0026f
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linu
x --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,4)'
	search --no-floppy --fs-uuid --set 2d89a664-cef7-4043-8211-449863a0026f
	linux	/boot/vmlinuz-2.6.32-21-generic root=UUID=2d89a664-cef7-4043-821
1-449863a0026f ro   quiet splash
	initrd	/boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu 
--class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,4)'
	search --no-floppy --fs-uuid --set 2d89a664-cef7-4043-8211-449863a0026f
	echo	'Loading Linux 2.6.32-21-generic ...'
	linux	/boot/vmlinuz-2.6.32-21-generic root=UUID=2d89a664-cef7-4043-821
1-449863a0026f ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod ext2
	set root='(hd0,4)'
	search --no-floppy --fs-uuid --set 2d89a664-cef7-4043-8211-449863a0026f
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod ext2
	set root='(hd0,4)'
	search --no-floppy --fs-uuid --set 2d89a664-cef7-4043-8211-449863a0026f
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda2)" {
	insmod ntfs
	set root='(hd0,2)'
	search --no-floppy --fs-uuid --set 3aa81531a814ecdf
	chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
```


----------



## g.ramesh (May 8, 2003)

I tried changing 1 to 2 in boot.ini and tried to boot into XP the same error as below is displayed:


```
" Windows failed to start. A recent hardware or software change might be the cause. To fix the problem:
1. Insert your windows installation disc and restart your computer.
2. choose your language settings and then click "NEXT"
3.Click "Repair" your computer.

If you do not have this disc, contact your system administrator or computer manufacturer for assistance.

File: \ntldr
Status: OX0000225

Info: The selected entry could not be loaded because the application is missing or corrupt. "
```
Also please see the attached thumbnails, in ubuntu XP is shown as C where as in Win7 D:, can we get a clue from this?


----------



## lewmur (Sep 11, 2006)

From the "results.txt" you posted;



> ;Warning: Boot.ini is used on Windows XP and earlier operating systems.
> 
> ;Warning: Use BCDEDIT.exe to modify Windows Vista boot options.
> 
> ...


This says XP should be on the first partition of the HDD.



> Partition Boot Start End Size Id System
> 
> /dev/sda1 16,126 236,026,979 236,010,854 f W95 Ext d (LBA)
> /dev/sda5 16,128 236,026,979 236,010,852 7 HPFS/NTFS
> ...


This says that that partition has been converted to a logical partition. It is now the the fifth partition instead of the first. I don't think XP is going to boot from a logical partition no matter what you put in the grub entry.


----------



## saikee (Jun 11, 2004)

*lewmur,*

I deliberately installed my Win2k, Xp, Vista and Win7 in logical partitions so that I could use a Dos primary partition to boot all of them.

All the above MS Windows will boot if there is an active primary partition detected first.

As a stand alone system, that is without the assistance of a "c" drive, none of them can be booted from a logical partition. The sda1 is an extended partition that has no storage of its own and no boot sector. Its logical partition sda5 will be detected only after sda2, sda3 and sda4. Since sda3 is a swap and sda4 is a Linux partition the next partition recognised by MS Windows is sda5 and it would be given the drive letter "D".

*g.ramesh,*

Your grub.cfg confirms the bootable partition for Windows is indeed sda2 (by virtue of the statement "set root='(hd0,2)'".

There could be one serious fault with your Xp and that is if you used virtual memory then there will be immovable files inside the Xp partition. By moving partition on a different location and change the size of it you might have inadvertently rendered it unbootable because you destroyed the system integrity inside. It may be nothing serious but Xp could not understand what has gone wrong and so it refuses to boot so that you can salvage the situation. The immovable files will show up if you defrag the partition. Had you not used the virtual memory, which has paging files, Xp might have accepted the change of partition location as your XP drive letter is still "C" and has not been compromised.

If my prediction is correct then a re-installation may be the only way and this will blow away your Win7 too. The Gparted does not known the importance of the immovable files and the relative positions would be correct. It is just Xp that refuses to play ball. May be the immovable files are called by their hard disk addresses so putting them in different locations will not work. In general a Xp partition or any other MS Windows should be increased in size by moving its right boundary only. This only changes the filing indexing system (like the contents pages of a book) and no file needs to change position.

Before embarking a re-installation you can try one more time with rebuilding the Win7 BCD on the NTLDR. You can do it by booting the Win7 installation DVD, click repair, opt for the Command prompt and issue this command at the terminal

```
bootrec /rebuildbcd
```
The above command only makes Win7's bootmgr rebuild the booting entries of Win7 and Xp's NTLDR from scratch. It will make a fresh connection between the boot loaders.

I am not hopeful that the above command works but it would be the last thing I would attempt.

If you re-install Xp the following will happen. 
(1) Xp's MBR will over write Grub2 and so you lose Ubuntu temporarily.
(2) Xp has its own boot sector code replacing the existing one from Win7. 
(3) Once re-install Xp you lose both Win7 and Ubuntu. This unavoidable due to the behaviour of the Xp installer.
(4) You have to satisfy Xp running alright in sda2 (C drive in Xp) first and then reinstate Win7 boot loader as follow

(i) boot up Win7 installation DVD, select Repair and opt for Command prompt
(ii) issue the following commands at the terminal

```
bootsect /nt60 c:
bootrec /fixmbr
bootrec /rebuildbcd
```
The first is to replace Xp's boot sector code (/nt52) with the Win7 version of (nt/60). The second line is to install Win7's own MBR and the third line is to rebuild the BCD to boot Win7 and Xp. Win7's boot menu configuration is now in binary form and cannot be edited. To rebuild it is the only way unless you use third party software like EasyBCD.

(5) When you get Xp and Win7 back your Ubuntu is still unbootable because the MBR must be replaced by Grub2's own version. You do this by booting the Ubuntu CD, select terminal and issue these commands

```
sudo mkdir /mnt/sda4
mount /dev/sda4 /mnt/sda4
grub-install --root-directory=/mnt/sda4 /dev/sda
```
The first line is to make a mount point /mnt/sda4. The second line is to mount the device sda4 on it. The third line instructs Grub2 that the loacation of root directory and install Grub2 in device sda which the whole disk or the MBR of disk sda.

You then should have the triple boot back.


----------



## TheOutcaste (Aug 8, 2007)

I think you are missing one letter in the error message, Windows Status codes are always 8 digits, the 0X prefix means it's hexadecimal.
does it actually show this:

```
File: \ntldr
Status: 0X[COLOR=Red][B]C[/B][/COLOR]0000225
```
This error is coming from the Win 7 Boot Loader, it can't find the ntldr file on partition 1; it's now on partition 2.

Not only do you need to edit the Boot.ini, you need to edit the Win 7 BCD store as well.

Easiest is to boot to Win 7, then use EasyBCD to remove the old XP entry, and add the correct one pointing to the partition that XP is now on.


----------



## g.ramesh (May 8, 2003)

TheOutcaste said:


> I think you are missing one letter in the error message, Windows Status codes are always 8 digits, the 0X prefix means it's hexadecimal.
> does it actually show this:
> 
> ```
> ...


I am sorry I missed the letter "c" in error report.
I tried changing partition 1 to partition 2 but when tried to boot into XP the same error is showing.

My boot.ini contents are as below:


```
;

;Warning: Boot.ini is used on Windows XP and earlier operating systems.

;Warning: Use BCDEDIT.exe to modify Windows Vista boot options.

;

[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="Microsoft Windows XP Professional" /NOEXECUTE=OPTIN /FASTDETECT
```
Also from above posted thumbnails any clue we can get please?


```
Not only do you need to edit the Boot.ini, you need to edit the Win 7 BCD store as well.

Easiest is to boot to Win 7, then use [URL="http://neosmart.net/dl.php?id=1"]EasyBCD[/URL] to remove the old XP entry, and add the correct one pointing to the partition that XP is now on
```
I installed EasyBCD and when run the first secree shot taken under " View Settings " are attached below: Please see


----------



## g.ramesh (May 8, 2003)

Hi saikee
Thanks for your reply. I will try those options as a last resort.


----------



## TheOutcaste (Aug 8, 2007)

The first EasyBCD Screen shows that the *ntldr* entry refers to a deleted partition. Instead of *Device: Deleted Partition*, it should show *Drive: D:\*
You need to delete that entry, then add a new one for Windows XP
I'm guessing that when you boot into Win 7, that the *ntldr* and *boot.ini* files are on drive *D:*, do I wll use that letter.
Click *Edit Boot Menu*
Select the *Earlier version of Windows* entry so it is highlighted
Click *Delete*

Click *Add New Entry*
Select *Windows NT/2k/XP/2k3* for the Type
You can let it Automatically detect the drive, or specify the drive, which will use the new Easyldr file documented on the EasyBCD site
To Specify and use *easyldr*:
Uncheck *Automatically detect correct drive*.
Select Drive *D:\*

Click *Add New Entry*.

The status bar at the bottom should indicate the entry was added successfully.

Click on *View Settings*, and the *Microsoft Windows XP entry* entry should have *Drive: D:\* shown instead of *Deleted partition* for the device.
Looks like this newest version will put a copy of *ntldr*, or a file named *easyldr1* into a folder called *NST* in the root of the XP Partition. If you don't want that, you can download the older 1.7.2 version, or use Windows command line *bcdedit.exe* file to add the entry.

The screen shots show my working one before changing it with EasyBCD, and the changed one after deleting and create a new entry


----------



## g.ramesh (May 8, 2003)

TheOutcaste said:


> The first EasyBCD Screen shows that the *ntldr* entry refers to a deleted partition. Instead of *Device: Deleted Partition*, it should show *Drive: D:\*
> You need to delete that entry, then add a new one for Windows XP
> I'm guessing that when you boot into Win 7, that the *ntldr* and *boot.ini* files are on drive *D:*, do I wll use that letter.
> Click *Edit Boot Menu*
> ...


*It worked brilliantly * :up: *Thanks a ton TheOutcaste. Thanks a lot.
*
( Before reading your post I changed in the EasyBCD from Device: Deleted Partition to Drive: D:\ thru the Advanced settings menu and tried to boot into xp, The error it shown is 
" Windows could not start becausethe following file is missing or corrupt.
<Windows rott>\system32\hal.dll 
Please reinstall a copy of the above file. "
I was planning to post this message, by that time your above post came, *Thanks a lot again*:up: )

Thanks to* saikee* and others.


----------



## g.ramesh (May 8, 2003)

Hi after EasyBCD has done its work I took some screen shots in XP/Win 7/Ubuntu. 
Why the drive letters are differing in XP and Win7 (please see the attached thumbnails, [of course this is not creating any problem to me] )


----------



## TerryNet (Mar 23, 2005)

With Windows A is reserved for a floppy drive, B for a second floppy and C (except when things get really messed up) for the partition in which the booted Windows is installed. After that partitions are given drive letters as they are initially seen--seems to favor hard drives first, optical drives second.

Since typically another hard drive partition or two is added after the first install and before the second install in a dual boot the optical drive will have an earlier drive letter for the first install than for the second installed Windows.

Naming your partitions to look like Windows drive letters will be redundant at best and often leads to confusion, as shown in your 4th screen shot. Better to give them more meaningful names, such as Windows XP or W7Ult or Data.


----------



## TheOutcaste (Aug 8, 2007)

You have 4 partitions:

```
Logical - Partition 1 - 112.54 Win 7 (labeled E)
Primary - Partition 2 - 155.13 XP    (labeled C)
Primary - Partition 3 -   1.86 Linux Swap
Primary - Partition 4 -  28.55 Linux
```
Partition 2 is the Active Partition, so it is the System Volume for both XP and Win 7. It is also the Boot Volume for XP.
Partition 1 is the Boot Volume for Win 7. This is a Logical Drive inside the Extended partition, Linux shows them separately, as SDA1 for the partition, and SDA5 for the Logical Drive

*NT/2K/XP/2K3* - Drive letter C: is assigned to the System Volume. This is the partition that contains the files that boot the System: *ntldr*, *ntdetect.com*, *boot.ini*. It is always the first Active partition that the BIOS finds.

*Vista and later* - Drive letter C: is assigned to the Boot Volume. This is the partition that contains the OS files you booted into, i.e., the Windows folder.

The System and Boot volumes can be on the same partition, or can be different. The drive letters assigned during setup cannot be changed.

As the drive letters are written to the Windows Registry during Setup, adding a drive or partition doesn't re-assign the letters that Windows sees, though the letters the BIOS sees can change, as the BIOS enumerates drives and partitions on each boot.

This also means the drive letters seen booting to a different OS, or to a live CD can be different than what is seen in another OS.

Under Linux, the Windows partitions are shown using this format:
*Drive Description:Partition Label*

So you have to remember that the *C* in *320 GB Hard Drive: C* is a label, not a drive letter.
As TerryNet says, using a more descriptive Partition Label can help avoid confusion.


----------



## TerryNet (Mar 23, 2005)

> NT/2K/XP/2K3 - Drive letter C: is assigned to the System Volume. This is the partition that contains the files that boot the System: ntldr, ntdetect.com, boot.ini. It is always the first Active partition that the BIOS finds.


Ahhhh! So, this is why sometimes Windows is installed to D or some drive other than C. It's not a case of "really messed up" as I called it. Thanks!


----------



## TheOutcaste (Aug 8, 2007)

Well, "really messed up" often seems a very apt description unfortunately. I just wish Windows would force you to give each partition a unique label. Would help when you have two or more partitions that are the same size.


----------



## g.ramesh (May 8, 2003)

TheOutcaste said:


> You have 4 partitions:
> 
> ```
> Logical - Partition 1 - 112.54 Win 7 (labeled E)
> ...


Very informative, thanks a lot. In that case need I to change the descriptive partition label in each OS separately ? I hope changing label will not affect booting process again  

Can I trouble you with one more problem ?

Please see the attached thumbnail, even after updating the chipset drives with latest available from Asus site everytime I boot in it is showing in device manager,
My M/B is from Asus.The location is showing as

'on Intel(R) ICH7 Family LPC Interface Controller - 27B8"


----------



## TheOutcaste (Aug 8, 2007)

Is this only in XP, or are there also errors in Win 7?

What is the model number of the Motherboard?

Hard to say what this might be, I've found different solutions, including disabling InfraRed in the BIOS, Installing an older driver version, installing the ASUS Probe II utility, Updating the BIOS (last thing to try, and only if the error is actually causng a problem).

Is there anything that is NOT working? that might help determine the cause.

You can also try running the Intel Driver Update utility, see if it can find a suitable driver:
Intel Driver Update Utility


----------



## g.ramesh (May 8, 2003)

TheOutcaste said:


> Is this only in XP, or are there also errors in Win 7?
> 
> What is the model number of the Motherboard?
> 
> ...


Oh thanks again. 
1. Previously same error was showing in Win 7 also, but now it is not showing. (previously taken screenshot is at : http://www.4shared.com/photo/yfnVvqpa/screen1.html" )
2. Mother board is Asus make: JOOYON Ver 1.4 P5KPL-VM MYEDU.
3.All are working, no problem with devices.
4.Asus probe II utility did not show any error.


----------



## rickyjo (Jun 24, 2008)

Do you have service pack 3 installed? If you don't I would go ahead and install it, sometimes this kind of quirkiness gets worked out when you update your service pack or run system file checker (sfc.exe/scannow with the windows xp disc in the drive). If you use sfc.exe you will have to reload your service packs afterwards. 

But honestly, my usual solution to these issues (on my own systems, not those I'm working on for others) is to disable the unknown device so it stops hassling me every time I boot windows and if I ever see an actual problem I fix it then. In my experience if there's no significant problem now you probably won't find one.


----------



## g.ramesh (May 8, 2003)

rickyjo said:


> Do you have service pack 3 installed? If you don't I would go ahead and install it, sometimes this kind of quirkiness gets worked out when you update your service pack or run system file checker (sfc.exe/scannow with the windows xp disc in the drive). If you use sfc.exe you will have to reload your service packs afterwards.
> 
> But honestly, my usual solution to these issues (on my own systems, not those I'm working on for others) is to disable the unknown device so it stops hassling me every time I boot windows and if I ever see an actual problem I fix it then. In my experience if there's no significant problem now you probably won't find one.


thanks for your reply, yes service pack 3 is installed.


----------



## TheOutcaste (Aug 8, 2007)

I checked the Intel_Chipset_V9111019_XPVistaWin7 driver found on the ASUS Website, and it does include the driver for that item. It's listed in the INF file:
*PCI\VEN_8086&DEV_27B8.DeviceDesc ="Intel(R) ICH7 Family LPC Interface Controller - 27B8"*
So it should have the driver installed. Found one reference on the web were they resolved this by using the older driver from the driver CD, so you might try one of the older drivers, though unless there is something not working I think I'd just leave it be.

The error message says the device is not configured correctly, so there may be a BIOS setting that is causing this, but I don't know what it would be specifically.

The LPC interface is the replacement bus for the old ISA bus, and is used to communicate to low bandwidth legacy devices like Serial, InfraRed (IR), and parallel ports, Floppy Disk Controller, keyboard, mouse.

One suggestion I found was to disable IR in the BIOS, but this board doesn't appear to have IR.

You may want to go through the BIOS settings and compare them to the default settings shown in the User Guide and note any that have been changed. Then on the *Exit* screen, use the *Load Setup Defaults* option to reset everything. I'd do this even if everything appears to already be set to the default, as a corrupt setting might still show correctly in here.
Reboot and check, and redo any settings that wre not set to default if needed.

Or you can clear the BIOS settings by removing the battery and using the jumper as shown in the User Guide.


----------



## g.ramesh (May 8, 2003)

TheOutcaste said:


> I checked the Intel_Chipset_V9111019_XPVistaWin7 driver found on the ASUS Website, and it does include the driver for that item. It's listed in the INF file:
> 
> One suggestion I found was to disable IR in the BIOS, but this board doesn't appear to have IR.
> 
> ...


thanks for your reply, I d/l above chipset version and applied still same error is showing. Will try the BIOS later.


----------

