Ubuntu This forum is for the discussion of Ubuntu Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
07-16-2007, 03:48 PM
|
#1
|
Member
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137
Rep:
|
[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.
|
|
|
07-16-2007, 04:36 PM
|
#2
|
LQ Newbie
Registered: Jul 2007
Distribution: Slackware 10.2, OpenSUSE 10.2, Zenwalk 4.3
Posts: 9
Rep:
|
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.
|
|
|
07-16-2007, 04:48 PM
|
#3
|
Member
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137
Original Poster
Rep:
|
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."?
|
|
|
07-16-2007, 04:56 PM
|
#4
|
LQ Newbie
Registered: Jul 2007
Distribution: Slackware 10.2, OpenSUSE 10.2, Zenwalk 4.3
Posts: 9
Rep:
|
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.
|
|
|
07-16-2007, 05:08 PM
|
#5
|
Member
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137
Original Poster
Rep:
|
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!
|
|
|
07-16-2007, 05:16 PM
|
#6
|
LQ Newbie
Registered: Jul 2007
Distribution: Slackware 10.2, OpenSUSE 10.2, Zenwalk 4.3
Posts: 9
Rep:
|
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
|
|
|
|
07-16-2007, 05:19 PM
|
#7
|
Member
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137
Original Poster
Rep:
|
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
|
|
|
07-16-2007, 05:20 PM
|
#8
|
Senior Member
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079
Rep:
|
its in /boot/grub
|
|
|
07-16-2007, 05:38 PM
|
#9
|
Member
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137
Original Poster
Rep:
|
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.
|
|
|
07-16-2007, 06:14 PM
|
#10
|
LQ Newbie
Registered: Jul 2007
Distribution: Slackware 10.2, OpenSUSE 10.2, Zenwalk 4.3
Posts: 9
Rep:
|
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.
|
|
|
07-16-2007, 06:22 PM
|
#11
|
Member
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137
Original Poster
Rep:
|
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.
|
|
|
07-16-2007, 06:48 PM
|
#12
|
Member
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137
Original Poster
Rep:
|
Please, don-t abandon me now.
|
|
|
07-16-2007, 06:58 PM
|
#13
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,385
|
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.
|
|
|
07-16-2007, 07:03 PM
|
#14
|
Member
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137
Original Poster
Rep:
|
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.
|
|
|
07-16-2007, 07:20 PM
|
#15
|
Member
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137
Original Poster
Rep:
|
come on, jthuber
don-t abandon me now!

|
|
|
All times are GMT -5. The time now is 12:08 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|