ubuntu / vista boot loader problem

markv

Member
Hi all
I have a problem with my xp / ubuntu box. First of all some history, I loaded Vista a long time ago on a seperate disk to the existing xp install, hated it and overwrote vista with ubuntu. No problem as ubuntu grub just put vista loader in as an option and I could go to there and choose "a previous version of windows" which i did as vista was no longer there. I recently had problems with my ubuntu setup, which had been upgraded to 9.04, and i did a new install. everything looked ok, grub had an entry for vista, looked a bit different to before but no problem, ubuntu booted fine. However when I try to load xp via the vista loadeer, expecting to see the "previous version of windows" all i get is the error 13 and nothing happens. Now I assume that if I still had vista on i could rewrite the vista boot loader using the vista tool, can't remember the name, but as i can't boot into any windows I am stuck. Where do i go from here? I could copy everything off onto external drive and start again but would rather not.
Hope you can help
Mark

Addendum:

output from fdisk:
Disk /dev/sda: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0b46ed7a

Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 23490 188482612+ 5 Extended
/dev/sda5 13765 23490 78124063+ 83 Linux
/dev/sda6 26 511 3903732 82 Linux swap / Solaris
/dev/sda7 512 6590 48829536 83 Linux

Partition table entries are not in disk order

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x7b247b24

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13193 105972741 7 HPFS/NTFS
/dev/sdb2 13194 24321 89385660 5 Extended
/dev/sdb5 13194 24321 89385628+ 7 HPFS/NTFS

Disk /dev/sdc: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000264e4

Device Boot Start End Blocks Id System
/dev/sdc1 * 32104 32243 1124550 83 Linux
/dev/sdc2 2 48641 390700800 5 Extended
/dev/sdc5 2 32103 257859283+ 7 HPFS/NTFS
/dev/sdc6 32244 32659 3341488+ 83 Linux
/dev/sdc7 32660 33168 4088511 82 Linux swap / Solaris
/dev/sdc8 33169 34187 8185086 83 Linux
/dev/sdc9 34188 48641 116101723+ 83 Linux

Partition table entries are not in disk order
 
Last edited:
Hi Mark, welcome to NST.
You don't need the Vista bootmgr to boot XP with grub.
You can just put an entry resembling this

title XP 32 bit
find --remap-root /ntldr
find --set-root /ntldr
chainloader /ntldr
boot

or this

title XP 32 bit
root (hd1,2)
chainloader/ntldr
boot

into your ubuntu boot/grub/menu.lst

The root (hdx,y) in the second example points to the disk(x) and partition(y) of your XP.
The first example finds the XP bootloader itself.
 
Hi Terry
This is my my current menu.lst:
markv@ubuntu-desktop:~$ cat menu.lst
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 6


## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=8214c600-313e-4544-93f4-180a1e8af101 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=a1bc6154-dba5-42ad-b764-f4911e7485a6

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 9.04, kernel 2.6.28-13-generic
uuid a1bc6154-dba5-42ad-b764-f4911e7485a6
kernel /vmlinuz-2.6.28-13-generic root=UUID=8214c600-313e-4544-93f4-180a1e8af101 ro quiet splash
initrd /initrd.img-2.6.28-13-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-13-generic (recovery mode)
uuid a1bc6154-dba5-42ad-b764-f4911e7485a6
kernel /vmlinuz-2.6.28-13-generic root=UUID=8214c600-313e-4544-93f4-180a1e8af101 ro single
initrd /initrd.img-2.6.28-13-generic

title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid a1bc6154-dba5-42ad-b764-f4911e7485a6
kernel /vmlinuz-2.6.28-11-generic root=UUID=8214c600-313e-4544-93f4-180a1e8af101 ro quiet splash
initrd /initrd.img-2.6.28-11-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid a1bc6154-dba5-42ad-b764-f4911e7485a6
kernel /vmlinuz-2.6.28-11-generic root=UUID=8214c600-313e-4544-93f4-180a1e8af101 ro single
initrd /initrd.img-2.6.28-11-generic

