Booting XP with GRUB not possible / Partition not found

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help

Booting XP with GRUB not possible / Partition not found

Postby Harpagonos on Mon Aug 10, 2009 4:48 pm

Hello everyone,

coming back to the Linux world I decided that Mint would be my favourite distribution. It has been quite some time. :-)
I am running it on a HP 6710b notebook with a prior installation of Windows XP Prof.

I am trying to have GRUB let me choose XP as one option inside the boot loader, but whatever I try I either get an error message such as "invalid partition" or "invalid device name".

Can one of you guys please help me?

I put my /boot/grub/menu.lst below

Code: Select all
# 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-legacy-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 change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default      1

## Graphical boot menu location
gfxmenu=/boot/gfxmenu/linuxmint.message

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

# 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=/dev/sda2 ro locale=de_DE

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,1)

## 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=(single-user) 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      Linux Mint 7 Gloria
root      (hd0,1)
kernel      /boot/vmlinuz-2.6.28-13-generic root=/dev/sda2 ro locale=de_DE quiet splash
initrd      /boot/initrd.img-2.6.28-13-generic
quiet

title      Microsoft Windows XP Professional
rootnoverify   (hd0,6)
chainloader   (hd0,6)+1
makeactive
boot

title      Linux Mint 7 Gloria (Recovery Mode)
root      (hd0,1)
kernel      /boot/vmlinuz-2.6.28-13-generic root=/dev/sda2 ro locale=de_DE single
initrd      /boot/initrd.img-2.6.28-13-generic

title      Linux Mint 7 Gloria (Memory Test)
root      (hd0,1)
kernel      /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST


The device.map contains only one line (plausible since there is only one hard disk):
(hd0) /dev/sda

I use the following partitioning

Unused Unused Partition
/dev/sda1 (extended, lba)
/dev/sda5 Windows (ntfs)
/dev/sda6 Linux swap
/dev/sda2 Linux (ext4)

It should be possible to have GRUB Windows boot from that partition, if XP can... :-)

Thanks in advance!
Harpagonos
Level 1
Level 1
 
Posts: 13
Joined: Mon Aug 10, 2009 4:37 pm

Linux Mint is funded by ads and donations.
 

Re: Booting XP with GRUB not possible / Partition not found

Postby lvleph on Mon Aug 10, 2009 5:01 pm

The boot loader for XP is at (hd0,0) even though XP is on sda5 (Or it should be). Try changing
Code: Select all
title      Microsoft Windows XP Professional
rootnoverify   (hd0,6)
chainloader   (hd0,6)+1
makeactive
boot

to
Code: Select all
title      Microsoft Windows XP Professional
rootnoverify   (hd0,0)
savedefault
makeactive
chainloader   +1


Make sure you make a backup before hand.

Code: Select all
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.bak
lvleph
 

Re: Booting XP with GRUB not possible / Partition not found

Postby Harpagonos on Mon Aug 10, 2009 5:08 pm

