LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-11-2007, 01:30 PM   #1
mrpsanter
LQ Newbie
 
Registered: Mar 2007
Distribution: Ubuntu 10.10
Posts: 15

Rep: Reputation: 0
Unable to start WinXP from Grub


I installed Ubuntu 7.04 on a PC already running with WinXP.
Everything went OK but after restarting my system, I was unable to start WinXP from the Grub menu, I got the following error:

Error 24: Attempting to access block outside partition

My menu.lst file looks like this (not the complete file):

title Ubuntu 7.04
root (hd0,5)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=968e649e-603e-4cd0-b7c1-6b8ec62d1333 ro quiet
splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault

title Ubuntu 7.04 (recovery mode)
root (hd0,5)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=968e649e-603e-4cd0-b7c1-6b8ec62d1333 ro single
initrd /boot/initrd.img-2.6.20-15-generic

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

Fdisk for sda looks like this:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/sda2 2551 19456 135797445 f W95 Ext'd (LBA)
/dev/sda5 2551 6374 30716248+ 7 HPFS/NTFS
/dev/sda6 6375 10198 30716248+ 83 Linux

As you can see, XP is installed on sda1 and Ubuntu on sda6.

Any help/suggestion is more than welcome since I'm stucked.
 
Old 06-11-2007, 01:40 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
I think you might need to take out the "map" lines. Those are used when you have 2 or more hard drives to pretend that the second drive is the first drive (which many Windows versions require). Since it appears you only have one drive, you don't need it.
 
Old 06-11-2007, 01:48 PM   #3
mrpsanter
LQ Newbie
 
Registered: Mar 2007
Distribution: Ubuntu 10.10
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks for the suggestion but it's not working: I commented out the two lines and I still get the same error message.

By the way, I also have an other drive (hdb) with other partitions (both for Win and for Linux) but it's not the primary drive used to boot the system.

I also forgot to mention that before using Ubuntu, I was using OpenSuse 10.2 and that the menu.lst used is (strangely) located on my previous OpenSuse partition: /media/sda9/boot/grub instead of /boot/grub.

Last edited by mrpsanter; 06-11-2007 at 01:50 PM.
 
Old 06-11-2007, 02:32 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by mrpsanter
I also forgot to mention that before using Ubuntu, I was using OpenSuse 10.2 and that the menu.lst used is (strangely) located on my previous OpenSuse partition: /media/sda9/boot/grub instead of /boot/grub.
Not a problem.....this presumably means that you did not install GRUB as part of the Ubuntu install---ie you are still using the GRUB that went with SUSE. The "gotcha" is that the GRUB file that goes in the MBR gets "hard-coded" to point to the correct /boot partition.

Your menu.lst file implies that Windows is on the first partition of the first drive---Is that correct? (Yes--I just looked at your fdisk output)

So--are you sure that the GRUB menu at startup matches the one you are editing?
 
Old 06-11-2007, 10:28 PM   #5
mrpsanter
LQ Newbie
 
Registered: Mar 2007
Distribution: Ubuntu 10.10
Posts: 15

Original Poster
Rep: Reputation: 0
Yes, I know that it's matching because the other menu.lst file (the one located in /boot/grub) looks totally different.

I also tried to compare with the menu.lst generated by the OpenSuse distribution but its structure looks completely different and it's therefore not helping.
 
Old 06-13-2007, 02:59 AM   #6
mrpsanter
LQ Newbie
 
Registered: Mar 2007
Distribution: Ubuntu 10.10
Posts: 15

Original Poster
Rep: Reputation: 0
Any suggestion is more than welcome since I'm totally stucked.
 
Old 06-13-2007, 01:26 PM   #7
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
You can boot into Ubuntu and do the following
Code:
sudo grub-install /dev/hda
If that doesn't work, you can try
Code:
sudo grub
root (hd0,5)
setup (hd0)
If you have SATA disks, use /dev/sda and setup (sda).

If you want to see where I got all this from, follow the link in my signature for Saikee's Grub Booting Tips.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual boot WinXP/Debian, grub error booting WinXP ChemBot Linux - General 5 02-22-2007 04:13 PM
dual boot problem winxp cant start using grub and Suse 10 jmgatica Linux - Software 3 12-06-2006 03:50 PM
reinstalling winXP on an existing dual boot system with winXP and FC4 grub not workin champion Fedora - Installation 3 02-13-2006 02:37 PM
Wiped Linux drive, unable to boot WinXP, Grub errors chuckk Linux - Software 4 12-12-2005 04:46 PM
i got RH8 & WinXP installed and properly working by GRUB. how can i reinstall WINXP? kublador Linux - Newbie 4 06-23-2003 12:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration