-   Linux - Software (
-   -   VMWare XP and Grub (

dave0201 01-17-2006 02:41 PM

VMWare XP and Grub
Hello from someone new to Linux and getting hooked. Some previous Unix knowledge has been a big help.
So far very impressed - everything quicker and internet browsing with no pop-ups or ads!
I have a problem I'm hoping someone can help me with.
I have 2 hard disks, one with Windows xp pro (32 bit) and one with Umbutu 5.10 for 64 bit PC installed. I can boot from either no problem (dual boot).
In my (limited) wisdom I thought it would be good to try out VMWare. I manged to get VMware Workstation to run Ok on the Umbutu drive but cannot for the life of me get a virtual boot of XP. It hangs with the following error:

Grub loading stage1.5
Grub loading, please wait....
Error 21

My disks are hd0 /dev/hda 80G for XP (IDE)
and hd1 /dev/sda 120G for Linux Umbutu (SATA)

fdisk -l gives the following:
Disk /dev/hda: 80.0 GB, 80032038912 bytes
255 heads, 63 sectors/track, 9730 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 9729 78148161 7 HPFS/NTFS

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 14220 114222118+ 83 Linux
/dev/sda2 14221 14593 2996122+ 5 Extended
/dev/sda5 14221 14593 2996091 82 Linux swap / Solaris


My grub menu.lst file has the following lines at the end:

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda1
title Windows NT/2000/XP (loader)
root (hd0,0)
chainloader +1


I've tried mapping hd0 to hd1, but still get the same error.
System is:
Asus A8V mobo
AMD Athlon 64
80G IDE + 120G SATA

Any help greatly appreciated.

acid_kewpie 01-17-2006 03:20 PM

21 : Selected disk does not exist
This error is returned if the device part of a device- or full file name refers to a disk or BIOS device that is not present or not recognized by the BIOS in the system.
i would guess you've not attached the drives correctly in vmware.

dave0201 01-17-2006 04:26 PM

Thanks for the reply.

VMware shows the Windows XP (raw) disk as:

Hard Disk (IDE 0:0) Using device /dev/hda

which I think should be correct.

acid_kewpie 01-17-2006 04:50 PM

but you're running grub, so grub is gonna be looking for the 2nd stage on the linux drive.

I'd firstly state that booting a physically installed OS under vmware really ain't too smart.... don't do it if you can avoid it. if you want to keep going though, make your bios boot to the sata drive first, not the IDE one. then reinsatll grub on the linux drive itself and under XP reinstate the XP bootloader. that way a normal hardware boot will get grub, but booting to the IDE drive under vmware will never come near grub and it'll boot fine.

dave0201 01-18-2006 02:36 AM

I'll give that a try. I'm a bit wary of losing data though. Does your suggestion of reloading grub and the xp bootloader mean I could lose files?
At the moment when I boot I get the choice of booting to Linux or XP (which I'd like to keep).
I predominantly want to run Linux and wanted to run VMware partly to see how well it worked and partly because my printer (Lexmark X85) does not seem to be supported under Linux.
As time goes by I'd hope to use Linux more and windows less.
Sorry if this is a simple question - still very much in learning mode.


acid_kewpie 01-18-2006 03:21 AM

no, there's honestly no risk of losing data whatsoever, but to be honest i've still never used a sata drive, so i'd not sure how you reference a sata drive in grub.conf sd(0) for sda mbr i'd guess...

for what you want, it's kinda of awkward to be running a Linux derived boot loader installed on a different drive to Linux itself. as you must have both drives functioning in order to boo to either. moving the bootloader across to the drive it's 2nd stage lives on makes a lot more sense if you can do it. this way if the sata drive dies, and you remove it, you'll be instantly booting into windows on the IDE drive if that's all that's there.

dave0201 01-20-2006 03:28 AM

Thanks for the help - got it working.
Here's what I did in case it helps anybody else:

Booted from the XP installation disk and under recovery console ran fixmbr. This sorted xp to boot from my ide disk.

Under boot/grub in Linux renamed (hd1,0) to (hd0,0) in menu.lst and removed the windows option.

So the boot now depends on which disk is selected in the BIOS as the boot drive. Select the ide drive get XP, sata drive get Linux.

In XP added a 'virtual machine' under hardware profiles. This is simply a copy of the physical machine. Then updated the driver in the virtual machine for the ide controller to be the 'standard dual PCI/IDE controller'.

Bavk to Linux and under VMware setup XP as a raw drive, selected the virtual machine when XP boots and it works as advertised!!!

Thanks again.


acid_kewpie 01-20-2006 07:49 AM

no problem. i'd have probably left XP as a grub option, but then i guess that's largely pointless if it's working well under vmware.

All times are GMT -5. The time now is 04:05 PM.