debian

I've had it with apt-cacher

I thought apt-cacher was an improvement on apt-proxy. Boy was I wrong. It’s been giving me a lot of headaches. Whereas apt-proxy needed the odd restart, apt-cacher needs files to be deleted from it’s cache every now and then…

What a pain.

Now I’ve switched back to apt-proxy, and with a bit of squid tweaking (so that local network traffic isn’t cached, or passed to the SAIX proxy) everything is working well again.

Cross compile kernel

I decided I wanted a 64bit kernel for my UK2 server (seeing as it’s an Athlon X2, and I wanted an ubuntu amd64 chroot to work on it).

After a little playing around, this is how you do it:

  • Get your kernel
  • Extract it
  • make menuconfig ARCH=x86_64
  • Create some linux-amd64-gcc, linux-amd64-ld, etc. wrappers. Some need -m64 options. Others autodetect what’s required. (I made a tarball of my wrappers, but they’ve been lost.)
  • CONCURRENCY_LEVEL=4 make-kpkg --append-to-version '-londonpride' --revision '1.00' --rootcmd fakeroot --arch amd64 kernel_image
  • Extract the control.tar.gz from the deb, edit control file, and change the architecture to i386.
  • Install

Unfortunaly, in the week after this, my machine died of disk corruption. This is the 2nd time it’s happened. I hope UK2 don’t use dodgy hardware…

migrating to aptitiude

After reading an article about using aptitude properly, I decided that it’s time to make the switch from apt-get. Sure, on some really low memory systems, running aptitude isn’t an option, but for most machines, keeping track of which packages were installed as dependancies really helps keep a system trimmed.

I didn’t like the way that the author did it, I opted for a variant of one of the comments:

aptitude markauto ‘~i!~M!~nbuild-essential!~nsubversion!~nlibncurses5-dev!~npython’ \
‘(~E|~prequired|~sdevel|~sinterpreters|~slibdevel|~slibs|~soldlibs|~sperl|~spython|~sshells)’

While rather a monster command, it does a good job of selecting things that were probably installed as dependancies. If you see anything in the list of things to be removed that you want to keep, you just add in an !~npackagename. Then after that, I run aptitude, limit to ~i!~M (installed, but not automatically) and mark everything that should be a dependancy with M.

Then, it’s simply a case of only ever using aptitude, and your system will be kept nice and clean :-)

Aptitude search patterns are really powerful, instead of having to do the whole dpkg -l | grep ^r type mission, you can just do aptitude search '~c'.

Syndicate content