Thanks for the quick reply. Unfortunately I still get the same error message. GRUB lets me return to a (text based) menu and I can then boot Mint again, but XP is not possible. :-(
Harpagonos
Level 1
Level 1
 
Posts: 13
Joined: Mon Aug 10, 2009 4:37 pm

Re: Booting XP with GRUB not possible / Partition not found

Postby lvleph on Mon Aug 10, 2009 5:24 pm

You could try the following.
http://ubuntuforums.org/showthread.php?t=704857

EDIT: In your case
Code: Select all
sudo grub

> root (hd0,1)
> setup (hd0)
> quit
lvleph
 

Re: Booting XP with GRUB not possible / Partition not found

Postby Lolo Uila on Mon Aug 10, 2009 7:04 pm

Your HDD partitioning is odd. What you specified makes no sense.

Unused Unused Partition *
/dev/sda1 (extended, lba)
/dev/sda5 Windows (ntfs)
/dev/sda6 Linux swap
/dev/sda2 Linux (ext4) **

* what is this? Why is there no primary partition here?
** Umm... if sda1 is an extended partition, then you should not have an sda2 (1-4 are primary, 5+ extended)


Grub counts drives & partitions from 0 (Zero), so your 1st partition is (0,0), 2nd is (0,1), etc. So sda5 should be (0,4).

Code: Select all
title      Microsoft Windows XP Professional
rootnoverify   (hd0,4)
chainloader   +1
makeactive
boot
User avatar
Lolo Uila
Level 5
Level 5
 
Posts: 548
Joined: Thu Mar 15, 2007 3:40 am
Location: Kapolei, Hawaii

Re: Booting XP with GRUB not possible / Partition not found

Postby Harpagonos on Tue Aug 11, 2009 2:43 am

Thanks for your hint.

Specifying this, it displays "Error 12: invalid device requested"

The partitioning is really odd, it came from the combination of HP philosophy and Windows XP. HP reserves 10GB for a rescue partition. I installed a regular Windows XP though and removed the recovery partition for Mint.

Mint works fine now though, but XP will not boot. I tried all number from 0 to 7, but still all I get is either the error above or "Error 22: Partition not found". :-(
Harpagonos
Level 1
Level 1
 
Posts: 13
Joined: Mon Aug 10, 2009 4:37 pm

Re: Booting XP with GRUB not possible / Partition not found

Postby Harpagonos on Tue Aug 11, 2009 3:09 am

@lvleph: I tried your hint as well. It did not change anything in the behaviour though...

Unfortunately I need the Windows environment for work (and World of Warcraft ;-) ).

One question: why do you recommend to boot from hd0,0 since this is the unused space that Windows retains?
Harpagonos
Level 1
Level 1
 
Posts: 13
Joined: Mon Aug 10, 2009 4:37 pm

Re: Booting XP with GRUB not possible / Partition not found

Postby lvleph on Tue Aug 11, 2009 4:26 am

hd0,0 was incorrect. I apologize for that. It appears that you should be using hd0,4 for Windows.
lvleph
 

Re: Booting XP with GRUB not possible / Partition not found

Postby optimize me on Tue Aug 11, 2009 4:40 am

download and burn the super grub disk and see if you can load it that way.
AMD Phenom II X6 1045T 2.8GHz 8GB DDR3 RAM ATI Radeon HD6970
User avatar
optimize me
Level 5
Level 5
 
Posts: 639
Joined: Wed Jun 03, 2009 5:25 pm

Re: Booting XP with GRUB not possible / Partition not found

Postby Harpagonos on Tue Aug 11, 2009 5:19 am

Hmm, isn't there any "GRUB shell" at boot time that lets me try to manually boot a partition?
This way it would be much easier to try out which command will work.

So gotten in love already to my new Mint, that I do not want to run FIXMBR. :-)
Harpagonos
Level 1
Level 1
 
Posts: 13
Joined: Mon Aug 10, 2009 4:37 pm

Re: Booting XP with GRUB not possible / Partition not found

Postby Pierre on Tue Aug 11, 2009 7:11 am

within Mint, are you able to "mount" the xp partition., that is shown in 'Computer' ( dble click on it )
&/or read any of the data within that partition?.
if so, what partition does Mint say, that it is ..
Image
User avatar
Pierre
Level 7
Level 7
 
Posts: 1701
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Booting XP with GRUB not possible / Partition not found

Postby Harpagonos on Tue Aug 11, 2009 8:09 am

Hi,

yes I can access it. By default it was mounted to /windows and is located on partition /dev/sda5 (ntfs).

All data seem to be present. I think the problems might have to do with the HP bootloader. It offers you to boot either the windows installed or the rescue partition, which I removed for Linux.

However it should still be bootable since that partition was not touched.

