Posted by: odzangba | May 13, 2008

Finally compiled it

I finally got some free time over on Sunday to compile the 2.6.25.3 kernel and I was very surprised at how easy it was. I’ve read some ghastly stories about custom kernel compiles going horribly wrong and most of the initial tutorials I read were unnecessarily long but I found an excellent tutorial on the ubuntu forums that makes things simple. The only tedious part was choosing what should be compiled… that was essentially the whole point of compiling the custom kernel but that doesn’t mean I have to like it. :) It took just about an hour and a half to finish compiling and then I found out I had not enabled CONFIG_TIMER_STATS (powertop needed it to estimate power usage) and I had to do it all over again. :(

Now that I know how to compile the kernel however, my natural urge to speed things up has taken over and I spent the best part of the night disabling kernel modules and options I did not need. This might occupy my time for the best part of the week. :-D

Tags:

Posted by: odzangba | May 2, 2008

Still Here, People!

Yeah, my internet access problems have almost melted away so it’s back to business as usual. Which reminds me, I should rant about slow internet here in Ghana one of these days…

Tags:

Posted by: odzangba | March 11, 2008

Compiling A Custom Kernel…

I finally got around to downloading and compiling powertop this afternoon but unfortunately, I couldn’t use it since my kernel was just too old (2.6.20-16) and it wanted 2.6.21 and higher. I’ve stuck to this particular kernel (and feisty for that matter) because I only have mirrors for feisty. Internet here in Ghana is usually crappy so until I get the gutsy (or hardy, when it finally gets released) mirror, I’m sticking with safe-and-convenient.

But I digress… I grabbed the 2.6.24.3 kernel and now I’m scouting around on the net for potential issues arising from compiling that kernel version on my hardware. It’ll probably take me another hour or so to make sure all is good (or at least can be made good with a few fixes), write out my will, say my last prayers and then I might probably be just in the right frame of mind to compile the kernel, I think… maybe. :)

I’ll post the details later…

Tags: , , , ,

Posted by: odzangba | February 28, 2008

Flirting With Miro Internet TV Player

Ever since Akuafo Hall opened up its own ICT centre, I’ve been spending more time on the internet, largely due to the fact that laptops are allowed. Anyways, one of the apps I’ve been trying out it Miro. I’ve played it before when it was going by the name Democracy Player but did not have much use for it since I had such horrible internet. But I pulled it from Canonical’s commercial repository this afternoon and I’ve been loving every minute of it. :) The interface is very clean and without any screen clutter and it’s terribly easy to use. I’ve a few screenshots to show for my afternoon’s adventure.

 

Downloads view

New Videos View

Tags: , , ,

Posted by: odzangba | February 25, 2008

Unlocking LG DM150 CDMA Phone

LG DM150I took out my LG DM150 phone to make a call yesterday and it prompted me for a four-digit unlock code. So I looked it up in the manual and it said to enter 0000 … didn’t work. :( So I turned to Google and guess what, my friend Henry had a page on unlocking the same phone. It’s very simple really… just enter the last four digits of your phone number. Though I live in Ghana and use the kasapa mobile network, its appears it doesn’t matter what your carrier is or what country you live in. In my case, I had to enter 8690 since my cell phone number is 028 731 8690.

All the other methods (enter 0000, 1111 or 1234) did not work for me so I really recommend the enter-the-last-four-digits-of-your-phone-number method. :)

Tags: , , , ,

Posted by: odzangba | February 18, 2008

After a long hiatus…

Yeah, I’m still alive… just having some internet access problems. :) Things are getting back to normal now so welcome to a new year.

Posted by: odzangba | December 24, 2007

Use Apt-mirror to Create Your Own Ubuntu Mirror

Setting up your own Ubuntu mirror is quite easy thanks to a nifty little tool called apt-mirror. And it’s very rewarding too… super fast installations and the convenience of not needing an internet connection when you want to install most applications. We’ll need a few things to get the job done though - apt-mirror, a high speed internet connection and some 45GB of disk space. It’s more than likely that you won’t need all of it - my mirrors (binaries only) take up about 22GB - but we’d rather not be caught with too little space. I describe how to mirror the Ubuntu 7.10 repositories here in this guide but it can be applied to other versions of Ubuntu… in fact, the instructions here will work with any debian based distribution.

1) Okay, to start things off, let’s tap into the apt-mirror repository. Back up your sources.list file like so:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.old

This way, if you mess things up badly you can restore from the back up and start all over. :)

