LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Cannot boot Windows after installing Ubuntu 8.04 (https://www.linuxquestions.org/questions/linux-general-1/cannot-boot-windows-after-installing-ubuntu-8-04-a-639536/)

Steffy 05-03-2008 12:48 AM

Cannot boot Windows after installing Ubuntu 8.04
 
After installing Ubuntu 8.04 last week, I've managed to get most of the bugs ironed out by myself, except for this one. I was planning on dual booting Ubuntu with Windows XP Home, but selecting Windows from the boot screen gives the following error:

"Error 22: No such partition."

Does anyone know how to fix this?

saikee 05-03-2008 03:49 AM

Post your Ubuntu's /boot/grub/menu.lst and the output of
Code:

sudo fdisk -l
to enable others to formulate the cure.

Steffy 05-03-2008 04:28 AM

Ah, right.

My grub menu.lst

And my fdisk -l output.

EDIT: I figure I should probably let you know some other information.

I have Ubuntu installed on sda1, Windows XP on sdc1, and Sabayon Linux on sdc2.

I can boot into Ubuntu fine, but can't boot into XP or Sabayon.

Initially I only had XP on this machine. Next I installed Sabayon, but that overwrote my Windows boot files, replacing it with Sabayon's grub files. These didn't work properly: I could boot into Sabayon, but not Windows. Then I installed a new hard drive (sda)and Ubuntu (7.10). When I did this, everything was fine, I could boot all 3 OS's. The problem came when I upgraded to Ubuntu 8.04. I did a clean install of 8.04, and it replaced my grub files, so now I can only boot into Ubuntu.

I also tried running a Windows system restore from the windows CD, but now I get a "could not boot operating system" error when I try to boot from that hard drive.

saikee 05-03-2008 06:11 AM

In the Ubuntu's menu.lst try the amendments marked in red

Code:

title Microsoft Windows XP Home Edition
root (hd2,0)
map (hd2) (hd0)
map (hd0) (hd2)

chainloader +1
savedefault
makeactive


Steffy 05-03-2008 07:08 AM

Using those adjustments still gives Error 22: No such partition found.

I also tried your method and adding rootnoverify, which game Error 12: Invalid Device Requested.

saikee 05-04-2008 11:25 AM

I got a feeling that your sda may be a USB disk which may casue complication to the MS Windows.

Can you before booting any the of the system at the Grub menu, press the "c" key to get a Grub prompt? In a Grub prompt you deal with Grub directly and can boot up each system "manually".

In a Grub prompt you ask Grub to list the partitions of every disk by command
Code:

geometry (hd0)
geometry (hd1)
geometry (hd2)

From the command "geometry (hd2)" you will be able to see if (hd2,0) or its 1st partition of the 3rd disk exists or not as it should be Type 7 for a NTFS partition, according to the information have you supplied.

You can load the Grub menu back by command
Code:

root (hd0)
chainloader +1
boot

You can fire up any system using the same commands as in the menu.lst except adding the command "boot" at the end. The "root (hd0)" tells Grub to load the MBR of (hd0) so you get back the original Grub menu.

Report back the result of the geometry commands.

anon099 05-04-2008 10:15 PM

I don't see whats the problem. Seems like a good thing to me. ;)

Steffy 05-07-2008 11:13 AM

geometry (hd0)

drive 0x80: C/H/S = 1024/255/63, The number of sectors = 58631231, LBA
Partition num: 0, Filesystem type is ext2fs, partition type 0x83
Partition num: 4, Filesystem type is unknown, partition type 0x82

geometry (hd1)

drive 0x81: C/H/S = 1024/255/63, The number of sectors = 390719855, LBA
Partition num: 0, Filesystem type is unknown, partition type 0x7
Partition num: 1, Filesystem type is unknown, partition type 0x7

geometry (hd2)

drive 0x82: C/H/S = 1024/255/63, The number of sectors = 628140335, LBA
Partition num: 4, unknown, type 0x7

I also ran geometry (hd3) just to be safe, despite only having 3 hard drives, and got the following output:

drive 0x83: C/H/S = 1024/255/63, The number of sectors = 390719855, LBA
Partition num: 0, Filesystem type is unknown, partition type 0x7
Partition num: 1, Filesystem type is unknown, partition type 0x7

Does that help at all?

saikee 05-07-2008 01:03 PM

I have tried to avoid Raid because of your type of problem but now I got myself into it.

Your post #8 tells me (hd1) and (hd3) are identical. This is likely that you have two 200Gb hard disk and are using them as a Raid, possibly Raid 1 (Mirror mode, with one acting as the backup of the other).

The bad news is most boot loaders don't understand Raid and so Grub saw 4 physical hard disk.

Your information suggests

sda = (hd0)

sdb = (hd2)

sdc = (hd1) and (hd3)

I speculate your Windows will boot by these commands
Code:

title Microsoft Windows XP Home Edition
root (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1

You can also try it with (hd3) in lieu of (hd1) in the above.

Lets us know your progress.

Steffy 05-08-2008 07:09 AM

Yep, that worked great. Thanks saikee.


All times are GMT -5. The time now is 01:34 PM.