Posted by: Odzangba | February 28, 2009

How To Fix Partition Table Order

Last week, I resized one of my partitions to create some swap space. It’s a long painful story that I will not bore you with but essentially, I got cocky with my 2GB RAM and refused to allocate swap space… ubuntu punished me by activating compcache which then caused random lockups of the system. Anyway, I was coming up to the end of an install cycle anyway so I backed up the system with remastersys (that is one story, I’ll have to blog about later), resized one of my partitions to create swap space and out of habit, did a sudo fdisk -l… it told me my partition entries were not in the proper order (a side effect of the resizing). It wasn’t a big problem, just an irritation really but an irritation nevertheless. I decided to fix it before the install:

sudo fdisk /dev/sda
press x to enter expert mode
press f to fix partition order
press w to write the partition table changes to disk

Yes, I’l take a Heineken. ๐Ÿ˜€

Posted by: Odzangba | January 20, 2009

Recover Deleted Files Using Linux

One of my neighbours came to me a couple of days ago with a problem… he’d lost his CV to a windows virus and had no backup. So I said I’d try to recover the file for him. A quick google led me to Foremost. I chose foremost because it’s small, fast and easy to use. Since this was a file recovery operation, I decided to minimize the risk of the deleted file being overwritten by creating a disk image of the pen drive. A quick

dd if=/dev/sdb of=recover.iso

did the trick.

Then it was a simple matter of

sudo apt-get install foremost

to install foremost and then…

foremost -t doc recover.iso

The ‘-t doc’ย  parameter tells foremost to look for only Microsoft Word files. About a minute later, the thing was done and the files were back. For what it’s worth, if you accidentally delete a file, it’s a very bad idea to continue using the computer. Shut down the pc or disconnect the drive immediately and look for a linux rescue cd. ๐Ÿ˜€

Posted by: Odzangba | January 1, 2009

openSUSE 11.1… sigh Pt.1

I chose to stay up and install openSUSE rather than crash the crazy new year parties in Accra (or go to church as all of my neighbours did). It could have been such a great distro. Later in the day, the good and the bad about openSUSE.

Posted by: Odzangba | December 30, 2008

Meet The New Member Of The Family…

The past month has been hectic for me. I’ve been all over the country – Tamale, Kumasi, Ho, Winneba…. During one of my brief stopovers in Accra, I managed to buildย  a new pc. It’s not excatly what I wanted but it’s performing admirably. Rather than buy one of those grossly over-priced brand name machines, I bought all the components separately an assembled them myself… a decision I feel pretty smug about. ๐Ÿ˜€ Here’ s the thing, a 2.53ghz Core 2 Duo, 2gb RAM, ASRock Wolfdale 1333-D667 motherboard, 40gb 7200 rpm internal hard disk + dvd writer costs something in the region of GHC 900 but I pulled it off with GHC 400 by avoiding a branded machine. ๐Ÿ˜€ It’s not that hard to assemble your own pc… all you need is a screw driver. When I get a bit more time over the weekend, I’ll write more about it.

Posted by: Odzangba | November 25, 2008

Reserve A Zain Number

Apparently Zain is allowing potential customers in Ghana to reserve their cell phone numbers even before they become fully functional. It’s not bad… I reserved my current Kasapa number – minus the 028 of course. Here’s the link: http://app.rancardmobility.com/final.zain/

Posted by: Odzangba | November 19, 2008

Leash Runaway Applications

Often, firefox just hangs on me (when I’m forced to use it) and sometimes brings the entire machine to a grinding halt. I’d rather not start a rant about how bloated firefox is… it’s not worth the breathing exercises I’d have to do. Usually, when an application becomes unreasonable, it’s quite easy to kill it and get on with other things. My favorite method is to add the Force Quit widget to the gnome panel. This way, all I have to do is click on the widget, click on the misbehavingย  window and problem solved.

There’s also the xkill command. Hold down Alt + F2 to bring up the Run dialog, or bring up a terminal, type in xkill ( the mouse pointer should turn into a skull and crossbones) and click on the offending window… it should die immediately.

There’s always the trusty command line option. On a terminal, type

killall application_name

To kill firefox this way, you’d type

killall firefox

The killall command is ‘merciful’ as it allows the offending application to end gracefully. However, it doesn’t always work … some apps are really stubborn. To kill firefox without giving it a chance to clean up, try

kill -9 `pidof firefox` (those are back ticks, people… located on the ~ key)

Of course you could go the long hard way: use the ps aux command to find the pid of the app (let’s say 6849) and do kill -9 6849 but I prefer the easier method. It’s also possible to bring down the entire X server and hope the hung program will die too (in my experience, firefox is immune to this sometimes… it becomes an “uninterruptible” service.) To restart the X Server:

press Ctrl+Alt+Backspace

I haven’t used them before but the magic sysrq keys are quite interesting. Apparently, if you get really desperate, you can talk directly to the kernel. This would be quite useful if your box totally stopped responding and none of the earlier methods worked. They have to be compiled into the kernel first though. To check if they are, do:

