LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-16-2007, 03:48 PM   #1
512upload
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137

Rep: Reputation: 16
[B]Can't Boot Windows Xp in a dual-boot e[/B]


I installed Windows XP Professional SP2 in my ~150GB harddrive.

Then, I installed Ubuntu 7.04 from a live CD creating a 1GB FAT32 partition for shared files. So, at this point I had hda1 (Windows XP), hda2 (1GB FAT32 partition) and hda3 (ext3 - Ubuntu 7.04), if I'm not mistaken. Both XP and Ubuntu 7.04 occupy about 75GB. Windows XP was drive 'C:'.

I uninstalled all 2.6.20-15 software from synaptic because I already had updated it to 2.6.20-16.

Now, when I try to boot Windows XP from grub dual-boot, I get this error message:

"NTLDR is missing
[...] restart"

Now, gparted says I have:

/dev/hda1 extended
/dev/hda5 [!] ntfs
/dev/hda2 ext3 /
/dev/hda3 fat32 /media/hda2.

When I tried to enter the Windows XP CD's recovery console, I found Windows to be in D:\Windows and not C:\Windows! Why is that!?

What can I do to be able to enter both Ubuntu and Windows XP?


P.S.: I also installed ntfs-3g meanwhile. Does that have anything to do with the problem? Thanks.
 
Old 07-16-2007, 04:36 PM   #2
jthuber
LQ Newbie
 
Registered: Jul 2007
Distribution: Slackware 10.2, OpenSUSE 10.2, Zenwalk 4.3
Posts: 9

Rep: Reputation: 0
Booting WinXP with Grub

I highly recommend getting familiar with GRUB documentation available at http://www.gnu.org/software/grub/

I use something similar to the following which was gleaned from http://www.justlinux.com/forum/showt...hreadid=143973

Boot into your Ubuntu and edit the grub boot menu. Usually this is found in /boot/grub/menu.lst though you may need to check your distro's help documentation.

FIRST MAKE A BACKUP OF ANY FILES YOU INTEND TO EDIT

Next, as root, edit the Windows section of your boot list

Code:
title          XP pro @ hda5
hide           (hd0,0)
hide           (hd0,1)
hide           (hd0,2)
hide           (hd0,3)
hide           (hd0,4)
unhide         (hd0,5)
root           (hd0,5)
makeactive
chainloader    +1


You may have to tinker with hide / unhide options to get it perfect. Also, study the setup and the comments from the GRUB boot menu linked above.
 
Old 07-16-2007, 04:48 PM   #3
512upload
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by jthuber
I highly recommend getting familiar with GRUB documentation available at http://www.gnu.org/software/grub/

I use something similar to the following which was gleaned from http://www.justlinux.com/forum/showt...hreadid=143973

Boot into your Ubuntu and edit the grub boot menu. Usually this is found in /boot/grub/menu.lst though you may need to check your distro's help documentation.

FIRST MAKE A BACKUP OF ANY FILES YOU INTEND TO EDIT

Next, as root, edit the Windows section of your boot list

Code:
title          XP pro @ hda5
hide           (hd0,0)
hide           (hd0,1)
hide           (hd0,2)
hide           (hd0,3)
hide           (hd0,4)
unhide         (hd0,5)
root           (hd0,5)
makeactive
chainloader    +1


You may have to tinker with hide / unhide options to get it perfect. Also, study the setup and the comments from the GRUB boot menu linked above.
I haven't tried this yet, but what do you mean by "You may have to tinker with hide / unhide options to get it perfect."?
 
Old 07-16-2007, 04:56 PM   #4
jthuber
LQ Newbie
 
Registered: Jul 2007
Distribution: Slackware 10.2, OpenSUSE 10.2, Zenwalk 4.3
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by 512upload
I haven't tried this yet, but what do you mean by "You may have to tinker with hide / unhide options to get it perfect."?
Well, assuming your gparted output is correct, you shouldn't have to do any tinkering. The problem I always have on a dual boot system like this is that Windows XP wants to be on the first partition of the first hard drive your BIOS sees. So what you are doing with those commands is hiding the other partitions from Windows while it boots so it thinks hda5 is actually hda1.

