PDA

View Full Version : [ubuntu] GRUB don't see Windows.



Ussop
June 8th, 2008, 12:51 PM
When I boot there is no option to boot my WinXP. I have 3 partitions. On
first Ubuntu, 2nd - swap and on 3rd WinXP.

Can anyone help me?

abhiroopb
June 8th, 2008, 12:57 PM
in a terminal (applications>accessories>terminal):

sudo gedit /boot/grub/menu.lst

scroll the the bottom and add this:
title Windows XP
root (hd0,2)
makeactive
chainloader +1

Save and exit, it should be in grub now.

Ussop
June 8th, 2008, 01:35 PM
Now there is windows option but when selected i get:
Error 12: Invalid device requested.

Before installing Ubuntu i had:
c:\ - now Ubuntu
d:\ - now swap
e:\ DVD
f:\ win

Can it be that 0,2 go to DVD?

abhiroopb
June 8th, 2008, 01:37 PM
ok start up ubuntu, and in a terminal:

sudo fdisk -l

post output here.

The problem is I think I got the partition wrong.

the8thstar
June 8th, 2008, 01:39 PM
Please type in a terminal:


sudo fdisk -l

to get a list of all the partitions (and therefore OS) recognized by your system, then copy and paste the output into your next answer. This way we can figure out what's going on.

Ussop
June 8th, 2008, 01:41 PM
Disk /dev/sda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x4dc98ad6

Device Boot Start End Blocks Id System
/dev/sda1 * 1 6847 54998496 83 Linux
/dev/sda2 6848 6971 996030 82 Linux swap / Solaris
/dev/sda3 6972 9963 24033240 f W95 Ext'd (LBA)
/dev/sda5 6972 9963 24033208+ 7 HPFS/NTFS

abhiroopb
June 8th, 2008, 01:43 PM
again in the menu.lst file:
input the followin:

title Windows XP
root (hd0,3)
makeactive
chainloader +1

the8thstar
June 8th, 2008, 01:45 PM
Okay, then Grub should be modified as follows:

First, type in the terminal:


sudo gedit /boot/grub/menu.lst

then scroll to the end and replace the previous Windows entries with this:


title Windows
root (hd0,3)
makeactive
chainloader +1

Tell us how it went.

the8thstar
June 8th, 2008, 01:46 PM
lol, abhiroopb. You beat me to it again. At least, two good advices are better than none.

abhiroopb
June 8th, 2008, 01:47 PM
yea as long as its the same thing!!!!

Ussop
June 8th, 2008, 01:51 PM
No love :(

Error 22: No such partition.

the8thstar
June 8th, 2008, 01:55 PM
Is your XP partition (what you called F: )the one where you had the windows directory installed (i.e. f:\windows), or was it the recovery partition?

abhiroopb
June 8th, 2008, 01:56 PM
Ok type this in the terminal:

gksudo gparted

Right click on wherever it says NTFS and click on manage flags, and select wherever it says "boot".

Then in menu.lst change back to:

title Windows XP
root (hd0,2)
makeactive
chainloader +1

the8thstar
June 8th, 2008, 01:59 PM
Might be a flag issue, but I'm concerned about the whole windows partition on c: having been wiped during ubuntu install.

Ussop
June 8th, 2008, 02:00 PM
It's install partition with windows files and such.

abhiroopb
June 8th, 2008, 02:02 PM
Try doing what I suggested should work.

the8thstar
June 8th, 2008, 02:02 PM
It's install partition with windows files and such.

Okay then, try what abhiroopb suggested and let's see how it rolls.

Ussop
June 8th, 2008, 02:16 PM
Error 12

But noticed something interesting in Gparted.


/dev/sda3 Extended
/dev/sda5 ntfs

Can it be that i need (0,4)?

the8thstar
June 8th, 2008, 02:21 PM
Error 12

But noticed something interesting in Gparted.


/dev/sda3 Extended
/dev/sda5 ntfs

Can it be that i need (0,4)?

Typically, yes.

Ussop
June 8th, 2008, 02:35 PM
Changed (hd02) to (hd0,4) and got same error 12.

abhiroopb
June 8th, 2008, 02:49 PM
No no, NTFS is only your third partition, it looks like its the fifth because of the extended partition. Usually the swap should be in the extended partition. I think the extended partition is what is causing the mess. Ok can you delete the windows partition? And re-install? would that be an option for you?

the8thstar
June 8th, 2008, 02:55 PM
At the command prompt type:


cd /dev/sda5

then


dir

and paste the results in here. I want to make sure there IS a living Windows directory there.

Ussop
June 8th, 2008, 03:44 PM
Yes but no. For some reason i can't install windows with Linux present on PC. After pressing any key to boot from CD (install disc) it shows message: Inspecting your hardware configuration... or something like that.
And then go blank.

cd /dev/sda5 gives me communicate that it's not directory.

abhiroopb
June 8th, 2008, 03:47 PM
Why can't you install windows with linux present? All you have to do is put in an XP disc and during setup just select the ntfs partition and it will install there.

Ussop
June 8th, 2008, 03:50 PM
You mean now from Ubuntu?

abhiroopb
June 8th, 2008, 03:53 PM
Ok if you are sure you can re-install windows without losing any data then all you have to do:

First go into gparted (sudo gparted), and erase extended partition. Then create a new partition called NTFS.

Put in the windows CD, restart the computer and install windows to the NTFS partition (the partition which has the "bad" copy of windows).

Then put in the ubuntu livecd and do the following in a terminal:
sudo grub

> root (hd0,0)

> setup (hd0)

> exit
that will reset grub.

Then restart and you should load into ubuntu.

Then tell us what it shows on gparted.

Ussop
June 8th, 2008, 05:16 PM
It works now. Thank you.

Still, drive letter bothers me, is there a way to change f: to c: ?

abhiroopb
June 8th, 2008, 05:18 PM
managed to do all of that in under an hour? impressive :P!

The drive letters only appear in Windows right? Not much of an expert on windows, I'm sure its possible but it MIGHT cause problems in ubuntu.