Friday, October 29, 2010

Squeezing Linux Mint Debian Edition

Linux Mint Debian Edition (LMDE) is awesome! Based on Debian Testing it is a rolling distro. That means if you are running LMDE you will always have an up-to-date system running, and as the saying and experiences go, Debian testing base is more stable than the so called final/stable releases of most other distros. But if you are a stability freak like me, you can make your Linux Mint Debian stable by pointing the apt sources.lst to squeeze. This ways you won't have to install point updates of applications every now and then. You will always have the most stable and workable system for quite a long period, till squeeze becomes obsolete. Here is how I did it.

1. Download and install Linux Mint Debian Edition now. Why now? Because debian testing (on which the current LMDE is based) is now frozen. Who knows when squeeze will be redeemed stable and LMDE install will start receiving truck loads of updates from next testing base - wheezy . And once you are inside the next testing base it will be really tough to regress the packages to the stable. So it’s better to install LMDE before debian testing package base changes.

2. Edit your /etc/apt/sources.list file to point to "squeeze" instead of "testing" after the installation. Pointing to "lenny" or "stable" at this point of time will not work because apt can't downgrade packages. Click on the image below to have look at my sources.list. All you need to do is to replace all the instances of "testing" with "squeeze".

3. Upgrade your system to sync it with the upcoming Debian stable. Open a terminal and issue the following command as a root user.

apt-get update && apt-get dist-upgrade -yd

4. Now you should be OK with the debian stable version of LMDE. If you are still paranoiac about system stability and sanity (to make LMDE as close to pure Debian Squeeze as possible) you can uninstall as much minty tools and/or replace them with their pure-debian counterparts as possible. But be cautious not to remove some critical packages. Click on the image below to have a look at the minty packages that my system still retains.

5. Roll out your own kernel. Don't panic, compiling your own kernel is not that difficult on a debian based system. Here is a short guide to do just that. Remember to give a custom version no. to your kernel-image while building the same. I have given a custom "z.1" suiting my fancy. My fresh build kernel package is linux-image-2.6.32_z.1_i386.deb. Custom versioning helps me avoid updating my kernel. Once I've a perfect kernel working I don't want it to update. Why fix a thing if it's not broken! Besides, like you, I as a desktop user, would like to customize my kernel suiting to desktop and my peculiar processor and other devices. Default debian kernel is good but it still leans more towards servers. Compiling your own kernel is necessary if you want to make the best of your desktop.

Have a look at my squeezed Linux Mint Debian edition. It's light as a feather - runs with 60MB memory footprint. It's rock solid and hell fast, and it will remain the same till I deliberately break it someday.


Anonymous said...

I kinda hoping linux mint switches to a debian since with debian the memory usage of gnome can be less the lxde on other distros.

Anonymous said...

This sounds really interesting. Can someone explain why rolling your own kernel is necessary? Can you just do the preceding steps and not the kernel and be ok? Or is there a specific reason to roll the kernel yourself?

manmath sahu said...

There are basically two reasons behind rolling your own kernel.

#1. Debian kernel is optimized more for server purposes. By compiling yours you can change config suitable to your processor, and make some customizations as per desktop usage.
#2. By building a custom kernel you can give a custom version no... so that it won't be overrided by any upcoming kernel updates. You know your custom kernel works for you, so stick to it.

Anonymous said...

I suppose those are good reasons, thanks for answering. I guess the only thing it makes me think of is when there is a kernel vulnerability that needs fixing. Don't get me wrong, I've been burned by kernel updates (lost sound for example) but when I read an article about some nasty hole in the kernel, then I see my distro promptly replacing my kernel, I get that warm fuzzy feeling. Now it's probably true that on a desktop those kernel issues don't matter so much as they would on a server, but don't you think that cutting yourself off from kernel updates could pose some sort of security issue? Or am I being naive?

Thanks for the great article and for giving me a new way to think of playing with LMDE, which has been a blast so far.


manmath sahu said...


#1. Such cases are very rare on a desktop.
#2. When such cases happen at can pull in the new and patched kernel source and rebuild it all with your custom .config file... It wont take that much time.. As you already have the .config file from previous recompilation... All it'll take is some cpu clocks.
#3. If no way out.... go by the mass and install the patched kernel from your distro repo.

Barnaby said...

I've always used a provided kernel on Debian without noticing any performance hits. Just switch from the standard one from the installation to an AMD or intel optimized one, depending on your processor.
If you pin it in apt it will not be updated either.

risdiyanto said...

can i remove all packages installed, so my linux mint would become base system? n what packages should i remove?

manmath sahu said...

mint-desktop and mint-system, also you may consider removing the mint repo.

ge0 said...

Can you post a little tutorial about how compile the kernel on my LMDE 2012, cause i have the same ASUS 1215B with ATI 6310, that i want to optimize for the kernel and the all hardware, thanks for ur response, and great blog. Hi from the El Salvador, CA.

How about this