Difference between revisions of "EBC Exercise 07 Installing Ubuntu in VMware"

From eLinux.org
Jump to: navigation, search
m (Playing with pasting from Joomula)
 
m (Cleaning up html)
Line 1: Line 1:
<p> </p>
+
Here's step by step instructions.
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">Here's step by step instructions.</div>
+
Go to http://sourceforge.net/projects/vmmanager and get VMmanager, install and run it.
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">Go to http://sourceforge.net/projects/vmmanager and get VMmanager, install and run it.</div>
+
 
 
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">Select "Creat a new virtual machine"</div>
 
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">Select "Creat a new virtual machine"</div>
 
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">Select Operating System:  Linux</div>
 
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">Select Operating System:  Linux</div>

Revision as of 14:06, 26 February 2010

Here's step by step instructions. Go to http://sourceforge.net/projects/vmmanager and get VMmanager, install and run it.

Select "Creat a new virtual machine"
Select Operating System:  Linux
Below Select:  Ubuntu Linux
Project name:  Ubuntu 9.10
Tab RAM:   512M  (make this no more than 1/2 your RAM)
Hard Disk: 20480 (we want 40960, but it won't do that)
Unselect "Allocate all disk space now"
Keep Selected "Split into 2GB files"
Tab Ethernet:  Ethernet 0, NAT, Ethernet 1 Bridged
Tab Adapters: Select USB, COM1 COM2 and Sound Adapter
Tab Finish:  Click "Ok" pick a file name.  It should quickly say it is finished.
Restart VMmanager
Select "Modify an existing virtual machine"
Select the machine you just saved.
Tab Hard Drive
Select "Unlock"
Enter 40960
Tab Finish
Click "Ok".  It should quickly say it is finished.
Get the VMware player (I got 2.5.3) at:
www.vmware.com
Install it
Get the Ubuntu iso image at http://www.ubuntu.com/
Click on the vm you created above.  (*.vmx)
The VMware Player should start.
Click on the CD icon on the bottom right.
Select Disconnect.
Click on the CD icon again and select "Connect to disk image file (iso):
Select the Ubuntu iso file you downloaded.
On the top left the widow select the menu VMware Player:Troubleshoot:Reset
The VMware Player should find the iso image and start the Unbuntu install.
Select:  Load Ubuntua
Hint 1:  You may have to hit ctrl-G to get the VM to listen to your keyboard.
Hint 2:  It won't see you mouse at first, so use the keyboard.
Hint 3:  Ctrl-Alt will release the mouse for outside the VM.
Answer questions for your location.
Select "Erase and use the entire disk"
Answet the rest of the questions.
Select install and wait a while.  My install took about 1/2 and hour.
Restart the system when asked to.  You may be asked about ejecting the CD-ROM.  I clicked No.
Once Ubuntu is running you can right-click on the CD-ROM image and unmount it.  Then
go to the CD-ROM icon on the bottom right and disconnect from the iso image.
The Update Manager may appear.  Go ahead and have it update everything.
It took 15 minutes on my system.
##### Installing beagleboard-demo-image on Ubuntu under VMware
I got and error the labgwaether had failed.  I check the log file given in the erro and it said
tmp/staging/i686-linux/usr/lib/libxml2.so.2 had an undefined symbol gzopen64.
The path tells me it's something being compiled for the guest OS (not the target).  I googled
for libxml2.so gzopen46 and found this help:
The library /usr/lib/libz.so should contain gzopen64, but some versions don't.
The version at /usr/lib/libz.so had gzopen64, so I did
cd tmp/staging/i686-linux/usr/lib
mv libz.so libz.so.orig
ln -s /usr/lib/libz.so .
I had made this change earlier and it looks like some tool had undone it.
##### Other notes
Here's how I get ubuntu running in a vmware window.  The instructions are:
Here is a preloaded VMware image with Ubuntu 9.04
You can get the Ubuntu iso image at the link below, but you don't have to.
Get the VMware player (I got 2.5.2) at:
www.vmware.com
Instructions are at the bottom of this page:
Here is some other useful information:
# The install has an 8G virtual drive.  We need a bigger drive so use:
# In ubuntu run
sudo apt-get install gparted
#######################
The network didn't work until I switched to NAT.  Do this by selecting the
network icon on the bottom right of the VMware window.  Select NAT, disable
the network, then enable it.  It should connect.
### Notes on creating own VM appliance
###### DNS
# DNS doesn't alway work on its own.  Editing /etc/resvol.conf and adding
nameserver 137.112.4.196
# Seems to make it work
###### Disk Mount
# Here's how to get to the files from outside vmware
##### minicom
sudo apt-get install minicom
In minicom hit ctrl-A then O to configure.  Turn off Hardware flow control.
Set to /dev/ttyS0
##### Eclipse
www.eclispe.org
sudo apt-get install openjdk-6.jre-headless
###### Setting Time
# The date was a couple of days off.  It this happens try:
sudo apt-get insall ntpdate
ntpd

It's pretty much agreed that if you are going to develop for embedded Linux, you should do it in Linux.  The problem is many have some form of Windows OS installed.  Here are step by step instructions on how to install a virtual machine running Unbuntu Linux on your Windows box.

 

First we'll set up the virtual hard drive, then we'll get the virtual machine software.  The hard drive is set up using some third party software.

  1. Go to <a href="http://sourceforge.net/projects/vmmanager" target="_blank" title="http://sourceforge.net/projects/vmmanager">http://sourceforge.net/projects/vmmanager</a> and get VMmanager,
  2. install and run it.
  3. Select "Creat a new virtual machine"
  4. Select Operating System:  Linux
  5. Below Select:  Ubuntu Linux
  6. Project name:  Ubuntu 9.10
  7. Tab RAM:   512M  (make this no more than 1/2 your RAM)
  8. Tab Hard Disk: Unselect "Allocate all disk space now"  We'll make the hard drive bigger in a moment.  This is working around a small bug that requires all the disk space to be present when you create the machine, even if you don't allocate it all at the beginning.
  9. Keep Selected "Split into 2GB files"
  10. Tab Ethernet:  Ethernet 0, NAT, Ethernet 1 Bridged
  11. Tab Adapters: Select USB, COM1 COM2 and Sound Adapter
  12. Tab Finish:  Click "Ok" pick a file name.  It should quickly say it is finished.
  13. Quit VMmagager
Here's a demo of installing:
{swf}BeagleBoard/install_vmmanager|724|659{/swf}
Here's how to run VMmanager:
{swf}BeagleBoard/run_vmmanager|481|329{/swf}
  1. Restart VMmanager
  2. Select "Modify an existing virtual machine"
  3. Select the machine you just saved.
  4. Tab Hard Drive
  5. Select "Unlock"
  6. Enter 40960
  7. Tab Finish
  8. Click "Ok".  It should quickly say it is finished.
Here is a demo:
{swf}BeagleBoard/run_vmmanager2|481|329{/swf}

Now we can get the VMware player and install it.

  1. Get the VMware player (I got 2.5.3) at <a href="http://www.vmware.com/download/player/download.html" target="_blank" title="http://www.vmware.com/download/player/download.html">http://www.vmware.com/download/player/download.html</a>.  I got VMware Player for Window 32-bit and 64-bit (.exe).
  2. Install it

(

Optional: You can also get the VMware Workstation, but they are out of keys right now.  Do this:

  1. Go to http://angel.rose-hulman.edu
  2. Login
  3. In the middle column click on ROSEportal.
  4. Click on the VMware Global Education on the top right.

)

Next get the Ubunutu image and install it in the machine.  I'm using 9.10.

  1. You can get the Ubuntu iso image at <a href="http://www.ubuntu.com/" target="_blank" title="http://www.ubuntu.com/">http://www.ubuntu.com/</a>;jhowever it's faster to get a copy locally from <a href="http://lug.rose-hulman.edu/mirror/ubuntu-releases/">http://lug.rose-hulman.edu/mirror/ubuntu-releases/</a> or <a href="ftp://ftp.csse.rose-hulman.edu/ubuntu-releases/">ftp://ftp.csse.rose-hulman.edu/ubuntu-releases/</a>.  If you aren't sure which iso to get, look for ubuntu-9.10-desktop-i386.iso.
  2. <a href="http://www.ubuntu.com/" target="_blank" title="http://www.ubuntu.com/"></a>Click on the vm you created above (*.vmx). The VMware Player should start.
  3. Click on the CD icon on the bottom right.
  4. Select Disconnect.
  5. Click on the CD icon again and select "Connect to disk image file (iso):"
  6. Select the Ubuntu iso file you downloaded.
  7. On the top left the widow select the menu VMware Player:Troubleshoot:Reset. The VMware Player should find the iso image and start the Unbuntu install.
  8. Select: Load Ubuntua
Here is a demo:  {swf}BeagleBoard/install_ubuntu|818|664{/swf}

Hint 1:  You may have to hit ctrl-G to get the VM to listen to your keyboard.

Hint 2:  It won't see your mouse at first, so use the keyboard.

Hint 3:  Ctrl-Alt will release the mouse for outside the VM.

  1. Answer questions for your location.
  2. Select "Erase and use the entire disk"
  3. Answer the rest of the questions.
  4. Select install and wait a while.  My install took about half an hour.
  5. Restart the system when asked to.  You may be asked about ejecting the CD-ROM.  I clicked No.
  1. Once Ubuntu is running you can right-click on the CD-ROM image and unmount it.
  2. Go to the CD-ROM icon on the bottom right and disconnect from the iso image.
  3. The Update Manager may appear.  Go ahead and have it update everything. It took 15 minutes on my system.