cat /boot/config-`uname -r` | grep CONFIG_MAGIC_SYSRQ (again, back ticks)

You should get something like this:

CONFIG_MAGIC_SYSRQ=y

Also, do:

cat /proc/sys/kernel/sysrq

to make sure they are not disabled. You should get

1

To safely reboot your box without data loss during hangs, this is the method suggested on Wikipedia’s Magic SysRq key page.

  1. Press Ctrl+Alt+F2 to switch to a terminal window. Sometimes, this is not possible.
  2. Press Alt+SysRq+R to get the keyboard
  3. If pressing Ctrl+Alt+F2 before failed, try it again now.
  4. Press Alt+SysRq+S to sync your disks.
  5. Wait for OK or Done message.
  6. Press Alt+SysRq+E to term all processes.
  7. Press Alt+SysRq+I to kill all processes.
  8. Press Alt+SysRq+U to umount all disk drives.
  9. Wait for OK or Done message.
  10. Press Alt+SysRq+B to reboot.

Finally, if all else fails turn off the power to the computer and hope you don’t do any permanent damage to the system. ๐Ÿ™‚

Posted by: Odzangba | October 30, 2008

Ghana Telecom… arrgh*&%$#!

It’s been almost a month since I applied for a broadband connection at home and I still have to go to an internet cafe to blog! This totally sucks. I guess I was naive to expect better service from Ghana Telecom.

Posted by: Odzangba | October 25, 2008

Using Ubuntu Without X

Hello, I haven’t blogged in a long while… my apologies for that. Lot’s of interesting things have happened since my last blog post. For one, I dumped X and now use the console excusively. Yeah, I know it sounds a little extreme in this age of high speed multiple-core processors, video cards and fancy desktop compositing but let me remind you that I still use a very old Compaq Deskpro and yes, most cell phones come with faster processors than my 350Mhz Pentium II processor. I think it’s enough to say, I don’t exactly have much spare processing power. But I digress, using a console only system is not as terrifying as it sounds. There are some pretty easy to use and mature text based applications out there. I use my computer for everyday stuff – music, television, radio, movies, reading, etc. I mess with applications like apache and samba only because I’m curious… nothing more, as in I don’t depend on them for a living. So from any stand point, it really is an overkill to run X in the first place. I basically need the following apps: an audio player, a video player, radio and television apps, a web browser for offline web pages and a pdf reader. I chose MPD and ncmpc for my music management because here’s what I need – the application manages the music, I select what songs I want and click play. Some people like more control but I’m basically a lazy person and I cannot be bothered by the petty details of managing individual audio files and folders. ๐Ÿ™‚

Every morning, I wake up, stretch and yawn, and thank God for Mplayer. ๐Ÿ˜€ Seriously people, I do not know what I would do without this app. I use it for watching television and playing my video files. It can even double up as my fall back audio player and radio capture system but that’d mean too much work for my lazy fingers. I use fmtools to listen to radio because it’s simple… all I have to do is type ‘fm 101.3’ and I’m listening to the BBC. In line with my industrious personality, I set up aliases so for example, I only have to type ‘bbc’ to listen to the BBC… sweet. ๐Ÿ™‚ Elinks works pretty well when I need to read pages I’d already downloaded from the web or some HTML based documentation like the mplayer documentation.

The only problem is the PDF reader. After searching all over the web, the one thing I can tell you is if there is a console based pdf reader for linux, no one is telling. Luckily, pdftohtml can convert pdfs to HTML so I can read them with elinks. The output can be crappy especially when images and complex frames are involved but I have very few of those ebooks. I like my console system, it is snappy, and it does what I tell it to do without much drama; besides it totally annoys the crap out of my siblings. ๐Ÿ™‚ I’ll go into more details later this week. I have to run.

Posted by: Odzangba | September 10, 2008

People, Software Freedom Day

Software Freedom Day is just around the corner and the atmosphere here in LinuxAccra is upbeat. We got some substantial donations this year so we’re going all out with banners, flyers, radio ads… For my Ghanaian readers, LinuxAccra will hold a SFD2008 event at the Advanced Information Technology Institute on Saturday, 20th Spetember. This link shows how to find AITI:

http://www.aiti-kace.com.gh/?q=node/38

Ciao,
Odzangba

Posted by: Odzangba | July 1, 2008

The Hunt Continues…

Since yesterday, I’ve been looking for a collection manager for my videos. I want something similar to Amarok’s functionality… for video. I’ve tried a few so-called ‘collection managers’ but they simply did not fit my designs. Tellico. GcStar, Elisa… nope. All of these require you to manually enter entries for each video file and only GcStar came close to allowing you to play the video from within the manager (technically, it called up mplayer but that’s okay). I have tons of music videos, tv shows, movies… and I want to just tell the app “this is the folder in which all my videos live” and let it handle the rest. Yeah I know, I’m, lazy. ๐Ÿ™‚

I especially want playlists for my music videos and I also want a ratings system… sigh. I guess I’ll just have to keep looking. I’d really appreciate a few hints though. ๐Ÿ˜€

« Newer Posts - Older Posts »

Categories

%d bloggers like this: