Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jul 2000 01:47:36 -0700 (MST)
From:      John Reynolds <jjreynold@home.com>
To:        emulation@freebsd.org
Cc:        bwithrow@nortelnetworks.com, BWithrow@BayNetworks.com
Subject:   Re: FreeBSD/VMWare setup for dummies?
Message-ID:  <14719.63272.547232.364667@whale.home-net>
In-Reply-To: <14719.26687.268058.220264@hip186.ch.intel.com>
References:  <14719.26687.268058.220264@hip186.ch.intel.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[ On Wednesday, July 26, Robert Withrow wrote: ]
> 
> I'm sorry, but I'm floundering like a dying mackerel.

I too have been floundering with VWware, but I think I finally got at least
some pieces of it licked tonight. Still gotta work on networking and getting
full-screen mode working, but that'll be in another mail :)

> I've got an existing FBSD 4.0Rel/Nt4 multiboot setup that I'm
> trying to configure VMWare for.  I've read the Hints.FreeBSD
> 
> Questions:
> 
>  1) When using the configuration wizard, I'm asked for a "Disk type
> setting".  What am I supposed to do here for an *existing* NT partition?
> Remember, I'm a dummy, so give me simple, step-by-step instructions!  ;-)
>
>   a) What I did was select "existing physical disk".
>   b) What I get is an error dialog saying "/dev/hdx -- not present".

First off, is the NT/BSD boot disk an IDE disk? I hope so. Even VMware
themselves say booting a VM from scsi is at best experimental. I would
seriously doubt it would work under FreeBSD, but maybe .....

What I did to get my setup working was elaborate on the setup from
Hints.FreeBSD. Vladimir explained to me that under FreeBSD it's impossible
(don't know the technical details) to get the right disk geometry from FreeBSD
when vmware needs it. So, it crashes and burns. You can edit the .hda file like
so:

   DRIVETYPE       ide
   CYLINDERS       39560
   HEADS           16
   SECTORS         63
   ACCESS "/path/to/setup/win98/disk.mbr" 0 62
   ACCESS "/dev/rad0s1" 63 15374204
   RDONLY "/dev/null" 15374205 39873329
   
As you can see, this differs slightly between what the Hints file says. As it
points out you need the actual geometry which you can get from dmesg:

 grep ad0 /var/run/dmesg.boot   
 ad0: 19470MB <QUANTUM FIREBALL CX20.4A> [39560/16/63] at ata0-master using UDMA3

The stuff in the [] is the c/h/s that vmware needs. Then create yourself a copy
of the MBR like the Hints file says. This is where my setup differs from the
hints file. My disk is bigger so I needed to get different numbers for slice 1
and the other slice (which contains my / partition for BSD as well as other
random storage). I got these numbers by going into /stand/sysinstall into the
partition editor for 'ad0'. Be careful not to change anything while in there :)


Disk name:      ad0                                    FDISK Partition Editor
DISK Geometry:  2482 cyls/255 heads/63 sectors = 39873330 sectors

    Offset       Size        End     Name  PType       Desc  Subtype    Flags

         0         63         62        -      6     unused        0
        63   15374142   15374204    ad0s1      2        fat       11
  15374205   24499125   39873329    ad0s2      3    freebsd      165    C>
  39873330       3150   39876479        -      6     unused        0    >     

I plugged "starting" and "ending" numbers for both slices into the example
template from the Hints file. This is where I and the Hints file differ. The
Hints file shows:

   ACCESS "/path/disk.mbr" 0 63
   ACCESS "/dev/rad0s1" 63 4192902
   RDONLY "/dev/null" 4192965 12305790

with the mbr and the first slice ending and starting at 63 respectively. It
also starts the RDONLY slice boundaries at 4192092+63. I dunno why. The above
values I used in my file haven't caused me any grief (at least thus far). Plus,
VMware itself guessed at the raw partition sizes in my original .hda file like
so:

   # Partition type: MBR
   RDONLY 0 62
   # Partition type: Win95 FAT32
   ACCESS 63 15374204
   # Partition type: BSD/386
   RDONLY 15374205 39873329

