1 Earth. 6.5 Billion Adventures

Anything is Possible

Archive for the ‘Ubuntu Linux’ Category

Repair XP MBR with only an Ubuntu Live CD

I just deleted and old Ubuntu off the Journo’s dual-boot Ubuntu/XP HP Pavillion and along with it Ubuntu’s Grub and her Master Boot Record (MBR), which of course rendered the machine useless.

I had an Ubuntu 10.04 Lycid Lynx Live CD at hand (never leave home without it), so here’s how to repair an XP MBR with only an Ubuntu Live CD.

Repairing XP MBR with Ubuntu Live DC

It’s actually ridiculously easy:

  1. Boot from the Live CD and into Ubuntu (it’s option 1, Try Ubuntu Without Making Any Changes to your Computer);
  2. Once you’re in the OS, from the menu choose Applications -> Accessories -> Terminal;
  3. In the Terminal Window type “sudo apt-get install lilo“, which is a Linux gadget that will fix your woes;
    It downloaded, then gave me a prompt box which required me to hit enter before it installed Lilo.  There were some warnings telling me to do something otherwise the computer might not work. The computer wasn’t working anyway, so I ignored those warnings and…
  4. type “sudo lilo -M /dev/sda mbr“;
  5. Done. Reboot.

The above assumes a straight forward flub with the Master Boot Record and a default setup as far as harddrives go.

I rebooted the PC and voila! it booted straight back in to Windows XP.

Bookmark and Share

How to make OpenERP work on Ubuntu Server 9.10

Yes, the title of this post is a good question.  At the moment I don’t have the answer, but I sure am trying to find it and hopefully, by the end of this post I will have it.

I’ve been trying to do it for the last week, but between my limited knowledge of Linux servers and the totally new world of OpenERP, it’s a learning curve so steep I slip 2 steps back for every 1 forward I manage.

The story so far is that I had the Ubuntu Server running flawlessly, I had the OpenERP server running flawlessly, I even made friends with PostgreSQL, but for the life of me I couldn’t get OpenERP web to talk to the servers enough to successfully create a database and then log in to it.

So at this very moment I’m reinstalling Ubuntu Server 9.10 with nothing more than a mail server, an SSH server and the Samba server.  The rest I’m going to do with what is hopefully the magic bullet – the OpenERP self install script.

Step 1: Install Ubuntu Server 9.10 (8.50am)

I’m doing a pretty much Vanilla install of Ubuntu Server 9.10 32-bit on an ex-Vista laptop.  I’ve said yes to a couple of things:

  • automatic security updates,
  • installing an SSH server (I will manage it from my desktop),
  • the Samba file server and
  • a mail server.

This is all because there is a script out there that will supposedly install OpenERP for me if I have it setup like this. Supposedly.

The install took about 30 minutes, with a fast Internet connection / computer it would likely be faster.

Step 2: SSH to the New Server (9.30am)

I’ve setup my server on a fixed IP address on the office router (for demo purposes 192.168.1.1) and let’s say  my username is ’1earth’.   I launch a Terminal instance and type the following and hit enter:

ssh 1earth@192.168.1.1

The system is working as expected and tells me there are some security updates and upgrades to do.  It’s a bit of schlep as this will take at least another 30 minutes on my slow Internet connect, but for the sake of good system administration I type

sudo apt-get upgrade

Oh nice, it will actually take 50 minutes, so I will gather the rest of the info I need for when it’s done.

Step 3: Follow Installation Instructions for Dummies

If you Google “openerp ubuntu server 9.10 installation” you’ll likely hit one of OpenSourceConsulting’s tutorials. There’s a few old ones, left on there for the SEO ranking no doubt, so make sure you follow the newest one and save yourself hours (if not days) in wasted time.

The tutorial I’m going to follow is OpenERP Installation: All In One For Ubuntu With Updates, with fingers double and triple crossed.

