LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-17-2006, 02:41 PM   #1
dave0201
LQ Newbie
 
Registered: Jan 2006
Posts: 4

Rep: Reputation: 0
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!
But...
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)
savedefault
makeactive
chainloader +1

-----------------------------------------------------------------

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

Any help greatly appreciated.
 
Old 01-17-2006, 03:20 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
http://www.gnu.org/software/grub/man...e2-errors.html
Quote:
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.
 
Old 01-17-2006, 04:26 PM   #3
dave0201
LQ Newbie
 
Registered: Jan 2006
Posts: 4

Original Poster
Rep: Reputation: 0
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.
 
Old 01-17-2006, 04:50 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
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.
 
Old 01-18-2006, 02:36 AM   #5
dave0201
LQ Newbie
 
Registered: Jan 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Chris
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.

Dave
 
Old 01-18-2006, 03:21 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
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.
 
Old 01-20-2006, 03:28 AM   #7
dave0201
LQ Newbie
 
Registered: Jan 2006
Posts: 4

Original Poster
Rep: Reputation: 0
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.

Dave
 
Old 01-20-2006, 07:49 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
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.
 
  


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
GRUB Error 15 - VMWare stonereh Debian 6 09-13-2005 07:15 AM
Debug Linux kernel in vmware (two machines in vmware)?? cyu021 Programming 0 03-30-2005 07:46 PM
Grub/lilo problems finding gentoo kernel under vmware _M0rb Linux - Software 1 02-06-2005 08:53 AM
Vmware Virtual Machine Problem With Windows In Vmware jvdbossc Linux - Software 2 05-28-2004 06:54 AM
Booting raw XP in vmware under gentoo, grub Error 17 sharon42 Linux - Software 3 01-08-2004 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:07 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