However, if gparted is not reporting the harddrives the same way your BIOS does, it is possible that your Windows partition may be somewhere else.

[EDIT]
Actually I see where I screwed up already!!!
I included too many partitions in that grub code. Use the following instead
Code:
title          XP pro @ hda5
hide           (hd0,0)
hide           (hd0,1)
hide           (hd0,2)
hide           (hd0,3)
unhide         (hd0,4)
root           (hd0,4)
makeactive
chainloader    +1

Last edited by jthuber; 07-16-2007 at 05:07 PM.
 
Old 07-16-2007, 05:08 PM   #5
512upload
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by jthuber
Well, assuming your gparted output is correct, you shouldn't have to do any tinkering. The problem I always have on a dual boot system like this is that Windows XP wants to be on the first partition of the first hard drive your BIOS sees. So what you are doing with those commands is hiding the other partitions from Windows while it boots so it thinks hda5 is actually hda1.

However, if gparted is not reporting the harddrives the same way your BIOS does, it is possible that your Windows partition may be somewhere else.
I have a major problem now

after doing what u suggested me to, I now get error 22 when trying to open Win "things" at hda5
and error 17 when trying to open linux.
i am using the live cd to send this message

please help me!
 
Old 07-16-2007, 05:16 PM   #6
jthuber
LQ Newbie
 
Registered: Jul 2007
Distribution: Slackware 10.2, OpenSUSE 10.2, Zenwalk 4.3
Posts: 9

Rep: Reputation: 0
Well, grub error 22 is "no such partition" so hopefully you saw the updated post with the corrected grub menu list.

Code:
 title          XP pro @ hda5
hide           (hd0,0)
hide           (hd0,1)
hide           (hd0,2)
hide           (hd0,3)
unhide         (hd0,4)
root           (hd0,4)
makeactive
chainloader    +1
As always, if all else fails, restore the backup you made
when I said,
Quote:
FIRST MAKE A BACKUP OF ANY FILES YOU INTEND TO EDIT
 
Old 07-16-2007, 05:19 PM   #7
512upload
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by jthuber
Well, grub error 22 is "no such partition" so hopefully you saw the updated post with the corrected grub menu list.

Code:
 title          XP pro @ hda5
hide           (hd0,0)
hide           (hd0,1)
hide           (hd0,2)
hide           (hd0,3)
unhide         (hd0,4)
root           (hd0,4)
makeactive
chainloader    +1
As always, if all else fails, restore the backup you made
when I said,
But where can I find the folder where menu.lst is /question/mark i can-t find it
 
Old 07-16-2007, 05:20 PM   #8
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 58
its in /boot/grub
 
Old 07-16-2007, 05:38 PM   #9
512upload
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by AceofSpades19
its in /boot/grub
well, I finally found it in media/disk/boot/grub

but there is one thing that has changed
the partition mananger from the live cd says that there is

hda1 filesystem unknown 75GB
hda2 ext3 /media/disk 73.04GB
hda3 fat32 /media/LINUXP (the name i gave to the 1gb shared partition) 1GB flags boot hidden

without changing to what you edited, the grub simply won-t start

please help me! i am getting stressed and almost in panic

i started crying and i-m desperate

/////////////////////

does the unknown in the previously NTFS mean that I lost the information in my windows xp partition!_ i am really desperate

should i follow the grub troubleshooting in the first post of>

http://ubuntuforums.org/archive/index.php/t-24113.html
_

oh my god that didn't work either! please help me!

Last edited by 512upload; 07-16-2007 at 06:09 PM.
 
Old 07-16-2007, 06:14 PM   #10
jthuber
LQ Newbie
 
Registered: Jul 2007
Distribution: Slackware 10.2, OpenSUSE 10.2, Zenwalk 4.3
Posts: 9

Rep: Reputation: 0
First things first, don't panic.

The beauty of grub and Linux is that none of your data is lost, it always possible to boot your system and correct the errors as long as you aren't formatting your drive.

