Tuesday, June 29, 2010

Where to go for help with Ubuntu

OK. So you've downloaded the latest version of Ubuntu, or even scored yourself an installer CD. Something doesn't go quite right with the install - where do you go next?

You may be able to still use Ubuntu as a live CD, meaning you could use it to access the internet. Or, if you were thinking of trying a dual-boot installation, you could still get on to the net from your existing install.

The first place I look is the Ubuntu forums. They are quite popular, with loads of visitors. Whatever problem you're having, someone is bound to have had something similar. These things are invaluable. As a matter of fact, even though I've visited them for years, and found heaps of solutions, I'm still yet to make a post myself. I just haven't needed to. The same thing happened with the Gentoo Linux forums, back when I used to run that.

As a matter of fact, if you can't find an answer in the Ubuntu forums, try some different ones - like the Debian User Forums. Since Ubuntu is based on Debian, there is a lot of similarity.

Another community I've been a long-time member of is Overclockers Australia. Their forums also provide a wealth of information - the Other Operating Systems forum in particular comes in quite handy.

Back on the Ubuntu site, you could try the Official Ubuntu Documentation. Sometimes though, it can be a bit lacking in detail, or it can be a little dated. This is why I suggest visiting the forums first.

Then there's always Google. Which could be how you found this page...

Another option is to download the free ebook, Getting Started with Ubuntu 10.04, by the Ubuntu Manual Project. Lots of info there in setting it up.

Monday, June 28, 2010

Ubuntu 10.04 progress update... update

Well I should have known I'd jinx myself when I mentioned in my last post that the strange, hanging at boot problem has solved itself. Just this morning, the day after I posted, the thing just hung at the boot splash screen. A quick control-alt-delete got the thing rebooting, and it all started fine after that. Looking in the log file viewer revealed nothing out of the ordinary; checking the ubuntu forums showed up nearly nothing, apart from the fact that it happens to other people too.

I say nearly nothing, because I did learn one thing. If you hit escape while in the boot splash screen, the pretty graphics go away and the boot messages come up. I now want the machine to have problems at boot, so I can try this and see if anything interesting appears. Yeah, reverse psychology. I want you to fail at boot, all the time!

(Originally posted June 28, 2010 on my other blog)

Ubuntu 10.04 progress update, and a bit about Crashplan

Well it has been a couple of months now, using Ubuntu 10.04 Lucid Lynx. Overall, I have been pretty happy with it. Boot times are very quick, especially with it installed on the Intel X25-V solid state drive. The interface is quite polished and looks good. MythTV is working nicely as well. I did have a spell a little while back where it would hang during boot or shutdown, requiring a restart. Either that, or there would be a quite long delay in the boot process. I tried to work out what was causing the holdup by installing bootchart (available in the repositories) and looking at the results.

Wouldn't you know it, but after I installed it and rebooted, the system worked fine. Everything has been back to normal. Don't know what was wrong or what fixed it. Oh well, I'll take it.

I have a sneaking suspicion that it might be due to doing an upgrade install rather than doing a fresh install - I'll wait and see if it keeps behaving itself.

Backing up the various systems around the house has been something that has been looked into lately, too. I have purchased a new external hard drive to replace the old one, that is now getting a bit old. Following on from discussions on the Overclockers Australia forums, I have been trialling Crashplan, a backup service that allows you to back up to local folders or attached drives, other computers on a network, other people's PCs, or their own online backup service. It is more concerned with backing up data, rather than complete system images, so that's what I use it for.

It has enabled me to get around some of Windows 7 Home Premium's limitations about backing up to a network. The setup I have now for my wife's Windows 7 PC is that the standard windows backup runs, sending its data to a small external drive attached to it. Supplementing that is Crashplan, that backs up documents, photos, music and the like to the new external drive attached to my PC, giving a bit of redundancy.

My own PC has a regular backup scheduled via backintime to get most of the system data, and Crashplan to back up the music, photos, documents and the like.

On all machines, these are scheduled to run daily with the exception of the windows system backup that is set for weekly running.

I haven't yet decided whether to take the plunge and purchase the Pro version of Crashplan, or to enable the online backup component. I'm just waiting to see how the software behaves itself - I have overcome one particularly nasty teething problem.