2) Edit the sources.list file like so:

gksudo gedit /etc/apt/sources.list

3) And insert the following on a new line:

deb http://apt-mirror.sourceforge.net/ apt-mirror

4) Let’s update the package index

sudo aptitude update

5) And install apt-mirror

sudo aptitude install apt-mirror

6) Apt-mirror is now nicely set up so let’s tell it what servers to mirror:

sudo cp /etc/apt/mirror.list /etc/apt/mirror.list.old
gksudo gedit /etc/apt/mirror.list

The default configuration will put your downloaded files in the /var/spool/apt-mirror folder but if you’re like me, you probably have a huge partition where you store all kinds of stuff and you’ll want to put the mirror(s) on that partition. The third line (where it says set base_path) is where you set your default download directory (mine is /media/silo/repo). Here’s how my mirror.list file looks like:

############# config ##################
#
set base_path /media/silo/repo
#
# if you change the base path you must create the directories below with write privlages
#
# set mirror_path $base_path/mirror
# set skel_path $base_path/skel
# set var_path $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch <running host architecture>
set nthreads 20
set tilde 0
#
############# end config ##############

deb http://archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse

clean http://archive.ubuntu.com/ubuntu

I’m mirroring only binary packages but if you want source packages, you should insert the appropriate lines. They usually take the form:

deb-src http://gh.archive.ubuntu.com/ubuntu/ feisty main restricted

7) Now, we need to run apt-mirror for the first time. This is going to take quite a while so be prepared to wait for several hours… seriously, *several* hours. :) Don’t worry if you cannot download all the files in one go, apt-mirror can resume downloads (kill it with the Ctrl+C key combination and re-run it when you want to continue). Okay, run apt-mirror like so:

sudo apt-mirror /etc/apt/mirror.list

Right, it took a week but we finally finished the download. :-D Apt-mirror will tell you how to clean up unnecessary files when it exits… follow those instructions to reclaim some disk space. There are several ways to use your new mirror but we’ll look at two of the most common. The first involves just telling apt the physical location of the mirror on your hard disk and the other involves passing the mirror through a web server - Apache in this case. So let’s get to it.

Method One

I) Edit your sources.list file like so:

gksudo gedit /etc/apt/sources.list

II) And insert the following on a new line:

deb file:<path_to_mirror> gutsy main restricted universe multiverse

Replace <path_to_mirror> with the path to the downloaded files - /media/silo/repo/archive.ubuntu.com/ubuntu, in my case. You have to repeat this for all the other mirrors (gutsy-updates, gutsy-backports, gutsy-security, et cetera). In the end, the entries for your local mirror in /etc/apt/sources.list will resemble this:

deb file:/media/silo/repo/mirror/archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse
deb file:/media/silo/repo/mirror/archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
deb file:/media/silo/repo/mirror/archive.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse
deb file:/media/silo/repo/mirror/archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse

As long as the entries here reflect the actual folder structure in your repository, nothing should break. Incidentally, you will want to comment out (place # in front of) the lines that point apt to Canonical’s online servers.

III) Update your package index like so:

sudo aptitude update

You can now start installing stuff. Simple, huh? :)

Method Two

This method is more useful if you want access to the mirror from other machines on your network. In this example, let’s say the machine with the downloaded files is called ithilien on the middle-earth.com network. There’s another machine - gondor - on the same network. I’m going to assume Apache is installed on ithilien.middle-earth.com. Hey, if you haven’t installed Apache, you have all the packages from the Ubuntu servers on your hard disk… follow Method One and install Apache like so:

sudo aptitude install apache2

Okay let’s roll. :)

i) We need to tell the Apache server on ithilien.middle-earth.com where to find the downloaded files:

ln -s /media/silo/repo/mirror/archive.ubuntu.com/ubuntu /var/www/ubuntu

If you’ve not tinkered with Apache’s configuration files, /var/www is usually the default virtual host.

ii) Right, now let’s make sure gondor.middle-earth.com can see our beautifully set up mirror. Edit the sources.list file on gondor.middle-earth.com like so:

gksudo gedit /etc/apt/sources.list

And insert the following on a new line:

deb http://ithilien.middle-earth.com/ubuntu gutsy main restricted universe multiverse

Alternatively, I could use ithilien’s IP address, in which case the above line would look like so:

deb http://192.168.3.144/ubuntu gutsy main restricted universe multiverse

