ubuntu boots fine but not XP

Asked by Russ Montello

Installed ubuntu 8.1 on a SATA drive that the first partition ( about 100 GB) contains XT and unbuntu is installed at the end of the drive ( there is some free space between them). Unbuntu boots fine but not XP. Its been some time since I used unix, so I am at a loss as to what to change to make it work. I don't think I interfered with XP during the ubuntu install. I hope there is some simple file I can edit to get an option to boot XP.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
Russ Montello
Solved:
Last query:
Last reply:
Revision history for this message
Andres Rodriguez (andreserl) said :
#1

What seems to be the problem while booting XP. Does it display any message or something?

Revision history for this message
Andres Rodriguez (andreserl) said :
#2

What seems to be the problem while booting XP. Does it display any message or something?

Revision history for this message
Russ Montello (remontello) said :
#3

When I press ESC to choose the OS, the options I get are
ubuntu kernel
ubuntu recovery mode
ubuntu memtest

No option for XP!

I noticed that others have listed their file boot/grup/menu.lst, so mine follows. I also noticed that I am not super user when I bring up the system, and when I su to gain that priviledge, the password I gave for my account does not work. Is there a default password for su?

Thanks for any help. I plan to learn ubuntu, but I hope to get it installed and operatiing with XP first!

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

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

## 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=88588e71-296a-4075-b429-b5ddf6e70ff2 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=88588e71-296a-4075-b429-b5ddf6e70ff2

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

## 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 8.10, kernel 2.6.27-7-generic
uuid 88588e71-296a-4075-b429-b5ddf6e70ff2
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=88588e71-296a-4075-b429-b5ddf6e70ff2 ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet

title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
uuid 88588e71-296a-4075-b429-b5ddf6e70ff2
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=88588e71-296a-4075-b429-b5ddf6e70ff2 ro single
initrd /boot/initrd.img-2.6.27-7-generic

title Ubuntu 8.10, memtest86+
uuid 88588e71-296a-4075-b429-b5ddf6e70ff2
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

Revision history for this message
Andres Rodriguez (andreserl) said :
#4

Hello:

What you should do first is verify where you have installed Win XP. What I'm guessing is that you have it on sda1 right? If so, add this at the end of /boot/grub/menu.lst:

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

Once you add this do:

sudo update-grub

And reboot your machine and you will have the WinXP Booting Option.

Revision history for this message
Russ Montello (remontello) said :
#5

How do I use ubuntu to verify where XP is installed? I have looked at the programs in the application and system menus, and don't see anything that displays partitions or filesystem designations. Obviously I can't get into the more familar XP to check! Also I can't change boot/grup/menu.lst without gain supervisor priviledges! Again is there a default password in ubuntu to su?

Revision history for this message
Andres Rodriguez (andreserl) said :
#6

Ok first of all if you want to check the partitio table use:

sudo fdisk -l

It will ask for a password, the password is the one of your username. The output of that command should be something like this:

/dev/sda1 * 1 3188 25600000 7 HPFS/NTFS
/dev/sda2 3189 9412 49994280 7 HPFS/NTFS
/dev/sda5 9413 15637 50002281 83 Linux
/dev/sda6 15638 15886 2000061 82 Linux swap / Solaris
/dev/sda7 15887 22111 50002281 83 Linux
/dev/sda8 22112 28443 50861758+ 83 Linux

In my caste, it shows that sda1 is HPFS/NTFS. I'm guessing that that's the same case for you, and if it's so, windows XP is surely installed in /dev/sda1.

Now, to make the changes in /boot/grub/menu.lst do as follows in a termimal:

gksudo /boot/grub/menu.lst

it will ask you for a password, which is the same as your username password. Add the changes as specified in my previous comment and see what happens. If you want, paste me the ouput of 'sudo fdisk -l'.

Regards,

Andres.

Revision history for this message
Russ Montello (remontello) said :
#7

Thank for your help Andres. I have made some progress. I made the changes you suggested and got an option to boot XP, but got an error message like
"error 12; invalid device request"

The result of my fdisk command looks like:

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xc9d8c9d8

   Device Boot Start End Blocks Id System
/dev/sda1 2 12749 102398310 f W95 Ext'd (LBA)
/dev/sda2 * 15830 16709 7068600 b W95 FAT32
/dev/sda3 18960 19457 4000185 82 Linux swap / Solaris
/dev/sda4 16710 18959 18073125 83 Linux
/dev/sda5 2 12749 102398278+ 7 HPFS/NTFS

The end of my /boot/grup/menu.lst now looks like:

title Ubuntu 8.10, kernel 2.6.27-7-generic
uuid 88588e71-296a-4075-b429-b5ddf6e70ff2
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=88588e71-296a-4075-b429-b5ddf6e70ff2 ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet

title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
uuid 88588e71-296a-4075-b429-b5ddf6e70ff2
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=88588e71-296a-4075-b429-b5ddf6e70ff2 ro single
initrd /boot/initrd.img-2.6.27-7-generic

title Ubuntu 8.10, memtest86+
uuid 88588e71-296a-4075-b429-b5ddf6e70ff2
kernel /boot/memtest86+.bin
quiet

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

### END DEBIAN AUTOMAGIC KERNELS LIST

Thanks for all your help

Revision history for this message
Andres Rodriguez (andreserl) said :
#8

Ok. so, have you installed WinXP over a Fat32 Partition or over a NTFS partition?

If you have installed it on a FAT32 partition change 'root (hd0,0)' to 'root (hd0,1)'.

If you have installed it on a NTFS partition, change it to 'root (hd0,4)'.

Please try and let me know :).

Revision history for this message
Russ Montello (remontello) said :
#9

It is installed in an NTFS partition, so I used "root (hd0,4)" but got the same message:
error 12; invalid device request. The end of my boot/grub/menu.lst now looks like

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

Revision history for this message
Russ Montello (remontello) said :
#10

I was just looking at the results of fdisk and thinking about the installation of XP. I believe that there was a very small partition on the drive ( perhaps put on by the drive manufactor) of only a few MB. So XP may be on the second partition. Also according to fdisk HPFS/NTFS in dev/sda5. Not sure what that means, but I seem to remember that when XP the partition was reported in a similar fashion.
Thanks again for your help

Revision history for this message
Andres Rodriguez (andreserl) said :
#11

And did it work with root (hd0,1) ?

Revision history for this message
Russ Montello (remontello) said :
#12

When I used root (hd0,1), I got "Starting Up ...", but it remained frozen and did not start XP.

 Let me give you a little background.
I allready had an XP system installed with two logical ( one physical drives), which I believe got eaten with a virus. When I reinstalled XP, I noticed the drive started with a small 7.8 MB partition which I could delete, so I instead, installed XP in the next 100GB partition which was 20 some GB smaller than the original. I left the second logical drive in place which followed the 20 unallocated GB.

After the install, I removed all data from the second logical drive and tried to remove it with in XP, but it wouldn't allow me to. So I had a 23 GB empty space between the two NTFS partitions. The first with the XP installed and the second from the old install ( used only for data).

I then installed ubuntu fromt he CD. I had 20 GB of free space at the end of the drive. I used the very end for swap. The first part of the 20 GB for ext3 ( which must be the ubuntu OS and apps. I removed the second logical drive and installed a fat32 file system for ubuntu.

So physically I have have
 a small unallocated partition
XP in a NTFS filesystem which seems to be reported as /dev/sda1 and /de/sda5
a 23 GB unallocated file system
/dev/sda2 fat32 for ubuntu which was the old 7.8 filesystem I previously used in XP for data
/dev/sda3 ext3
/dev/sda4 linux swap

Revision history for this message
Russ Montello (remontello) said :
#13

I gave up and reinstalled XP. Don't think I have the courage to try again. I did leave a 50 GB space unpartitioned at the end of the drive if I do get brave.
Thanks for the help Andres

Revision history for this message
Andres Rodriguez (andreserl) said :
#14

Well i was going to recommend you the same thing :).

No problem :).

Andres,