I tried all hints listed here and a few ones I found on google as well, but nothing worked out... :-(
Harpagonos
Level 1
Level 1
 
Posts: 13
Joined: Mon Aug 10, 2009 4:37 pm

Re: Booting XP with GRUB not possible / Partition not found

Postby RichardH on Tue Aug 11, 2009 9:33 am

This seems correct and should boot windows. If not, add "boot" command at the bottom.
Sometimes it seems to be needed, others not.

title Microsoft Windows XP Professional
rootnoverify (hd0,4)
makeactive
chainloader +1
savedefault
User avatar
RichardH
Level 3
Level 3
 
Posts: 133
Joined: Tue Jun 17, 2008 10:36 am
Location: Venezuela

Re: Booting XP with GRUB not possible / Partition not found

Postby Harpagonos on Tue Aug 11, 2009 9:47 am

I tried this, but still get the error message "Error 12: invalid device requested".

Please correct me if I'm wrong, but there should be a valid boot record within the Windows partition, right? Can I verify this anyhow?
Harpagonos
Level 1
Level 1
 
Posts: 13
Joined: Mon Aug 10, 2009 4:37 pm

Re: Booting XP with GRUB not possible / Partition not found

Postby RichardH on Tue Aug 11, 2009 11:06 am

Just looked at the windows part on the AA1 and it looks like this,
and I know that it boots: (doesn't always mean that it will work on yours. :)

title Microsoft Windows XP Home (on /dev/sda2)
rootnoverify (hd0,1)
savedefault
chainloader +1

If you really must get windows running & if you have a windows CD:
make a backup of your menu.lst
boot the windows CD and repair the boot partition or whatever its called.
or from DOS fdisk /mbr but the winCD is probably the best.

This will get windows booting, but then you will have to reinstall grub again,
which in the wiki is reported to not be working correctly.
You could always reinstall LM7 again, but that is a pain.

See here:
http://linuxmint.com/wiki/index.php/How ... _your_grub
and
http://www.linuxmint.com/forum/viewtopi ... 42&t=19208
for repairing grub in mint.
User avatar
RichardH
Level 3
Level 3
 
Posts: 133
Joined: Tue Jun 17, 2008 10:36 am
Location: Venezuela

Re: Booting XP with GRUB not possible / Partition not found

Postby Lolo Uila on Wed Aug 12, 2009 12:06 am

Harpagonos wrote:I think the problems might have to do with the HP bootloader. It offers you to boot either the windows installed or the rescue partition, which I removed for Linux...
Uh oh! You are trying to chain two different boot menu type loaders? That's gotta be the problem.

You are not simply chainloading the Windows boot process, you are trying to link one boot menu (Grub) to another (HP) and we really don't know what the HP menu requires.

I'll bet part of the HP boot loader got over-written by Grub and the HP one is broken now. Unless someone here knows enough about the HP boot loader to offer you a fix (which will likely break Grub), I'd say you are probably going to have to back up your data, wipe your drive and start from scratch (install both XP and Mint all over again).

The only way around it I can see would be to completely remove the HP boot menu and replace it with the normal XP boot loader, and I have no idea how to do that. Hopefully someone else is more familiar with the HP software.
User avatar
Lolo Uila
Level 5
Level 5
 
Posts: 548
Joined: Thu Mar 15, 2007 3:40 am
Location: Kapolei, Hawaii

Re: Booting XP with GRUB not possible / Partition not found

Postby Harpagonos on Thu Aug 13, 2009 2:50 am

Hi Lolo,

no I removed the HP partition and it should so a regular XP boot.

Thus, I am one little step further. When I had a look at the GRUB console I started each step manually. The "Error 22: invalid device requested" message was displayed when calling the "makeactive" statement; which makes sense since (hd0,4) => /dev/sda5 is an extended partition.

When selecting the entry without the makeactive parameter, it displays a string "Starting up...", but then halts. I cannot determine whether this string comes from GRUB or from the Windows partition though...

Edit: Now I tried the following in the GRUB console:

rootnoverify (hd0,4) // which should point to the windows partition
setup (hd0)

Calling the "setup" function returns "Error 17 - Cannot mount selected partition".
Harpagonos
Level 1
Level 1
 
Posts: 13
Joined: Mon Aug 10, 2009 4:37 pm

Re: Booting XP with GRUB not possible / Partition not found

Postby StanTheMan on Thu Aug 13, 2009 7:04 pm

Win XP should be on a Primary partition made bootable (active)
I would suggest , using a partitioner such as GPartEd , delete sda5 to make empty space , then create a new Primary sda2 and make it bootable . Using XP s install disk which should re-write the MBR , install WinXP on sda2 .
Next you would have to edit GRUB to get your linux bootloader working again.
StanTheMan
Level 5
Level 5
 
Posts: 577
Joined: Fri Feb 13, 2009 7:07 pm

Re: Booting XP with GRUB not possible / Partition not found

Postby lvleph on Thu Aug 13, 2009 7:06 pm

StanTheMan wrote:Win XP should be on a Primary partition made bootable (active)
I would suggest , using a partitioner such as GPartEd , delete sda5 to make empty space , then create a new Primary sda2 and make it bootable . Using XP s install disk which should re-write the MBR , install WinXP on sda2 .
Next you would have to edit GRUB to get your linux bootloader working again.

Would the reinstall of XP and the subsequent rewrite of the MBR require one to need to setup grub again, not just a menu.lst fix?
lvleph
 

Re: Booting XP with GRUB not possible / Partition not found

Postby Harpagonos on Fri Aug 14, 2009 2:18 am

It really seems that I will have to re-install XP again, which I was trying to avoid. :-( Well, there seems to be no choice...

Or does anyone know how to convert a logical partition to a primary one?
Harpagonos
Level 1
Level 1
 
Posts: 13
Joined: Mon Aug 10, 2009 4:37 pm

Linux Mint is funded by ads and donations.
 
Next

Return to Installation & Boot

Who is online

Users browsing this forum: Cowdiddly and 20 guests