If you’re also trying to install OpenERP on Ubuntu Server 9.10, scroll down and find the “Ubuntu Server (for advanced users not interested in having a GUI desktop)” section. I’m not an advanced user, but it doesn’t bother me if it doesn’t bother you.

Day 1

11.01am – Starting the instructions.

11.38am - It’s been downloading and installing like mad.  According to the instructions I should exit SSH and log in again, however I was now asked for my password and when I entered it, it says “OpenERP will now be installed“. Deviation from the plan. I’m worried.

Nevertheless, I continue and it offers me a choice of Stable or Trunk. I don’t know any better, so I select Stable.

Next it asks me if I want to install the Apache Server (ticked), Extra Addons (not ticked) and Firewall (ticked).  I tick the Extra Addons and thus elect to install everything on offer.

Next it asks me which trunk branches to install and offers a list of unticked items: openerp-spain, magentoerpconnect, report-openoffice, openetl.  I have no clue what any of these are. I assume it’s the Extra Addons I ticked.  I won’t install any of them right now, so I just click OK without ticking anything.

Now it tells me “Enter the DNS name of your URL” and offers openerpweb.com as a default. Dammit, what does this mean? I don’t have a DNS name for my URL. Is it the URL of my server? I use diveserver.dev (which doesn’t exist) and click OK.

Next it offers a list of IP addresses already configured on my Ubuntu system.  The right one is listed. Yay! A feeling of relief. OK to that.

Now it asks for the admin password. Of what? My Ubuntu box or what I want for OpenERP?  I enter one for OpenERP and hit OK.

Ok, now it asks for my SUDO password. I enter it and hit OK.

11.52am Progress bar pops up going left and right and text says “Installing BZR“.  I like the way it’s going so far, it seems positive.

12:01pm OpenERP Server: Downloading latest stable branch from launchpad.net

12:15pmOpenERP Client: Downloading latest stable branch from launchpad.net“.

12:20pmOpenERP Client Web: Downloading latest stable branch from launchpad.net“.

12:26pm OpenERP Addons: Downloading latest stable branch from launchpad.net“. Hmmm, I thought I said no to these.

1.00pm Time for lunch. Hopefully the Addons will be done by the time I get back.

1.56pm – Back from lunch and OpenERP Addons were still installing. I thought it hanged, but then saw that my iMac had downloaded and readied for installation nearly 1GB of updates! I got rid of the iMac prompt and at the same time, it could have been coincidence, the progress bar updated with “DON’T PRESS ACCEPT/OK !!. Downloading and installing Python libraries“.

3.03pm – In the Terminal Window, while the progress bar is still swinging back and forth, it said “Extracting templates from packages: 100%” and then asked for my password.  I typed it and hit return. It line-breaked, but nothing else. Progress bar still swings.

3.51pm – Finally clicked “Cancel” which promptly killed the process. 2 hours is simply more than it should take.  Now I’m going to run ./openerp-allinone-setup.sh again and see what happens.

It’s going through the entire process again, but it skips over everything that’s been done already… and zooms straight past the Python libraries and onto “DON’T PRESS ACCEPT/OK !!. Downloading and installing Postgres Database“. Right, maybe it did hang.

4.26pm – “DON’T PRESS ACCEPT/OK !!. Installing OpenERP Software” with non-disruptive warning message before it switched.

4.32pm – “DON’T PRESS ACCEPT/OK !!. Downloading and Installing Apache

4:36pm – “DON’T PRESS ACCEPT/OK !!. Enabling Firewall settings

5.03pm – Patience is running thin and it’s still enabling the Firewall settings. Surely it doesn’t take 30 minutes? I’m clicking cancel.

Cancel didn’t work, so I CTRL+C’ed the terminal window and it escaped. So, running the script again. It says OpenERP is already installed, do I want to upgrade it.  I said no. Fudge. Let’s see if it works.

It says there should be an OpenERP-README.txt file with further instructions.  I can’t find it with ‘sudo find / -name OpenERP-README.txt’ so I’m going to go through the upgrade process and see what happens. Sigh.

Right, upgrade went quick and it said all’s OK.

5.13pm I go to http://192.168.1.1:8080 and it loads. I feel nothing, this is as far as I got. The proof is in the pudding, or the database creation.

5.14pm Clicking on the Database button takes me to http://127.0.0.1:8080/database and that obviously doesn’t work. Is this a bad setting I made somewhere coming to bite me in the ass, or what’s the story?

6.00pm After 45 minutes more of searching and reading I’m nowhere nearer to the answer than I was before.  Everyone in the office are leaving and so am I.  I’m secretly hoping that after a restart it will work thinking that it’s a stuck cache or something somewhere.

Day 2

9:10am I dreamed about this install last night.  First thing I did was check out my hosts file, but all seems OK.  I downloaded HTTPFox for Firefox so that I can see what traffic my browser sends and receives and where it gets told to go to 127.0.0.1, by OpenERP or what.

Ha! When I click the databases button on OpenERP-Web’s login page, my browser asks for 192.168.1.1, but then is redirected by OpenERP to 127.0.0.1.  A quick Google now using “OpenERP redirects to 127.0.0.1” yields this OpenERP Forum thread, which related to OpenERP 5.0.2.  But let’s try their solution and see if it works for OpenERP 5.0.7 as well.

In my /etc/openerp-web.cfg file tools.proxy.on = True already, so I change tools.proxy.base = ’192.168.1.1′, save and restart both the server and web.

9.30am – Right, that seems to take it to the right server (diveserver.dev – which doesn’t exist, but which the install script automatically added to my server’s hosts file and therefore works).

However, now Firefox is adamant that the security certificate is a problem (annoying, but Firefox is just protecting me) and it won’t let me continue, nor add an exception for it here or manually in the settings box.

I’m going to have to create myself a proper certificate that I can import.  Is nothing easy?

12.10 – I give up.

Creating a certificate didn’t work for me, because Firefox still complains about it not being trusted. I also couldn’t access the site using Safari or Chrome, both giving similar but different reasons to Firefox.  I tried taking the server off SSL, but I obviously don’t know how to do that either.

I’ve wasted enough time doing research on how to get this to work. My OpenERP adventure ends here.

Next, lets try OpenBravo.

Bookmark and Share

Ubuntu 9.04 64-bit on Acer Aspire 4535

I recently said goodbye to the Acer Aspire 4920 I was using for a brand new Acer Aspire 4535, a decision I might ultimately regret, time will tell.

As the Acer Aspire 4535 comes with an AMD Turion x2 64-bit processor, I thought this was the ideal opportunity to install a 64-bit operating system to see if 32 vs. 64 means anything to me. So I downloaded Ubuntu 8.10 Jaunty Jackalope 64-bit Edition and installed it.

Without going into detail, the default install went smoothly and everything worked fine. The ATI Radeon HD 3500 graphics card driver was made available, which installed and worked out of the box. Even got desktop effects going without having to tinker around at all. Everything else worked like you’d expect it to.

I started hitting snags when I downloaded new stuff though – Firefox 3.5 was first and installation failed a few times before the 64-bit version worked for me. Maybe I just don’t understand it so well. The next snag came when I tried to install the Flash plugin for Firefox – by default Adobe doesn’t offer an option for 32 or 64-bit versions, so you think you’re merrily downloading the correct software, only to be told “incorrect architecture” when you try to install it.

There is, of course, a workaround for this, but I haven’t gotten to it yet, because I encountered a fatal error when trying to set up dual screens with an extended desktop.