(so I guess the sysinstall step really wasn't necessary in retrospect but I
figured since I KNEW that information would be correct why not try it?)

After I modified my win98.hda file as above the VM would actually come up and
VMware wouldn't segfault. The machine started booting from the mbr, I chose
"F1" for 'DOS' and it began to work.

The curious thing to me is that at least from my searching of the vmware site,
this .hdN file format that we're using (in what the Hints file calls a "plain
disk") isn't documented anywhere. Can anybody point to information on this?

>  2) I gather that there is a ".hda" file you may need to constructBWithrow@BayNetworks.com (even
> though nothing in Hints.FreeBSD says anything about a ".hda" file.  Remember:
> I'm a dummy.)  How do you create that file *before* you have a config?
> Or what do you do instead?  Symlink?

Well, I edited mine after vmware kept dumping core on me and Vladimir said "raw
disks won't work--follow the Hints file and set things up like that for you IDE
disk". I didn't edit the configuration after manually editing the .hda file, it
just started working.

>  3) I've seen all kinds of cryptic comments (at least cryptic to me; remember:
> I'm a dummy) about configuring things for max performance.  Could someone
> list them out for me in painfully obvious plainness?

Well, once I got the thing to actually boot win98 the performance REALLY
sucked. This is because the VMware tools were not installed. Other people have
said that running in full-screen mode is much much faster than windowed and I
believe them (I'm working on that). 

You gotta have CRAPLOADS of ram and I'm glad I'm running an SMP system because
it hogs 99% of one of my cpus all the time. However, once I went through the
whole bloody process of successfully installing the vmware tools for win98 the
graphics were much better even in window'ed mode. I can deal with it certainly
until I debug why full-screen won't work for me.

>  4) I see a recommendation to use /etc/fbtab to control access to devices,
> rather than being root.  I log in using XDM started via 
> /usr/X11R6/etc/rc.d/xdm.sh.
> 
>   a) What devices would a dummy want to use fbtab for?

This was a key thing for me to figure out. I'd been running it as root (even
though the Hints file said not too ... boooooo). I have this in my /etc/fbtab

   /dev/ttyv0      0600    /dev/console
   /dev/ttyv0      0640    /dev/rad0s1
   /dev/ttyv0      0640    /dev/cd0c
   /dev/ttyv0      0640    /dev/cd1c

(I've got two CD-ROMs and the console entry is so I can capture console
messages with "xterm -C").

The permissions on these things was a pivotal thing for me to get correct
because the CD-ROM kept not being identified by the VM and by win98 inside the
VM until I did it. Also, the config editor wants /dev/cdrom by default so make
the symlink accordingly :)

>   b) What device would a dummy use as the index when XDM is started this way?

That I don't know ....

If you get the POS to boot from your existing partition then proceed to install
the VMware tools. I found the following URL to be VERY beneficial:

  http://www.vmware.com/support/reference/common/rawvideo98.html

it's for win98, but I'm sure the procedure is roughly the same for NT. There
were some inconsistencies in this doc which could be due to doc-rot as their
product changes or the fact that I'm technically running Win98-SE which could
do setups slightly differently. I also had to go into my "normal" hardware
profile (booting win98 native) and delete the "VWware SVGA" device (installed
after you install the VMware tools) twice ... whatever.

Once you get the vmware tools installed then you can proceed to have NT detect
hardware, install drivers, etc. Under my win98 install, I had to have it go
through the whole bloody process before it would install a "Standard IDE
controller" so that the atapi CD-ROM was detected (actually my scsi CD-ROM on
the host ... NEAT!!!).

Good luck.

I hope to summarize my woes on some sort of web page--maybe contribute to the
FreeBSD Diary or something ....

-Jr

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
John Reynolds         Chandler Capabilities Engineering, CDS, Intel Corporation
jreynold@sedona.ch.intel.com  My opinions are mine, not Intel's. Running
jjreynold@home.com          FreeBSD 4.0-STABLE. FreeBSD: The Power to Serve.
http://members.home.com/jjreynold/  Come join us!!! @ http://www.FreeBSD.org/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14719.63272.547232.364667>