title Ubuntu 9.04, memtest86+
uuid a1bc6154-dba5-42ad-b764-f4911e7485a6
kernel /memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sdb1
title Windows Vista (loader)
rootnoverify (hd1,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
I have tried the your 2nd suggestion, just going to try your first!


Addendum:


both suggestions don't work unfortunately. One gives error 15 the other gives an error 8 saying that the kernel must be loaded first.
 
Last edited by a moderator:
You need to use "map" lines in your XP entry, since its on another hard drive, so it would be something like this:

title Windows XP
root (hdx,y)
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader /ntldr
where "x" and "y" are replaced with the correct drive and partition numbers your XP partition has.
I'm not sure how Terry determined your values would be (hd1,2) because that would translate to sdb3 which according to your fdisk output, doesn't even exist! :brows: You only have one primary on that disk, one extended, and one logical, and the logicals start the count always at either 4 or 5 (depending on whether you use hdx,y or sdxy syntax, respectively).
I noticed you have 3 NTFS partitions, so that is why I'm not sure which one is your XP partition.

Jake
 
Last edited by a moderator:
Hi 007
I think that I want to boot from sdb1, would sound about right as sdb1 is marked as bootable, I have a system "disk", a stuff "disk" and a storage "disk" so that is hopefully sdb1, sdb5 & sdc5 in that order.
Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x7b247b24

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13193 105972741 7 HPFS/NTFS
/dev/sdb2 13194 24321 89385660 5 Extended
/dev/sdb5 13194 24321 89385628+ 7 HPFS/NTFS
so I do i want hd2,1 ? Or is it zero count and I need hd1,0?
I know it is all ok and still there cos I have used the ubcd and smart boot manager and can get to the vista boot loader and boot into xp ok, it is just the link between grub and the physical disk layout that is broken!
thanks for the guidance
 
Last edited by a moderator:
If its sdb1, that translates to
root (hd1,0)
since the count for both drives and partitions begin at 0 with that syntax. So yeah, go ahead, and try that, and XP should boot.
 
Last edited by a moderator:
no, sorry no boot. error 15: file not found. have also tried the next ntfs part on that disk with no luck. Looking at the size of the last ntfs I am 99% sure that must be my storage "disk" so am now completely lost. :x
 
I didn't say they were the correct values, I said "resembling this" and "The root (hdx,y) in the second example points to the disk(x) and partition(y) of your XP"
 
could it be confused cos i am telling it to look for ntldr and in fact it is the vista loader? are they called the same thing? do i need to be pointing it at a different named file instead. as far as i understand error 15 it looks like all the info is ok with regards to filesystem etc just the file it is looking for doesnt exist. Or perhaps I am barking up the wrong forest, let alone the wrong tree!
 
Look in the root of your XP partition (making sure your folder options are set thus) and see whether you have NTLDR, ntdetect.com and boot.ini (XP's boot files) or bootmgr and a boot folder (Vista's)
As long as the 1st 3 are there, you should be able to boot directly without needing to use Vista (if it still exists)
Error 15 is a file not found, indicating perhaps you've lost your NTLDR.
 
Hi Terry
Yes, I have ntldr, ntdetect.com and boot.ini in the root of the XP partition. I have mounted it on this ubuntu system and I can see all 3 files. here is my boot.ini file
; ;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 Home Edition" /FASTDETECT
as ntldr is there, is it a problem with boot.ini?


Addendum:


I am still confused in that I can use Smart Boot Manager and boot into the vista loader and choose XP from the choice of vista or "previous version of windows"


Addendum:


ok, also have the bootmgr file and boot folder in the xp root so having grub look for ntldr or bootmgr is failing.
 
Last edited by a moderator:
You need to change the rdisk(0) and partition(1) values to rdisk(1) instead in both lines if your XP disk is the second hard drive in your BIOS boot sequence, and first partition in the partition table of that hard drive
Also, please post a screenshot of your Disk Management window.
 
Last edited:
Hi. Have tweaked the rdisk etc values in boot.ini bot still no boot. I have downloaded easybcd and will have a play with that in xp, once i boot up using smart boot manager. thanks for all the commenst so far!
 
Replace the contents of your boot.ini file (ALL of it) with the following:
[boot loader]
timeout=0
default=multi(0)disk(0)rdisk(1)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP" /NoExecute=OptIn /fastdetect
and then save.
 
Hi
I have used easybcd and removed the vista loader completely. I now have a pc that boots quite happily into XP and i now only need to sort out ubuntu with grub so I can run linux when i want to. I will re-install ubuntu on the same partitions as before, home is a seperate partition so i can keep all my work safe!
Thanks for the help, i have looked at your site, www.multibooters.co.uk and i must say it is a very helpful site!
 
You can use Bootpart (found in the Bin folder of the "EasyBCD" directory) to add Ubuntu to the boot.ini file, and make it possible to dual-boot the two. Just open up EasyBCD>Useful Utilies>Power Console, and run the following commands:

Code:
bootpart
bootpart # C:\ubuntu.lnx "Ubuntu Linux"
where "#" is replaced with the correct number shown right next to the Ubuntu partition in the output of the first command.
 
Back
Top