Sometimes when my Linux machine boots, if the external drive hasn't mounted in time, Crashplan would decide to re-create the backup directory on the system partition and try to back up ~140GB of data to it. I've fortunately managed to catch it in the act and stop it before anything nasty happened, but it made me hesitant to make the purchase. I am not the only one who has had the problem, as this support forum thread describes.

I tried a couple of fixes - one was to change the program setting to only allow it to run between certain times, so the machine would be on, and the drive mounted in time, before it starts. This worked well until a few days later when I came home late from work and booted the PC. Backup to system partition happened again. I tried editing the startup scripts, adding a "sleep 20" command, to delay the program from starting until the drive was mounted. I thought this was the solution, until I one day turned the PC on and walked away to do something else. I came back, logged in, and realised the drive wasn't mounting until after I did that. Crashplan started as soon as the 20 second delay ran out, which turned out to be before my login.

The final solution, and I think this has nailed it, was to add an entry for the external hard drive in the /etc/fstab file. This now mounts the drive straight after it mounts the other, internal drives, and well before the Crashplan engine starts. Since the external drive is a semi-permanene attachment to the PC, it works for me.

I may yet start using the online backup - the only issue now is the matter of uploading nearly 200GB total over a 512 kilobit upload link, with uploads counted towards my data allowance. This would have to be spread out over a couple of months of uploading at a throttled speed.

Overall, I'm pretty happy with Crashplan so far. It supports Windows, OSX and Linux, which is rare. The clients all find and connect to each other with a minimum of hassle as well. It would be good having some peace of mind that all our photos and documents would survive if the house burnt down or something.

(Originally posted June 26, 2010 on my other blog)

Most painless Ubuntu upgrade ever

Wow. That's all I can say. Today I decided to upgrade to Ubuntu 10.04, but rather than doing a clean install like I have done with previous versions, I thought I'd have a go at the upgrade. To prepare, I copied the /boot, root and /home partitions of the existing 9.10 install to some free space on another hard drive. Just as a precaution in case it all went pear-shaped. I ran the update manager, chose the upgrade option, and away it went - downloading all the new packages, applying the updates. Only a couple of dialog boxes popped up asking about Grub, and what it should do with it.

The process finished without incident, I rebooted, and surprisingly, it started, allowed me to log in, and it got to the desktop! All previous programs and settings there, all programs updated. I am pleasantly surprised - even MythTV updated without a hitch, for the first time. I'm sure there will be the odd hiccup along the way that I'll discover in time, but so far so good.

Oh yes, regarding Windows 7 - I've removed it from my machine. Partly because I was barely using it, apart from watching full-screen Flash videos in decent quality, partly because I have obtained an old laptop from work, and installed 7 on that.

(Originally posted on May 2, 2010 on my other blog)

New keyboard! And more on Windows 7

This post is basically inspired solely by the fact that I have bought a new keyboard and need an excuse to do a lot of typing on it. After finally having enough of interference, non-responsiveness and battery changes, I ditched by former wireless keyboard and mouse combo and bought a couple of new ones - a Logitech M500 corded mouse and an Illuminated keyboard. It has a nice, laptop-style key feel with just a little more travel, with the added bonus of keys that light up for use in a dark room.

I love it. Ubuntu picked it up without a problem, all keys working just fine. Windows detected it as well, but after installing drivers for it, insisted on a reboot. Some things never change. I didn't bother installing the setpoint software that is included - no need for it in my opinion.

As a progress update on my dual-boot exploits, there have been good points and bad about windows.

