[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

VMWare and GNU/HURD



I've successfully booted GRUB and Marcus' HURD tarball into a VMWare
virtual machine.  (For anyone unfamiliar with VMWare, it runs under
GNU/Linux and provides an emulated x86 machine capable of running e.g.
MS-Windows, another GNU/Linux, or other operating systems.)

A 500MB (or so) file you allocate on the host system becomes a 500MB
emulated IDE hard drive.  These "hard drives" can be shared between
virtual machines, so that a virtual machine running GNU/Linux can be
used to prepare the IDE image for another virtual machine running
GNU/HURD.

===

I went almost entirely by Matthew's easy guide to HURD installation.
He describes two paths: either install the current debs using the
supplied scripts (what he recommends) or download and expand a largish
tarball that Marcus keeps at alpha.gnu.org.  The first will make you a
lot more current, while the second is much easier to accomplish.

Since I'm running the Caldera OpenLinux 2.2 distribution, which is
rpm-based, I was obligated to install and learn about dpkg if I
wanted to follow Matthew's recommendation.  So I chickened out and
downloaded the big tarball.  It got me going; the dpkg experience
will have to come later.

Here's what I did:

1.  Built a pair of virtual machines.  The first is for GNU/HURD
    itself and a single IDE drive was defined for it. Matthew
    recommends that this be 500MB in size.  I gave it 576MB,
    intending to split it into a 512MB main partition and a 64MB
    swap partition (I knew not to make the virtual drive larger
    than 1GB).  The real floppy drive was made visible to the
    HURD VM, but not the real CDROM drive -- I didn't see the
    point just yet.

    The second virtual machine was for the bootstrap OS.  I gave
    it a 500MB "hard drive" of its own -- I had plenty of disk
    space to spare.  I also gave the bootstrap VM access to the
    existing drive defined to the GNU/HURD machine.  It has access
    to both the real floppy drive and the real CDROM drive.

2.  Built the bootstrap OS.  Taking the coward's way out, I simply
    stuck the Caldera CD into the cup holder, "powered up" the VM
    and told Caldera to perform a minimal installation.  This gave
    me a bootstrap OS with network capability, and which could access
    the HURD drive as /dev/hdb.  I did little else from the host
    machine after this.

3.  Steps 3-5 were straight from Matthew's instructions.  I ftp'ed the
    HURD tarball and GRUB image to the bootstrap machine, then
    created the GRUB floppy.

4.  cfdisk'ed the HURD drive, splitting it into a 512MB type83 Linux
    partition and a 64MB type82 Linux swap partition.  (I vaguely
    remember some recent discussion on the list concerning the need
    for a swap partition, whether or not you actually think you need
    it.)  Executed "mke2fs" against the HURD partition, then mounted
    the new HURD filesystem on /gnu.

5.  Un-tar'ed the tarball into /gnu, then dismounted the HURD filesystem.

6.  VMWare wouldn't let me power-up the HURD VM without first shutting
    down the bootstrap OS -- it didn't want to have two VMs with
    concurrent access to the same virtual hard drive.  So I shut down
    the bootstrap OS and "powered off" its VM, then "powered on" the
    HURD VM (having first inserted the GRUB floppy).

7.  GRUB came up and prompted me for boot options.  I selected single
    user boot for hd0.  Then it complained that it wasn't able to find
    the servers.boot file.  I didn't know yet that I should have tailored
    the /boot/grub/menu.lst file on the GRUB floppy (Matthew - you
    might want to add that to the easy guide).  For the nonce I simply
    typed in: /dev/hd0s1/boot/servers.boot

8.  GNU HURD booted up like a charm.  I was amazed and laughed like a
    maniac.  My wife thought I'd lost my mind.

===

It occurs to me that a tar'ed VMWare virtual machine would make a
dandy development distribution for something like HURD -- iff the
developer is licensed to use VMWare.  Of course, VMWare is commercial
software, not free, and should not be absolutely required for doing
development.

But I have to say that having the facility (plus Marcus' tarball) sure made
things absurdly easy for me.  If a HURD VM image was available online, anyone
running VMWare could be operating a GNU/HURD in little more time than it takes
to download it.

I don't know how many VMWare licenses have been sold to date, but at
$100 for a personal copy it beats buying additional disk drives, opening
your computer, going through the repartitioning hassle, booting and
rebooting.  It also affords you some protection; the VM under test CANNOT
hurt your host system.  If you haven't already looked at VMWare, maybe you
ought to.

===

I have a million questions, most of which stem from having rather a
novice view of things Unix.  For example, Matthew isn't all that clear
about which nodes should be defined in /dev -- he assumes rashly that
I know what I'm doing.  I ran MAKEDEV against fd0, hd0, hd0s1 and hd0s2
and sort of prayed that I was doing it right.  I'll probably have to do
the same for the virtual ethernet device, and some consoles... but I've
got some reading to do before that.

BTW, this may or may not be an issue: whenever I depress and hold CTRL-ALT
in the HURD VM, HURD makes some noise:
    kd_setleds1: unexpected state (1)
    kd_setleds1: unexpected state (2)
I don't know what VMWare's virtual machinery is presenting to Mach when
this happens.  CTRL-ALT-ESC is used by VMWare to cause it to toggle the
keyboard focus to/from the VM.  Unless someone else can give me a clue,
I'll take it up with the technical support folks at VMWare.

Overall, this was a fun way to burn a Saturday afternoon.  Gordon,
Marcus, Matthew, OKUJI, Roland, Thomas, others -- you all do fine work.
Keep up!

--
David Andrews
dba@duda.com


Reply to: