Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Saturday, March 7, 2009

How to install Ubuntu Netbook Remix (UNR v1.0.1) in VirtualBox

Read This First

Read through this entire post before attempting to use it as reference for your trial as I went through many steps that can be avoided as they do not work. Some things included in this guide:
  • Download the Ubuntu Netbook Remix .iso
  • Create a VirtualBox Guest Install for UNR deployment
  • Boot said VirtualBox machine from the mounted UNR v1.0.1 image and complete the automated installation process (which fails on reboot)
  • Install Ubuntu Hardy Herring 8.10 on modified Virtual machine
  • Add UNR packages to Hardy Herring Install and troubleshoot process

This is as much a tale of my attempt to install Ubuntu Netbook Remix on my Windows XP Hosted VirtualBox installation as much as a guide one how to do it. Note that, once installed, UNR doesn't run well in VirtualBox as suggested in some of the documentation. The cause, as far as I can tell, is caused by how VirtualBox handles OpenGL. This should only be used to test the software at this point, and not implemented as a usable interface.

About Ubuntu Netbook Remix

Ubuntu Netbook Remix is an Ubuntu variant/adaptation designed to work effectively and efficiently with netbook computers. Detailed information and standard installation instructions are available here:
https://wiki.ubuntu.com/UNR

Assumptions/Prerequisites:

VirtualBox is installed <-- tested with 2.1.4 on a Windows XP host
updates
Ubuntu 8.10 is installed in as a guest machine in VirtualBox

Step by Step recount of my attempts, failures, and results


  1. Download image (to mount or burn) from here:
    http://oem-images.canonical.com/unr/unr-1.0.1.iso
  2. Create a new Virtual Machine in Virtual Box (Linux OS, Ubuntu Type). The usual settings should be fine...I used the following settings:
    • 512 mb ram
    • 128mb video memory with hardware acceleration
    • Dynamic sized hard disk
  3. Mount the .iso (or boot from CD if you burned it) and start the Virtual Machine.

    The installation seems to be pretty much automated. There were no options to repartition the drive or preserve any existing data
  4. This step took a little longer than i expected...it was the same splash screen as is usually displayed when ubuntu is loaded, so i may have just expected it to go faster.
  5. After the first restart of the installation process, I encountered an error message:
    FATAL:  No bootable medium found!  System halted

    The following are steps I took to troubleshoot the installation:
    1. restart
    2. check VirtualBox settings, decrease video memory to 32mb with no hardware access
    3. read some information about UNR and VirtualBox from the following:
      https://wiki.ubuntu.com/MeetingLogs/openweekintrepid/NetbookRemix

    None of my troubleshooting procedures corrected the problem, but based on the reading, I decided to try installing 8.10 or 8.04 and using the instructions from
    https://wiki.ubuntu.com/UNR
    to try to install ubuntu 8.xx and perform the necessary alterations to that install so that the final result is basically the UNR release