Please post your grub menu.lst as found in media/disk/boot/grub from your live CD.

Also, include the full output from your partition manager.
 
Old 07-16-2007, 06:22 PM   #11
512upload
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by jthuber
First things first, don't panic.

The beauty of grub and Linux is that none of your data is lost, it always possible to boot your system and correct the errors as long as you aren't formatting your drive.

Please post your grub menu.lst as found in media/disk/boot/grub from your live CD.

Also, include the full output from your partition manager.
IMPORTANT updated

http://img402.imageshack.us/img402/6...eenshotfo6.png

is where the gparted information is hosted

i need to reboot so I can have the disks mounted again and tell you the menu.lst

after that, I'll edit this post with that information

thank you for not abbandoning me

here it is

///

default 0

timeout 5

title Ubuntu, kernel 2.6.20-16-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=bf45cb71-3b7c-49be-b6cb-9acee2536802 ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=bf45cb71-3b7c-49be-b6cb-9acee2536802 ro single
initrd /boot/initrd.img-2.6.20-16-generic

title Ubuntu, memtest86+
root (hd0,1)
kernel /boot/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/hda3

title XP pro @ hda5
hide (hd0,0)
hide (hd0,1)
hide (hd0,2)
hide (hd0,3)
unhide (hd0,4)
root (hd0,4)
makeactive
chainloader +1

///
coment of mine now

i omitted many comment lines from the beggining of the file menu.lst

Last edited by 512upload; 07-16-2007 at 06:46 PM.
 
Old 07-16-2007, 06:48 PM   #12
512upload
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137

Original Poster
Rep: Reputation: 16
Please, don-t abandon me now.
 
Old 07-16-2007, 06:58 PM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,101

Rep: Reputation: 3327Reputation: 3327Reputation: 3327Reputation: 3327Reputation: 3327Reputation: 3327Reputation: 3327Reputation: 3327Reputation: 3327Reputation: 3327Reputation: 3327
Mmmmm - first up, change all those "hide" into "unhide". Only needed for older Windoze systems (Win95 e.g.).
Then try to boot Windoze (it'll still fail). That should allow Ubuntu to boot after that.
Then go back and remove all those lines.

Seems you have been screwed by the Ubuntu installer - and I don't know of an easy way to un-screw things.

Can you just throw everything away and re-install both XP and Ubuntu ???.

Last edited by syg00; 07-16-2007 at 07:00 PM.
 
Old 07-16-2007, 07:03 PM   #14
512upload
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by syg00
Mmmmm - first up, change all those "hide" into "unhide". Only needed for older Windoze systems (Win95 e.g.).
Then try to boot Windoze (it'll still fail). That should allow Ubuntu to boot after that.
Then go back and remove all those lines.

Seems you have been screwed by the Ubuntu installer - and I don't know of an easy way to un-screw things.

Can you just throw everything away and re-install both XP and Ubuntu ???.
No, I can-t.

i have gigabytes of photos of decades and other important things in both Windows xp and ubuntu

i am waiting for a reply of the person who told me to write down what i have in menu.lst and in the partitioning menu

Last edited by 512upload; 07-16-2007 at 07:04 PM.
 
Old 07-16-2007, 07:20 PM   #15
512upload
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137

Original Poster
Rep: Reputation: 16
come on, jthuber
don-t abandon me now!

 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Boot w/ WinXP Pro, Windows wont boot. bobbyj99 Linux - General 2 04-20-2006 01:27 PM
Grub/Dual boot - Windows partition restored via dd won't boot pazzport Ubuntu 1 01-06-2006 01:29 PM
trying to dual boot windowsxp/fc2 using windows boot loader. dr_zayus69 Linux - Software 7 02-08-2005 11:59 PM
Dual Boot : Making Windows First Option in boot menu Maxwell Rain Linux - Software 3 11-27-2004 03:00 PM
Win98/Linux - dual boot : windows boot says logical drives exist past z ashpai Linux - Software 3 03-22-2001 09:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 12:44 PM.

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