Boot controler no longer has XP

Asked by patrick

I recently installed Ubuntu as a second operating system keeping XP on a different partition. Yesterday I updated Ubuntu and XP has disappeared from my boot controler. The XP partition still there but I cannot boot to it. I still do most of my work on XP. Help!!!!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu yelp Edit question
Assignee:
No assignee Edit question
Solved by:
Rob Sharp
Solved:
Last query:
Last reply:
Revision history for this message
Tony Yarusso (tonyyarusso) said :
#1

It would help if you said what bootloader you were using, and posted the relevant menu file.

Revision history for this message
Rob Sharp (qnm) said :
#2

Can you run 'sudo fdisk -l' (and enter your password if asked) and paste the output in a comment here please? We need to know what partition XP is on. If it's something like this:

(ignore the start and end numbers, we're interested in Device Boot and System)

   Device Boot Start End Blocks Id System
/dev/hda1 * 1 1275 10241406 7 HPFS/NTFS

then XP is on hda1. If XP is installed on a FAT32 partition, system may be VFAT (from memory).

Assuming XP is on hda1, you need to edit your menu.lst. I'm guessing you're using Grub, as you probably wouldn't installed a different bootloader. Try this command:

sudo nano /boot/grub/menu.lst

- If the editor opens with 'New File' towards the bottom of the terminal, let us know - theres no point in continuing yet!

Use the cursor keys to scroll to a section that looks like this:

## 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

Around there (anywhere, doesn't matter too much) paste in the following four lines

title Windows XP
root (hd0,0)
makeactive
chainloader +1

You can paste in a terminal window by right clicking in the terminal window and selecting 'paste'.

- Be careful to only add the four lines above and not change anything else!

Then save the file (CTRL-o, enter to confirm) and exit (CTRL-x).

When you reboot you should have Windows XP as an option.

Let us know how you get on.

Revision history for this message
Rob Sharp (qnm) said :
#3

The above comment has a bit of a formattting issue and I can't change it:

The output from 'sudo fdisk -l ' (without the quotes) should look like

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1275 10241406 7 HPFS/NTFS

Revision history for this message
Patrick (jpgoc) said :
#4

Thank you Rob. I'll get back to you after I've worked up that menu.lst.
Patrick

Revision history for this message
patrick (patrickhodgson) said :
#5

Thank everyone for all the help. I have ticked "Closed" on several occassions but am still getting reminder emails.
Basically I got inpatient and booted with to DOS and typed fdisk/mbr.
That worked a treat. I then reinstalled Ubuntu but I haven't updated.