LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Dual boot with ubuntu 9.10 and windows xp - xp just hangs upon selection (GRUB) (http://www.linuxquestions.org/questions/linux-general-1/dual-boot-with-ubuntu-9-10-and-windows-xp-xp-just-hangs-upon-selection-grub-776712/)

user1010 12-18-2009 12:22 PM

Dual boot with ubuntu 9.10 and windows xp - xp just hangs upon selection (GRUB)
 
Hi

This is my first post and I only first installed linux in June 2009, I've read through alot of articles and forums but felt that none of them really had the answer to my problem. So here it is:

I need XP to run itunes (amongst other things) but I really like using ubuntu. In June when I first installed Linux I moved xp to the back of the HD and installed linux at the front (in four partitions - boot, root, home and swap). This worked fine, the only problem being I could never get GRUB to come up on first starting up my pc. This meant I had to restart the pc if I wanted to use ubuntu. Not ideal!

The time came when xp was so corrupt that it needed reloading which was ok as I had a .tib image of the original OS. I also wanted to increase the size of my linux partitions as I decided I was no longer 'just trying it out'.

To cut a long story short, I ended up wiping my HD and doing a fresh install of xp. I then had to restore my .tib (using the C:/ drive) to unused space on my HD (and label it as a different letter as I was unable to restore the partition to the one I was using). Unfortunately the acronis boot disk does not boot otherwise I might have this problem sorted by now!I was then able to boot into my unblemished xp partition.

I then booted into the ubuntu live cd, moved XP to the back of the HD and again installed ubuntu as before into four partitions at the front of the HD (this time the root and home partitions were bigger in size). I then opened up ubuntu and upgraded to 9.10. I only tried to boot back into XP after all this (which was a mistake!)

I now experience two problems.
One - is that when I first turn on my pc it just hangs - no GRUB, ubuntu or xp!I have to restart it to get up the bootloader to enter ubuntu.

Two - if I try and boot into xp a message comes up saying 'starting up...' for about a second and then xp just hangs, no matter how long it is left for.

Here is my 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 0

## 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=3c964f0c-2927-4aef-b3be-0da0d3ee18f3 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=956153d8-0771-4b58-8d14-60577de1c748

## 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.10, kernel 2.6.31-16-generic
uuid 956153d8-0771-4b58-8d14-60577de1c748
kernel /vmlinuz-2.6.31-16-generic root=UUID=3c964f0c-2927-4aef-b3be-0da0d3ee18f3 ro quiet splash
initrd /initrd.img-2.6.31-16-generic
quiet

title Ubuntu 9.10, kernel 2.6.31-16-generic (recovery mode)
uuid 956153d8-0771-4b58-8d14-60577de1c748
kernel /vmlinuz-2.6.31-16-generic root=UUID=3c964f0c-2927-4aef-b3be-0da0d3ee18f3 ro single
initrd /initrd.img-2.6.31-16-generic

title Ubuntu 9.10, kernel 2.6.31-15-generic
uuid 956153d8-0771-4b58-8d14-60577de1c748
kernel /vmlinuz-2.6.31-15-generic root=UUID=3c964f0c-2927-4aef-b3be-0da0d3ee18f3 ro quiet splash
initrd /initrd.img-2.6.31-15-generic
quiet

title Ubuntu 9.10, kernel 2.6.31-15-generic (recovery mode)
uuid 956153d8-0771-4b58-8d14-60577de1c748
kernel /vmlinuz-2.6.31-15-generic root=UUID=3c964f0c-2927-4aef-b3be-0da0d3ee18f3 ro single
initrd /initrd.img-2.6.31-15-generic

title Ubuntu 9.10, kernel 2.6.28-11-generic
uuid 956153d8-0771-4b58-8d14-60577de1c748
kernel /vmlinuz-2.6.28-11-generic root=UUID=3c964f0c-2927-4aef-b3be-0da0d3ee18f3 ro quiet splash
initrd /initrd.img-2.6.28-11-generic
quiet

title Ubuntu 9.10, kernel 2.6.28-11-generic (recovery mode)
uuid 956153d8-0771-4b58-8d14-60577de1c748
kernel /vmlinuz-2.6.28-11-generic root=UUID=3c964f0c-2927-4aef-b3be-0da0d3ee18f3 ro single
initrd /initrd.img-2.6.28-11-generic

title Ubuntu 9.10, memtest86+
uuid 956153d8-0771-4b58-8d14-60577de1c748
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/sda2
title Microsoft Windows XP Professional
rootnoverify (hd0,1)
savedefault
makeactive
chainloader +1





And here is the windows boot.ini file if this helps:


[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" /fastdetect /noexecute=optin /usepmtimer


Sorry it is such a long post!
Thanks in advance user1010

raju.mopidevi 12-18-2009 01:20 PM

Quote:

Originally Posted by user1010 (Post 3796936)

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Microsoft Windows XP Professional
rootnoverify (hd0,1)
savedefault
makeactive
chainloader +1


your windows XP is not in primary partition, it is in extended partition. May be that was the reason you are unable to boot properly.

I think windows can only efficiently work if it is in primary partition.

PTrenholme 12-19-2009 12:14 PM

Try editing the /boot/grub/menu.lst file so the section Raju quoted looks like this:
Code:

title Windows XP
rootnoverify (hd0,9)
map (hd0,9) (hd0,0)
map (hd0,0) (hd0,9)
chainloader +1

Notes:
  1. The "9" is just a guess, It should be one less than the partition number in which you have XP installed. ("One less" because GRUB counts partitions and drives starting from zero instead of one.)
  2. The XP boot.ini file you quoted is instructing XP to boot from the first partition of your hard drive. What the map statements do is "rearrange" the BIOS partitioning so that the XP partition is reported as the first partition.
  3. You made a lot of unnecessary work for yourself by moving the XP partition. If you'd just left it alone and installed Ubuntu in the free space after the XP partition, you would have had no problems at all.
  4. You can "experiment" with the boot stanza for the XP system from the GRUB boot menu. Just follow the instructions at the bottom of the screen to edit the in-memory copy of the stanza. (Changes made using the GRUB editor are not saved to the menu.lst file, so you'll still have to edit the file to make your changes permanent. (In Ubuntu, use the command sudo gedit /boot/grub/menu.lst to edit the GRUB boot file.)
  5. While Raju is correct in noting that XP (or any Windows OS) doesn't boot from an extended partition, I think that the map directive "fools" XP into "believing" that it's booting from the first primary partition.

raju.mopidevi 12-19-2009 09:11 PM

Quote:

Originally Posted by PTrenholme (Post 3798030)
[*]While Raju is correct in noting that XP (or any Windows OS) doesn't boot from an extended partition, I think that the map directive "fools" XP into "believing" that it's booting from the first primary partition.[/LIST]

I don't know this map directive problem. I had faced problem with booting windows XP from extented partition. So I said there may be problem with booting XP from extented.

Thanks PTrenholme, your information is intersting and helpful

raju.mopidevi 12-19-2009 09:12 PM

Quote:

Originally Posted by PTrenholme (Post 3798030)
[*]While Raju is correct in noting that XP (or any Windows OS) doesn't boot from an extended partition, I think that the map directive "fools" XP into "believing" that it's booting from the first primary partition.[/LIST]

I don't know this map directive problem. I had faced problem with booting windows XP from extented partition. So I said there may be problem with booting XP from extented.

Thanks PTrenholme, your information is intresting and helpful

syg00 12-19-2009 10:01 PM

I see no evidence of XP being in a non-primary partition. A primary can surely be at the "end" of the disk - regardless of an extended being defined or not.
@user1010 get into a Ubuntu terminal and post the output from "sudo fdisk -l" ( no quotes).

PTrenholme 12-20-2009 12:14 AM

The main sticking point is this line in the Windows boot.ini file
Quote:

Originally Posted by user1010 (Post 3796936)
...
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /noexecute=optin /usepmtimer
...

It's telling XP to boot from the first partition (partition(1)) of the first hard drive (rdisk(0)) attached to the first hard disk controller (multi(0)). What the map directive does, is - as I said - logically move the location to the XP partition so that it's (again, "logically") the first partition.

user1010 might be able to get XP to boot by changing the partition(1) part of that line to (using my prior guess) partition(9), but, from the description provided in the post starting this thread, it seems likely that the XP partition is an extended one, and, as Raju noted, booting a Windows system from an extended partition is often difficult.

user1010 12-21-2009 03:54 PM

Cool. Thankyou very much all of you for your advice. I think in my current situation the best thing for me to do would be to restore my back up of xp at the front of my hd and then reinstall linux toward the back.

If things start going wrong again I'll be sure to get back!:)

Thanks again

user1010

user1010 02-11-2010 02:54 PM

Thanks once again to all you guys who helped me out! I am just bringing closure to the case. Things didn't really get better and so I ended up reinstalling both XP (I didn't realise I had the correct install disk as it is a custom built pc otherwise would have done this ALOT sooner!) and ubuntu. Things are now alot better however there is still one small problem.... but I think, according to the rules, it will require a new post..


All times are GMT -5. The time now is 11:31 PM.