Microwave Biscuit

I *heart* lsof

Posted in Linux, ubuntu by microwavebiscuit on November 12, 2008

lsof is a command to list open files. I learned about its usefulness a long time ago while working on an AIX box for work. Today I found it useful for a fairly simplistic reason. I was browsing the web and all of a sudden my CD drive spun up. I couldn’t understand what was making it spin but I decided I was going to eject the CD that was in the drive. I got an error telling me that I couldn’t “unmount the drive” as a program was using it. I tried a number of ways to unmount it but it seemed locked. I’m sure I could have done it somehow but I was curious as to what had the disk locked up so I issued a lsof command:

lsof | grep cd

Which returned:

amarokapp 20243 me 128r DIR 11,0 2048 1344 /media/cdrom0

There it is – exit amarok and the cd ejects.

Old SuSE install disks

Posted in Linux by microwavebiscuit on May 27, 2008


Originally uploaded by phoch_98.

I was cleaning out my office and came across these disks. I’m sure it would install if I really was interested in technology from 8 or 9 years ago. I’m not positive about when exactly I purchased this setup but it was definitely a LONG time ago.

Tagged with: ,

Building a Backup Server

Posted in apple, Linux, ubuntu by microwavebiscuit on May 26, 2008

I’m building a mini-server to backup all of my network pc’s here at home. Things I’ve done so far:

1. Installed Xubuntu – I intended on installing Ubuntu server but couldn’t get it to boot. I downloaded the image and verified it – burned it on 2 different disks but no luck. So, I grabbed an Xubuntu disk I had laying around and installed it. I figure I can remove some of the extraneous stuff when I am complete.

2. Setup OpenSSH, SMB, etc. Wow, what a task. Thank god for the Ubuntu forums – specifically the tutorials section.

3. Followed these tutorials:

Setup Samba first:
HOWTO: Setup Samba peer-to-peer with Windows

Start rsync backups (so far I’m backing up my “main” Ubuntu PC and an Apple. 3 Windows machines to be setup to do backups too.
HOWTO: Backup nightly via rsync – Ubuntu Forums

Finally – setup “fake” raid for new big drives:
HOWTO: Linux Software Raid using mdadm

This all started as part of a project that I was inspired by in Linux Format Magazine which in the May issue had an article about building a media server/NAS using Ubuntu. It just so happens that I had a spare motherboard, case, power supply – all I really needed was a few big ass drives. Now I’m in the final stages of setting up the RAID array using RAID1 which is mirroring for hopefully fail-proof backups.

So far the only hiccups I’ve had were in getting the OS installed using the Ubuntu Server image.

Tagged with:

Hardy Upgrade

Posted in Linux, ubuntu by microwavebiscuit on May 1, 2008

So I pulled the trigger on upgrading a bit earlier than usual. In the past I’ve waited a few weeks to do upgrades, this time I just waited a few days. It might have been a mistake, although when it is all said and done it worked pretty well. Here’s some issues that I’ve had:

  1. The biggest issue was that when I rebooted after doing the upgrade I couldn’t log in. It couldn’t find my home partition. This had something to do with changing all the hd to sd but my fstab wasn’t updated and it just failed. I’m not sure if it was supposed to get updated or what but it didn’t and I had to boot into failsafe terminal and start mucking around with my fstab. I had previously moved my home partition to another drive and that drive was no longer recognized by the system. Not a good start. I did manage to get it all working again but I was pretty disappointed in the way that all happened.
  2. Liferea is broke. I’m suffering from this bug I think. No idea on what the fix is or if there will be one. In the mean time I’m using Akregator which truly sucks. I’ve had some complaints about Liferea before but now being without it for a couple of days makes me realize how good it is.
  3. I haven’t really used Compiz before – I found it interesting as a challenge to get working in the past but the eye candy doesn’t actually do much for me. I thought I’d see if it was working for me and it really isn’t. As soon as I enable desktop effects I lose title bars and such. I poked around the forums and it doesn’t seem that I’m the only one with issues. Most of the recommendations are things that I’ve previously done or that when I try now don’t produce results. I’m not terribly interested in it anyway so I don’t think I’ll spend too much effort in trying to get it to work.

Some of the good:

  1. The new Hardy Heron desktop background is BEAUTIFUL. I’m really impressed with it and I’m using it as my desktop background. Thanks to those that made it.
  2. Other than my complaints above, everything else works, Amarok, Firefox, Azureus, Crack Attack, Geany, Gedit, etc. All my regular stuff works fine excepting Liferea (Please, Please, Please fix it!!!).

Overall it wasn’t too bad but I would have preferred it to be a bit smoother.

Tagged with: ,

Hardy, KDE 4

Posted in Linux, ubuntu by microwavebiscuit on April 8, 2008

I have a virtual machine that I’ve been keeping going for a really long time as a test bed. I can’t tell you how many upgrades, installs, etc. that it’s been through and it keeps on working. Being that I don’t want to “risk” my main machine and upgrade to Hardy too soon I have upgraded my VM to Hardy. Even in it’s current state, Hardy is pretty awesome. I then decided since I was messing about I may as well install KDE 4 and see what is doing there. KDE 4 seems very nice although I’m having some troubles configuring it. Seems odd but I can’t find a way to add a second panel. I like to have a second one at the top in K and I would expect to find a “panels” area somewhere in desktop configuration or something. It seems to be hidden. Overall, I’m impressed with both KDE 4 and Hardy itself. I also can’t believe how much abuse my virtual machine has endured without complaining!

Tagged with: ,

Move /home to it’s own partition

Posted in Linux, ubuntu by microwavebiscuit on November 12, 2007

I have long heard about the benefits of moving /home to its own partition and I have really wanted to do so, however I was concerned about breaking something so I haven’t done it until now. Last night I found this post:

Move /home to it’s own partition « Ubuntu Blog

Which goes back a ways but by reading the whole post and the comments I was able to easily move my home folder to its own partition. To recap the steps (including changes/deviations to the original authors steps) here you go:

1. Create a new partition – this could be a new drive, resize and existing drive, etc. In my case I resized an under-used disk I have (hdb1) and allowed for 50 Gib of space for /home. I did this with Gnome Partion Manager (GParted). Probably a bit more space than I needed as my existing home folder is roughly 1 gig but as I said the disk is underused as it is. My new partition is hdb2. If you are doing this, you should change hdb2 in my steps to whatever your new drive is.
2. As per the original article, make a new directory and mount the partition:

$mkdir /mnt/newhome
$sudo mount -t ext3 /dev/hdb2 /mnt/newhome

3. Next I had to deviate a bit to get everything copied correctly. I did:

sudo find . -depth -print0 | sudo cpio --null --sparse --preserve-modification-time -pvd /mnt/newhome/

Which copied everything over and preserved the modification times. The reason for preserving the modification times is so that using a tool like Krusader you can compare directories and make sure everything in your existing /home folder is in /newhome
4. Unmount the /newhome new partition:

$sudo umount /mnt/newhome

5. Move your existing home folder (note: you should have already made sure everything was moved cleanly before this step!!!!)

$sudo mv /home /old_home

6. Make a new “home” for /home:

sudo mkdir /home

7. Mount the new home:

$sudo mount /dev/hda5 /home

8. Modify your /etc/fstab file:

sudo gedit /etc/fstab

and add the line:

/dev/hdb2 /home ext3 nodev,nosuid 0 2

9. I then rebooted my computer, made sure everything is working right and finally:

$sudo rm -r /old_home

which will get rid of your old home directory.

So, with everything in place I now have /home on it’s own partition. This allows for the re-installation of everything should I corrupt my system without losing all of my crucial data. If I have to re-install all of the executables on my system that’s a piece of cake – just get a new CD of Ubuntu and go. If I lost my /home folder it would be a lot harder to recover from. This doesn’t take the place of backups – regular backups are still crucial. It’s just that by having /home on its own partition you segregate the operating system from your data.

Quick terminal tip!

Posted in Linux, ubuntu by microwavebiscuit on November 12, 2007

In your bashrc file ( /home/username/.bashrc ) put in:

shopt -s cdspell

This will do auto typo correction in the terminal. So, for instance, if I type in:

cd /hom/me/

It will automagically go to /home/me.

Cool, no?

Tagged with:

Mail’s Here

Posted in Linux, ubuntu by microwavebiscuit on November 5, 2007

I’m having an issue with my mail client and I can’t seem to find a good resolution. I use Google’s GMail which recently introduced IMAP capabilities. I have been using POP with Claws Mail for a while but when I switched my account to IMAP in Claws it really has started behaving badly. First off, I can’t actually send mail. Check that, I can send it but somehow it errors out saying that it didn’t send but it actually does send. If I look in my sent messages folder I will see the message I just sent but the sending process takes a while and reports an error. Secondly, Claws Mail seems to be taking an inordinate amount of memory on my system now that I’m using IMAP. Lastly it just seems to crash once in a while.

Last night I thought I’d mess around with a couple of other mail clients to see if anything worked nicely. I tried Evolution first. Honestly Evolution is almost as bloated as Outlook. I also don’t like the way it handles my local mail. For some reason in Evolution I can’t actually delete local mail. It moves it to the trash but never deletes it. I can say “Empty Trash” but it won’t. Next… I grabbed Thunderbird. Loaded up my IMAP account and it works really nicely. I haven’t used Thunderbird in a while and I was pleasantly surprised at how nice it looks. I thought I might have a winner until I tried to add a local mail account. After some web searching, I found out that Thunderbird doesn’t support maildir/mbox so I’d have to reconfigure my local account to use IMAP. That’s not a project I was willing to take on… Moving along – how about KMail? I have used Gnome now for so long that KDE apps don’t appeal to me anymore. Too may configurations to work on in different menus.

I was reminded about why I switched to Claws mail in the first place – it’s fast, works, etc. If only it behaved a little nicer with IMAP I’d be content. Any thoughts on a mail client that works well with IMAP and Local maildir/mbox?

Got no Guts(y)

Posted in Linux, ubuntu by microwavebiscuit on October 19, 2007

I have not upgraded to Gutsy yet for a couple of reasons.

  1. The servers are fairly overwhelmed and waiting a week or so will yield faster upgrade times
  2. I’m afraid of breaking my machine. While I’m sure Gutsy has been tested thoroughly, I’m really happy with my current configuration and my experience has been that when doing distribution upgrades there is a fairly good chance that something won’t work right. It will probably be something minor but I’m still scared.

I will probably throw caution to the wind and do it at some point shortly but another few days won’t kill me, right?

Tagged with:

New Toy

Posted in Linux, ubuntu by microwavebiscuit on October 15, 2007

Last week Buy.com had a sale on a toy I’ve been waiting to purchase for a while – the Nokia n800 Internet Tablet. Being that it was on sale for $249 (original price $399) I couldn’t resist and I bought it. It runs a modified version of Debian called Maemo and it’s open source as you’d imagine. I added a few repositories that are available and I was able to get Pidgin, x-term, and a few other tools running quickly. It’s a really neat device! I’ve used it mostly for reading RSS feeds and web browsing. It’s nice to keep laying around when watching TV as if something comes on that I want to hit the web for I’ve got it right there in my hand. It also has a camera, a FM radio and built in Skype support. In the few days that I’ve had it I’ve been incredibly impressed with it. I’m also looking forward to Ubuntu’s new embedded edition when it breaks cover as it may be a nice choice although I’m pretty smitten with Maemo as it is.

Tagged with: ,