On the Aspire 4920, which has integrated Intel graphics, I had dual monitors working like a charm. I have an Acer (9:6) screen at home which is positioned above the notebook while at work a BenQ (4:3) screen is positioned to the right of the notebook. I think I had to fiddle with Xorg to get it working initially, but I don’t remember it being a pain. Point is, I had it working and Ubuntu intelligently remembered when I was at work and when I was at home, using the correct rez and positioning in each location.

So here I was with Ubuntu 64 on the Aspire 4535 and struggle as I might, dual monitors would not work for me at all. Accessing the properties through Ubuntu’s Display manager makes it hang, and ATI’s Catalyst Control Centrer refuses to give me dual monitor options – even though it happily clones the notebook’s output.

After struggling with it (and a slow internet connect), for a day, combined with tech-fatigue of a mammoth restore and a learning curve with the subtle differences of 64-bit software, I gave up. I’ve decided to go back to 32-bit and see if my life is easier.

However, I will be upgrading to Karmic Koala at the end of the month anyway, so I decided I may as well try Karmic Koala Beta now. So I’m downloading Ubuntu 9.04 Karmic Kuala Beta to give it a run and see if it plays nice with my new lappie.

Watch this space.

Bookmark and Share

Installing Firefox-3.5.tar.bz2 on Ubuntu 9.04

Your problem: you’re running Ubuntu and your current Firefox 3.0.11 is not offering you the much anticipated, very exciting upgrade to Firefox 3.5.  So you’ve downloaded the firefox-3.5.tar.bz2 file and now you want to know how to install it.

Update: If you’ve already installed Firefox 3.5 and now want to upgrade to Firefox 3.5.1 then check out the instructions of How to Upgrade To Firefox 3.5.1 on Ubuntu below. If you’re upgrading from 3.0.11, then just follow the instructions as is.


I’m running Ubuntu 9.04 Jaunty Jackalope and I”m more of a visual user than a command-line user, so I’m going to tell you the way I did.

Rest assured, doing this you will not lose any bookmarks or settings from your current browser. But backup just in case.

  1. If you haven’t yet, download the new Firefox 3.5 from Firefox.com to your desktop
  2. Right-click the file (firefox-3.5.tar.bz2) and choose Extract Here
  3. You will now have a new folder on your desktop called Firefox. Rename it to Firefox-3.5
  4. Open a terminal window (just this once) and type sudo nautilus – this will launch your file browser with root privileges
  5. Navigate to File System -> usr -> lib ( /usr/lib/ ) and copy the folder Firefox-3.5 into this directory
  6. Open the folder Firefox-3.5 and find the file called Firefox.
  7. Right click and Make Link. It creates a file called Link to Firefox
  8. Cut and paste this link to File System -> usr -> bin ( /usr/bin/ )
  9. There is already a link called Firefox so rename that to Firefox.old (if there isn’t, don’t worry), rename your new Link to Firefox to just Firefox

All done.  Now close down all your current Firefox windows, and restart with the improved Firefox 3.5. Tada!

To upgrade in future

You can use Firefox’s built in Check for Updates function, however, this only works when you run Firefox as root.  I did the upgrade moments ago, but had some trouble, so here’s what should work:

  • Open a terminal window and type gksudo firefox;
  • This will launch Firefox and the Check for Updates option under the Help menu will be active;
  • Choose the option, Firefox will check and install any updates. Close and restart Firefox.

Warning: I ran this process as sudo firefox, which apparently is the wrong way to do it.  If you re-open Firefox and there’s a red bar at the top that says your history and bookmarks are locked because it’s in use by another program, then something went wrong. In this instance, root locked several files in my .mozilla user directory, so I couldn’t use it as a normal user.

To fix it, close Firefox and do this:

  • Open a file browser and got to home -> yourusername -> .mozilla -> firefox -> xyz.default (profile folder)
  • Leaving it open, open a terminal window and type sudo nautilus, which will open a second file browser, and then navigate to the same folder
  • In the first file browser window you will see that some files have a locked icon on them
  • In your second file browser you won’t see the locks because in that window you have root privileges. So in that window, right click the files and bestow your username onto the locked files, giving permission back to you as a normal user.
  • Relaunch Firefox and all should be as it was intended;
  • If anybody has a reason/easier way to do this, I’ll be happy to hear from you

Successfully upgraded to Firefox-3.5.1

Bookmark and Share

Windows XP running on Ubuntu

I’ve just managed a setup, which if I didn’t see or do it for myself, I wouldn’t believe it: I’m running Windows XP inside Ubuntu like another program.

If you’ve spent any amount of time on this blog, you will by now realise my non-too-subtle affinity for Ubuntu.  Yet, I still need Windows for some unported software, so I’ve been unable to totally boot Bill’s bloat.

I’ve very cleverly (I thought) set up a dual boot so that my default OS is Ubuntu (currently 8.10 Intrepid Ibex) and with the tap of the ESC key Windows XP is a secondary option in my Grub boot loader.  This is however still a pain in the donkey, because when I need to do some minor tasks in my Windows-only software I have to shut down, reboot, do what I need to do, shut down and reboot again. This could happen several times a day as the tasks trickle in.

So it was then that I had my dinner in front of YouTube this evening, watching the new and interesting stuff featured on the front page.  There was this Mac vs. PC clip that set me off on the PC path (I’m always keen to witness the new skirmishes on this war-torn front).

And, as you do, I clicked through on the related stuff until I got to this clip, “How to run Windows XP on Linux Ubuntu with Virtualbox“. Now I’ve dabbled with Wine aplenty, but have had nothing but hangovers, as often I can get the programs to run, but then invariably some or other important function is rendered impotent. So this claim to run Windows on Ubuntu intrigued me no end.

Sun XVM VirtualBox

As the clip above illustrates, those great guys and gals at Sun have perfected (I hope and pray) this free, open source software, which doesn’t run one or two Windows applications in Ubuntu, nay, it actually runs the entire Windows operating system in Ubuntu.

And it does so smoothly in a few very easy steps.

I downloaded Sun’s VirtualBox from their website and installed the software in Ubuntu.  Then I installed the VirtualBox software in Ubuntu and after a few questions it had readied a virtual harddrive for my Windows installation.

Once you launch this virtual environment, you work inside a normal Ubuntu program window. In this instance though, the program window represents a virtual computer screen as if you’re working on another computer, or box (slang), within Ubuntu.

You then push a virtual power button on your virtual box, and it starts up much like a real computer. If you’ve assigned your CD drive, it boots from there and in my case from my Windows XP installation CD.  On your virtual screen, which represents your virtual computer, Windows XP then installs itself like it will on any computer.

Windows running on Ubuntu

And moments later, you have a fully working install of Windows XP, running in an Ubuntu window, which you can even minimise to your Ubuntu taskbar if you want.  Some clever connectivity lets you access your Ubuntu shared folders from within Windows via a virtual network, so you have a fully integrated environment.

For me, this is sheer bliss, because now I don’t have to reboot my machine – ever.

Taking it a step further, I connected my old, cracked Acer LCD and used Ubuntu 8.10′s slick Dual Screen Setup (no headaches like up until as recently as 8.04), so the laptop is entirly Ubuntu, and the LCD is, for all pratical pruposes, Windows XP.

This allows me to do my  normal stuff on my laptop unhindered, and then when I need to reach over into Windows XP for some graphic or web tweaking, I simply move my mouse cursor to the right and viola!, I’m in Windows XP.

Unbelievable.  A computer geek’s wet dream.

I love Ubuntu.

Ps. I noticed in quite a few videos people mispronouncing the word Ubuntu.  It’s pronounced “ooo-boon-too”. It’s a Zulu language word (from the Zulus, an indigenous people in South Africa) and, in a very broad sense, means humanity towards others.

Bookmark and Share



Archives


Feeding Time


Meta




Other Adventures