The good:
  • Sleep actually works. It worked even better when I downloaded a patch that stopped it crashing on resume when the hard drive didn't wake up in time. In Ubuntu, I only ever got to a blank screen with a blinking cursor when I tried the suspend feature.


  • Full-screen flash videos work with hardware acceleration. Only 5-10% CPU utilisation, compared with almost maxing-out a core under linux. This is due to differing stages of development of Adobe's flash player.


  • General polish and feel of the desktop. You can tell a lot of work has gone into this. The help functionality is excellent as well - far better than Ubuntu's vague documentation.


  • Backup works great - nice and straightforward, asking to also create a startup disc for system recovery. In Ubuntu, I am using backintime. While it is great for making backups, restoring from them is not so straightforward. Must look into an image based program.


  • Homegroups work great - it found the other Windows 7 PC on the network with no problems and is effortlessly sharing files between them. I can even use the printer connected to the other machine - a Canon that has stuff-all driver support under linux.


  • The bad:
  • While sleep works, the simpler task of powering off the screen after a set period seems more difficult for it. It doesn't always do it. Then again, a number of XP systems at my work have problems with that as well - and they are factory Dell and HP boxen.


  • The media centre application isn't quite up there with MythTV, one of linux's killer apps, in my opinion. Guide data is only available from the networks' broadcast guide, and I can't find a way to get it to set up two tuners. Actually, finding any documentation on it is somewhat difficult.


  • All the rebooting needed. It's still there, and it gets old pretty quick.


  • I think I'll be dual-booting for a while longer, especially since MythTV will not be replaced any time soon. It has been interesting though, and I am learning the interface and all. I have noticed a lot of fixes since the Release Candidate that I was running last year on the other PC.

    (Originally posted on January 29, 2010 on my other blog)

    My journey to the Dark Side is complete

    Well, not complete. But I did buy the Windows 7, 3 user family pack for $209. I'll be installing it on the wife's PC today. I also put it on as a dual boot on my ubuntu system, for a laugh. I managed to get it to activate, using method #2 on this page, from Paul Thurrott's site. And after windows thoughtlessly overwrote the MBR on my drive, I even got my grub 2 menu back, following this excellent guide on the ubuntu forums.

    One other thing I had to do on the ubuntu side of things is set the system clock to be local time, not UTC. I had to go edit the file /etc/default/rcS, and change the value UTC=yes to UTC=no. They seem to be playing OK together now. It's just a shame that windows can't see the data on my ext4/ext3/XFS partitions. I don't know if I can be bothered putting my data on an NTFS partition yet, so it can be seen by both systems. I'll see.

    (Originally posted January 7, 2010 on my other blog)

    The Dark Side is looming...

    Well. I'm having a crisis of faith. Looking at going back to the dark side. Windows 7 Home Premium, 3 user pack for ~$210 depending on where you shop. With the Release Candidate soon to expire in the next few months on the wife's PC, I have to either put XP back on it, or move to Windows 7. The 3 user pack is a good deal, normally it's about $160 for a single user, but it is going to be very short-lived. It only ran a couple of months even in the USA. There's a sense of urgency to this.

    My wife couldn't care less what OS is running (as long as it's windows), so there'd be no problems with putting XP on, in her view. Realistically, I just need to get a decent backup program for it, because the Win7RC one is pretty good, while the standard XP one is rubbish by comparison. The only issue with the RC is while it is scheduled to run every Saturday at 3am, it seems to insist that the next scheduled time is December 30, 1899. Back in the days of steam-powered computers. I assume it is fixed in the release version of Windows 7.

    Over the last few days and weeks, running linux has started to wear me down a bit. It is such a battle sometimes, to do stuff that would be simple in Windows or even OSX. Yesterday I wanted to install Google SketchUp – no native linux client, so installed through Wine. Go to run it, crashes straight away. Then it's off trawling forums and web searching for fixes, workarounds, all of that. Then there's flash player. Still buggy, still get sound lagging behind so speaking is out of sync. There's always more work, a lot of the time. F-Spot is a piece of crap, crashing all the time. Picasa is a half-arsed effort, just a windows program running under wine, really. Just doesn't look right.

    But still, there are aspects of linux that I love. MythTV is the killer app, in my opinion. There is nothing in the proprietary software world that is so capable and unrestricted, with nothing locked down by media companies. I would miss that the most if I went back to windows. Being able to scroll anywhere without first clicking in the window is something I wish windows had, when I'm using it at work.

    Anyway, I'll keep thinking about it, and pick it up on boxing day if I decide to. Otherwise, I could put that money towards hardware. I need a new screen, which I'll get regardless, but that $200 could go towards a solid state hard drive. Mmmm, fast.

    (Originally posted December 25, 2009 on my other blog)

    Desktop OS in 64k - GEOS

    Over the last weekend I had a sudden attack of nostalgia for the Commodore 64. I have fond memories of the thing, having one for my first computer. I remembered how there was an operating system available for it that was able to show a graphical desktop, with icons and all, a WYSIWIG word processor, even a spreadsheet, in only 64 kilobytes of memory. It was amazingly tightly coded, and such a difference from today's software that needs tens of megabytes to show a pissy icon in a system tray, for instance.

    This operating system was GEOS, standing for Graphical Environment Operating System. An excellent article about it is here. I felt like having a bit of a tinker with it, relive some old memories. One problem though was I no longer had a C64 to load it on. However, emulators came to the rescue. For linux, I installed VICE, which is in the ubuntu repositories. To make it work though, you have to download the version from viceteam.org, that contains the ROM files that are not included in the ubuntu version. There are two ways of putting the ROM files in.

    First, the way I tried, was to unzip the version 1.22 file from viceteam, and copy the ROM files into the installation directories (in ubuntu, it is /usr/lib/vice/). The ROM files are the ones without file extensions that live in the data directory in the zip file. They are named 'kernal', 'basic', 'chargen', and so on, and are in different subdirectories for different commodore models the program emulates. Once it is installed and the ROM files are in the right spots, you can start the C64 emulator by typing 'x64' at the command prompt. If all goes well, you will see the C64 screen come up in a window.

    The second way, which I did not try, is to follow the instructions here for compiling the latest version of VICE.

    Once you have the emulator running, you can download a copy of GEOS. Put the *.D64 files in a directory somewhere, and using VICE, choose the File -> Attach a disk image -> Unit #8 menu. Point it to the GEOS64.D64 file, and it should start loading. You can then marvel at the mid-1980's computing experience. It is similar to the first Mac desktop, but was available for a fraction of the price.

    There are other productive things you can do with the Commodore 64 emulator, too...

    (Originally posted November 20, 2007 on my other blog)

    The little PC that could - resurrecting an old PC as a file server

    One of the little PC related projects that I recently undertook was to do something about a backup strategy. I wanted something that I didn't have to think about much; that would perform backups basically unattended. That pretty much ruled out burning stuff to DVDs - too tedious. I did that previously and ended up backing up stuff about twice a year. The other issue is I have two PCs to back up - my main one running Ubuntu linux, the other machine of Mrs Bort that dual boots into Windows XP and Gentoo linux. The second machine also has no DVD drive. The answer came down to three options:

    1. A tape drive. Expensive, I'd also need a SCSI adapter card to put in the machine and buy a bunch of tapes. While capacity would probably be OK, I'd have to get the drive up and running in linux, and if something were to happen to the machine with the tape drive (fire, for instance) I'd not have a way to get the data back without buying a new drive. I never really considered it as an option. 
    2. External Hard drive. I already have an external box, but I think the power connector is a bit flaky. Last time I used it the disk would spin up, down, up again. Wouldn't really trust it. I'd have to buy a new disk drive, something big enough to hold what's on two 250G drives (one in each PC). I then thought, well, if I have to buy a new disk, I could put it in...
    3. A linux fileserver, built from an old PC I had lying around. This is the approach I took, described below.

    For sentimental reasons mainly, I still had the case that my first PC came in, a beige Arrow minitower case. Bought from the now defunct Pacific Microlab computers in 1992, with a 386DX-25 chip and a whopping 2 megabytes of RAM. A couple of upgrades later, it ended up with a Gigabyte GA-586TX2 motherboard and a Pentium 233MMX. This is what I decided to base the new fileserver around. Previously it had a spell as a firewall and router, sharing a dialup connection running the excellent IPCop. When I moved to cable internet and a hardware firewall, that could do the same job using only about 7 watts, it was retired.

    It is a bit poky nowadays, but with a Voodoo2 card in it I used to have hours of fun playing quake, need for speed 3 and powerslide on it, with quite good framerates. I figured if it could do that, it could probably handle life as a bit bucket, receiving files across a network.

    The first task was to buy a hard drive. Since there's about 500GB worth of possible storage on both PCs (not that it would get filled, most is just duplicated as another form of backup) I'd splurge on a 500GB drive. So a Seagate IDE 500GB drive, with 16MB cache was purchased. Since 500GB is way higher than the 8GB the onboard disk controller could read, and its ATA100 interface was far higher than the onboard controller's ATA33 max speed, I used an add in IDE card that is capable of ATA133 speeds. Fortunately I happened to have one of those lying around. I also bought a 100 megabit capable network card to replace the 10mbit one in it. Since everyone wants wireless networks these days, a wired network card was picked up for under ten dollars - bargain! And with better speed, more reliability and less security hassles than wireless as well!

    The next task was finding an operating system that would detect the IDE card and be able to boot from it. I initially had installed Damn Small Linux on it for a laugh when it had a 40GB drive (An IBM Deskstar that hadn't died, actually) and intended to use that or a fresh install of Debian. Unfortunately, that used an older version of the linux kernel which didn't yet have support for the IDE card. I considered Ubuntu server but thought it might be a bit heavy on resources - it was going to run in only 64MB after all.

    In my search for a linux distro that was light on resources and had a recent kernel, I thought, what about Gentoo? Since it was a source based distribution, any updates have to be compiled, but I could afford to just leave the thing running overnight to let it finish. Plus, I already had a few years' experience running it on the other PC.

    So I downloaded an install CD, printed out the current installation guide, put it in the CD drive of the new (old) box and... it booted! And it detected the IDE card. The hard drive was detected as the full 500GB, so there was no hardware issues. A few hours later, I was into a working Gentoo install. Since there was no graphical desktop environment installed, it felt nice and quick.

    One cool thing that can be done if you have a few machines is install a program called distcc, which uses the faster machines to offload the compiling from the old, slow machine. This would be great to get running, so I tried setting it up. First of all on the Core 2 Duo machine, but despite following a guide, I had no luck setting that up. Next was the Athlon XP machine. Sure it isn't that quick compared to the E6300, but it is lightning compared to a Pentium 233. After quite a few hours of editing config files, environment variables and swearing, I think it is at a stage where the little P233 hands work to the Athlon to compile, saving a heap of time.

    So now it is at a stage where I now have around 450ish Gigabytes of storage, a backup that is scheduled to run on my Ubuntu box (a full backup weekly, incremental backups daily) going to the backup server. Since I also now have two gentoo boxen, the server is now set up to grab the latest list of updates (emerge --sync) every night, and the Athlon box now  points to that for its update list. 

    Just a few things need to be taken care of now -  the little fan on the Pentium is pretty loud. I'd like to be able to use a larger, slower fan to cool the CPU and also direct a bit of breeze onto the hard drive too. Getting the disk to power down when it is not needed would be good too, in the interests of the drive's lifespan. Once that is sorted I'll be getting an extension cord and a long network cable, then putting the thing in the cupboard. As long as it doesn't get too hot in there it would also keep the noise down a bit.

    Hopefully it will chug along for another few years! 



    (Originally posted April 8, 2007 on my other blog)

    Fixing segmentation faults in Ubuntu's apt-get

    I recently had an issue with my backup server that runs xubuntu, in that it would refuse to update any programs installed on it. Whenever I tried to run apt-get update, or apt-get upgrade, it would just return a segmentation fault. Actually the exact thing it would return was "Segmentation faultsts... 0%", as if it overwrote whatever was meant to be there.

    I did a bit of a search and found a fix that worked for me, and was pretty simple. There are two files that apt creates, that somehow got corrupted. On my system, they are called pkgcache.bin and srcpkgcache.bin, and they live in /var/cache/apt. I tried moving them to another directory, and re-running apt-get update, and what do you know, it worked! I later deleted them, as there was no need for the old copies.

    For those who don't want to move the files before deleting them (I recommend that you at least copy them somewhere else, just in case), the command is:

    sudo rm -i /var/cache/apt/*.bin

    The command should ask you to remove two files - it does in my case. I chose to put the "i" switch in the rm command just to be sure to prompt you before deleting.

    (Originally posted September 12, 2009 on my other blog)

    Introduction

    Hi all, my name is Steve Taylor. I've been using various distributions of the Linux operating system for around ten years now. From some tentative first steps with Red Hat on an old, spare machine (I was too scared to put it on my main box in case I wiped everything accidentally), to running a dual boot system with Windows and Gentoo Linux, to the present day where I mainly use Ubuntu. I have a more general blog at bort.blogsome.com, which contains a bit of everything. This blog is going to concentrate mainly on Linux tips, mostly to do with Ubuntu, and general PC related topics. Some of the old articles from there will be copied over to here, just to kick things off.