Second Attempt -- by altering a Ubuntu 8.10 (Hardy Herring) Installation

  1. I began by attempting to install a copy of 8.10 (beta) i had laying around but it was 64 bit edition...and that doesn't work for my VirtualBox/XP host. I then began downloading the x86, non beta, version. For the record, a torrent search lists quite a few heavily seeded torrents which should get you the image faster than you can get it elsewhere. I think it took me 10 mins.
  2. I then mounted it and began installation on the previous machine.
    note: I left the standard 2GB hd size...I was warned that this may not be large enough, but though I'd give Ubuntu a chance to impress me with it's error handling capabilities. After all...it was just a warning, right?
  3. I then encountered an error -- failure to install due to insufficient hard drive space -- they warned me. Ubuntu did fail gracefully into the live session screen, only wasting about 5 minutes of my time.


  4. I shut down and modified the hard disk to start with 4 GB of space and expand if necessary -- had to delete the existing HD and create a new one. I still made it dynamic, bu started it with 8GB to be safe.
  5. Next, I installed Ubuntu easily using default options -- once installed, I agreed to recommended updates (250 mb worth). Some screenshots of the install follow for you screenshot lovers.


  6. After the installation had completed, I did the system updates (System >> Administration >> Update Manager) and installed guest additions...explained in a previous tutorial, here:
    http://chapmanit.blogspot.com/2009/02/how-to-access-shared-files-from-ubuntu.html

  7. Modifying the Ubuntu Hardy Herring (8.10) Installation by adding the Ubuntu Netbook Remix Packages

    note: For the next few lines, instructions came directly from the following web page:
    https://wiki.ubuntu.com/UNR#line-108
  8. As the instructions indicated, I did the following:
    go to system >> administration >> software sources
    • ensure under the Ubuntu tab that Community Maintained... box is checked
    • go to the third party tab and click add and enter the following:
      deb http://ppa.launchpad.net/netbook-remix-team/ubuntu intrepid main
    • click 'add source' and then 'close'
  9. ERROR: I got an error stating no public key was available to validate a signature here.

    After a google search for the error statement, a forum provided the following command line fix with some explanation that was a little beyond me, but here's how to avoid it:
    in a terminal, type the following >>
    sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3F2A5EE4B796B6FE
  10. To resume, open a terminal and type the following:
    sudo apt-get update && sudo apt-get install go-home-applet human-netbook-theme maximus netbook-launcher window-picker-applet and hit enter
  11. (This section wasn't necessary for me, as maximus and netbook-launcher were already check to run when I went to the Gnome Session Manager) The remaining instructions say to chck the gnome-session-manager and to add maximus and the netbook-launcher, which aren't supposed to auto-start. Install them / set them to auto-start. Restart!

  12. It started up correctly...and operated as it was supposed to (forgiving the ridiculously slow performance). There are further instrctions (brief) saying to...
    setup the gnome-panel to mimic the standard UNR set-up. The applet order is as follows:
    go-home-applet | window-picker-applet | notifcation-area-applet | mixer-applet | clock

    ...but i'm not sure how necessary this is.

    Here's Ubuntu 8.10 -- Hardy Herring -- with the UNR packages added, running successfully.

Conclusion


If I would have listened to the recommendations my sources gave and installed onto an existing Intrepid (8.10) install, the whole process would have been easier and much faster. Still, it wasn't hard. That said, even with hardware acceleration enabled (or disabled), it runs unacceptably slow on my system. I saw warnings about Intrepid and about VirtualBox, but my guess is this has more to do with VirtualBox and its ability to render OpenGL graphics. It is running and looks nice...I look forward to trying this on a real laptop!

Sunday, February 22, 2009

How to Access Shared Files from a Ubuntu Linux Guest Install in VirtualBox

Synopsis


This walkthrough describes how to access host-machine shared files from a guest installation of Ubuntu

This should work with other Linux distributions, but was designed for use with Ubuntu, specifically v6.10

Assumptions/Prerequesits


  • Virtualbox (newest version) is installed <--tested on 2.1.0

  • guest OS is a linux distribution, already installed <-- tested on ubuntu 6.10


Steps


The ubuntu guest OS should not be running
  1. In the VirtualBox interface, click on the Ubuntu installation and click Settings



  2. Under the Shared Folders option, ensure that the folders you want to share from the host computer are selected and named appropriately (the names will be referenced later)



  3. Start the virtual Ubuntu installation and log in


  4. While running the Ubuntu guest OS, click Devices >> Install Guest Additions
    note: if you haven't already downloaded and mounted the guest additions .iso, you should be directed to the download location in your browser and when the download completes, you should be prompted to 'mount' the iso in the ubuntu guest installation



  5. Open a terminal window by clicking applications >> accessories >> terminal



  6. Type the following commands (emphasized in bold), pressing enter between each line
    cd /media/cdrom

    sudo bash ./VBoxLinuxAdditions-x86.run
    note: for a 64 bit virtual OS, replace 86 with 64
    enter password when prompted -- this may take a few minutes...wait until you see a 'success' message
    exit hopefully, you saw the message 'Successfully Installed the VirtualBox Guest Additions' // Restart your guest system in order to complete the installation

    Now restart Ubuntu



  7. Verify that you are sharing folders on the host system by going to Devices >> Shared Folders and make note of the 'name' you are sharing the folder as -- you will need to reference this in the next step. Mine is located at C:\Media and I named it 'Media'...that will be used for this example and should be modified to fit your situation.




  8. Open a terminal again and type each of the following lines:
    mkdir windows-share
    note: this can be called anything you like as you are creating a folder which will point to your shared folders
    sudo mount -t vboxsf Media /home/nick/windows-share
    note: If your shared folder isn't called 'Media', then modify this name to reference the 'name' you called your share. Also change 'home/nick/windows-share' to 'home/[your user name]/[the directory you made]'
    Hopefully you didn't get an error message. next close the terminal window (type exit[enter])


  9. note: reference the tutorial text over the screenshot text, as I've tried to simplify it further after taking the screenshot

  10. Now enjoy the fruits...I simply went to places >> home then double-clicked my 'windows-share' folder to access the files



  11. Repeat process to share any further folders...it'll be faster this time!


You are finished, but...


It seems that these steps work to give you access to your files, but when you restart Ubuntu, the mounted folder is gone. To make it persistant (last through system restarts), do the following:

  1. Open the trusty terminal and type the following:
    sudo gedit /etc/rc.local [enter]



  2. Add the following line between the last line with a # before it and the exit 0 line:
    mount -t vboxsf Media /home/nick/windows-share
    where 'Media' is the name of your shared folder and '/home/nick/windows-share' is the directory you created to house the shared folders



  3. Be sure to save the changes, then exit the text editor and restart your computer to ensure it works. Add as many mount -t vboxsf ... lines to that file as necessary if you have multiple shared folders.


References


The following pages greatly helped when writing this:
http://ubuntu-tutorials.com/2007/10/13/installing-guest-additions-for-ubuntu-guests-in-virtualbox/
http://www.giannistsakiris.com/index.php/2008/04/09/virtualbox-access-windows-host-shared-folders-from-ubuntu-guest/