Create similar lines for the other mirrors (gutsy-updates, gutsy-security, gutsy-backports, et cetera) and remember to comment out (place # in front of) the lines that point apt to Canonical’s online servers.

iii) Let’s update gondor’s package index:

sudo aptitude update

That’s it! Install as much as you can use. :-D

Tags: , , , ,

Posted by: odzangba | November 26, 2007

Skip Forced Disk Check At Boot on Ubuntu

Last week, I expressed my distaste for the way Ubuntu (and most linux distros) forces disk checks on users. I got even more irritated by this ridiculous behaviour this week when I reinstalled Ubuntu 7.04 on my sister’s laptop… it was actually a downgrade from 7.10 and I might go into the reasons behind that in a later post. Anyway, she dual boots with MS Windows on a 120GB hard drive and her disk structure is your typical dual boot kind - 20GB ntfs partition for windows, 15GB ext3 partition with a 2GB swap partition for Ubuntu, and an 80GB fat32 data partition. After the installation, ubuntu started forcing a disk check on the 80GB partition AT EVERY BOOT. That increased the boot time to something like four minutes. This is intolerable on an intel core 2 duo with 1GB of RAM… even my old pentium II takes 1 minute 15 seconds to become fully armed.

In last week’s post, I described how to use the tune2fs utility to  influence the system’s decision to force a disk check on ext3 file systems; that utility is useless with FAT32 file systems. There is a simpler way of doing this and it involves editing that sweet little configuration file - /etc/fstab. That’s the file that controls how most of your storage devices are mounted. A typical line in this file looks like this:

UUID=cd26de7d-85ff-48cd-9d52-9a02bf4ff078    /     ext3    defaults     0       1

We’re concerned only with the last digit because that is the information ubuntu uses to decide whether to force a disk check or not. A value of zero means do-not-check and any other positive number tells the system to check that storage device at boot. So all I had to do was to change the “one” to “zero” and the forced check was disabled. Since checking your disks regularly is a good idea, I set up a cron job to do that once a week… the world was a sweet place again. :D

Tags: , ,

Posted by: odzangba | November 16, 2007

Add possibility to skip forced disk check

I had some friends over last week and I just couldn’t resist the temptation to show off my attractive GNOME desktop. So I fired up the box, everything was going nicely with me giving a running commentary on the boot process when suddenly I got the “/dev/sda1 has been mounted 30 times without being checked… check forced” message… oh oh. Pressing Ctrl + C had no effect plus the nice usplash screen had given way to an ugly black-and-white screen. So there I was in a very difficult position because I’d bragged about linux extensively to these guys and now what… “this is linux, you have to wait 10 minutes for it to load?” Imagine going in to make a presentation and this happens to you… you’d be very annoyed at the paranoid developers who put this ridiculous disk check system in place.

Before anybody jumps down my throat, I am not saying forcing a disk check is a bad idea. It is a clever way of nipping file system corruption (as a result of stuff like hardware failures, kernel bugs, flaky memory chips, et cetera) in the bud BUT that should not translate into inconvenience to the user. I’m thinking that perhaps giving the user the choice to skip the disk check and repeating the message on subsequent boots until he accepts is a better way of doing things. This way, I can get my real stuff done in a hurry and when I’m done, I just reboot and let the disk check take place.

Another thing that irritates me is how the nice usplash is rudely replaced by an ugly black-and-white screen whenever stuff like disk checks and other errors occur during the boot process. I want my splash image at ALL TIMES. Anyways, to disable the disk check completely, all you have to do is run the tune2fs command. Here’s an example, my root partition is /dev/sda1 so I had to do:

sudo tune2fs -c 0 -i 0 /dev/sda1

Be careful with this however as the danger of file system corruption if you forget to manually check the disk for errors is REAL. If you’re not looking to disable the disk check completely but want it forced after a larger number of mounts (or reboots) then you should modify the -c parameter accordingly. For instance, to increase the maximum disk mount count from the default of 30 to 50, do:

sudo tune2fs -c 50 -i 0 /dev/sda1

Now, the disk check will be forced after 50 mounts instead of 30.

PS: Remember to run manual disk checks regularly if you disable forced disk checking! Don’t say I did not warn you. :)

Tags: , , ,

Posted by: odzangba | October 18, 2007

Ubuntu 7.10 Unleashed!

The Gibbon is out in the wild guys. I’m trying to grab an ISO off the flaky wi-fi hotspot here on campus and hope to get it installed by midnight. :) In the meantime, dash over to the download page and grab some. :)

Tags: , , ,

Older Posts »

Categories