This is going to be one long post, I’ll put two months of ideas and work into this post, so … you might want to take it easy. Go grab cup of coffee or something before you start reading it.
Let’s call this introduction
For almost last two months I’ve been doing something … it all started when one of my colleagues actually said “does it have to be that slow” (referring to my boot). And regarding my colleague who doesn’t have any “credit” to make me do this, I talked to few Debian developers, and yea their boot is slow as well. Then later on, all my ideas, because it all was just too … “broad” I actually came up with idea of releasing my own distro (for 10th time) :)
Reasons for making my own distro? Well I was actually not happy how KDE was “handled” within Debian. Of course, please don’t go mad about this now, I know all about separate KDE CD’s, “installgui –tasks=standard, kde-desktop”, heh I even had my own version of getting “default” KDE put on Debian. I could go on and on about this one, so I’ll just stop. So don’t go all “he didn’t that” “he didn’t this”, trust me I know it all about whole “kde situation”.
Some of us actually, just as every other distro (during install) has “choose default desktop environment” we actually thought of putting same thing into Debian. And yea, these ideas have been suggested, and to answer all your questions. I’d refer to “Debian on the Desktop“, part that says it pretty much all is:
- We recognize that there are only two important classes of users: the novice, and the expert. We will do everything we can to make things very easy for the novice, while allowing the expert to tweak things if they like.
So yea, there’s your answer. Heh, now some of you may ask “instead of GNOME, why not KDE?” I don’t have official answer for this, but I do have “sayings”. And this is the last one I’ll use, because with all sort of questions I can go till tomorrow and this post will never end.
Most of you may go and say, it’s because “it’s like windows“, no as for everything (Iceweasel let’s say), there’s a deep philosophy behind it. To some of you it all may seem like I’m just going too off topic, but no, I’m on it the whole time, just wanna let you know about all “its neighbors” before hitting the “target.”
When KDE was first released it was awesome and all, but there was one thing that wasn’t right. And that is its was based on Trolltech’s qt licence, that wasn’t anything near GPL. Later on they played with “qpl” and “lgpl”, but finally KDE 4.0 (qt4) is now under GPL.
Back to the topic. Another reason why I needed my own Debian, KDE distro is because besides KDE being absolute default, I needed all the apps I use with it. That is mostly Development/Security/Hacking apps/tools, I wanted my own”feel/design” out of box. Also I wanted to be optimized for mobile/notebooks, some of you may know that in my household I don’t have 1 desktop computer, it’s actually 3 notebooks. I did my “switch” to “mobile computing” many years ago.
Of course, this is not really needed, because you don’t have a need to reinstall Debian every day, you can just install it once, and forget about it until the “end” of your computers life. Maybe the results were just so good, that I wanted everybody else to be able to enjoy the same thing.
Getting to the “core” of this whole thing
So in the end, few of you, after releasing info. about my “peacenow project” just couldn’t wait for it, and kept asking me about it (still are), and since I don’t have time (right now) and since it would be just a customized Debian, and no I’m really not looking for fame with something like “Kubuntu” or similar. I’m just gonna post the “data” I have gathered in last two months here, so you can do the same thing on your Debian desktop.
This is actually peacenow being open for everybody to look inside :)
So basically what I wanted is to have my Debian just boot fast enough right? But as time went on, it just become much more then just making your boot process faster.
“Process” went on, liters and liters of coffee were “drained”, lack of sleep … hm let’s rephrase that to no sleep at all. I’m not gonna complain really.
Yes, before all I’d like to point one more interesting fact. Let’s say you install your Debian from a “Debian KDE CD”, in no time if you’re not careful what you’re installing you’ll end up having GNOME environment on your box in no time! It’s just that, let’s say if you use few Gnome/GTK apps, like Pidgin, GIMP, Xchat, and so on, you’ll need more apps, that need more GTK libs and so on. Out of sudden, you got Gnome as a default on your box. Not even update-alternatives is gonna help you.
Nevertheless, let’s talk about boot again. First I googled, then googled some more, then this and that. You know ultimate formula to make your boot process fast is just to disable the scripts you won’t needed (you won’t be using), maybe think about re-arranging them. But yea, you also might ask yourself “which one’s can I get rid off?”
Boot, KDM, KDE idea explained
When I was thinking/working on this whole thing I thought of elevators. Basically let’s say that I’m on 1st floor and wanted on 5th, this normally would be done by going 1st, 2nd, 3rd, 4th, 5th. But I always have these … mad ideas? What I wanted is to get to 5th floor right of from the very beginning. I was walking with this idea for awhile when it actually hit me!
I thought of a new idea, if you need to go to let’s say 9th floor, you’re gonna “jump” to it, but by climbing the logical floors, in this case these are the odd floors. So 1st, 3rd, 5th, 7th, 9th. Same “politics” are used for even floors, 2, 4, 6, etc… This was like story telling, but I had to prove the point. And it was actually after studying Petronas Towers architecture, it was them who lead me this magnificent idea.
Ok, now that we have boot sorted out, what filesystem should be used? Ok, I’ve been long ReiserFS fan, until it actually ate my root partition. But still I tried it out in this “experiment” And yes, to note that I tried every filesystem with different mount options. Ok, we’re talking that we’re not gonna use this for server, we’re going to use this system for mobile, developer platform, maybe some hacking here and there :P
After trying all the filesystems, even tho before I was strictly against it, ext3 is the winner. Incredibly enough, ext3 will boot faster then xfs! (of course with right mount options). Even without that, it’s incredible, it will even boot faster then ReiserFS. This is also interesting fact, because if we take the statistics, ext3 will be among the last ones when it comes to performance, if we compare it to ReiserFS, xfs, jfs which are top of a line when it comes to performance.
Only thing that’s better then rest of these that ext3 has, is it’s the most stable, most tested filesystem when it comes to Linux. Many distros use it as a default filesystem. You can’t notice many performance differences between all of these using your “bare eye”, so you really won’t notice that’s anything slower on your ext3. Actually let me correct myself, when you’d be copying large amount of data, either from lan or simple dvd, or external hdd … whatever ok, xfs would just slow way way too much! Ok, these situations may not happen every day that you copy so much data onto your hdd, but still … This is one of the biggest reasons that “chased” me off the xfs.
So back to ext3, the thing that was chasing me most away from ext3 is … after “x” number of boots, whole system will be checked, this took time, and this was usually annoying when you needed to fire up system, use it for short period time and halt. Of course this would be fine if I was on desktop computer, server even better, on server I’d actually approve this action as much as possible. But on my notebook, no way. Of course, one of the ideas was to just keep sending it into sleep/hibernate, but trust me, sometimes this just wasn’t the option.
But hey, don’t worry, I took care of this, this won’t happen on your “peacenow debian”. And it’s nothing really harmful for your system, it’s just one of the mount options. Awesome, we have our filesystem now as well, so filesystem + boot, now we’re at the point of KDM.
Ah yes, that kdm. You know, when I first started using “display managers” after Slackware of course, I’d actually use GDM it was faster, it had many themes … why not eh? Of course during my “research” I also used XDM and just plain console login. Yea, talking about this, there was also a talk about KDM4 … which I haven’t tried, but some actually gave me idea. Right now KDE3.5.x and KDE4 can coexist on the same system, so that I should actually use KDM4 that’d log into KDE 3.5.x. Yea this mostly is (for those who don’t know) is that KDE4 thanks to qt4 is faster, needs less memory, so yea this kinda made sense. But nah … I’ll leave this for actual codename: peacenow release or something.
So, plain console login would if you ask me, heh even it “has no looks”, I think its looks are the best. But there was one problem, and that is it would load KDE itself way way too much. Answer to why, is pretty self explanatory, since at that point it wouldn’t even load X. Talking about X, in my research I found out about thing called “OneSecondX” they are building at RedHat. So yea, I’ll keep an on that one, prolly save it for another “HowTo” like this, or put it into an actual distro.
So no console login, GDM would be the winner, but what we want with all this is to avoid GNOME/GTK usage the most we can, so clearly KDM is the winner. XDM is just too … nah.
After all that comes KDE. Ah yes, there’s no need for extra words here, what I actually started using since this whole “revelation” is something similar as seen in Gnome. So I actually started using KDE’s Session Manager to “Restore manually saved session” not just “Restore previous session” which was mostly bringing everything up, from Amarok to Firefox/Iceweasel … everything. So to me, this seems as a best option right now.
After KDE come its applications. Also a really neat lil thing I found is “preload”
preload is an adaptive readahead daemon. It monitors applications that users run, and by analyzing this data, predicts what applications users might run, and fetches those binaries and their dependencies into memory for faster startup times.
I think this explains it all. Of course, and I am serious at this point, you’re system as well as you’re OpenOffice or Firefox/IceWeasel will boot faster then Gentoo’s user. Of course, I can cross the line of sane and experiment bit more with “apt-build world” but I don’t think I’m gonna go that far.
Debian, kernel and app wise
As I said, KDE, mobile, developer oriented Debian platform. What also proved the best from my research is that Debian Etch/stable is the greatest thing that hit the linux world in past year. You know Slackware 12.0 is … wow, but Debian Etch is … standing up to its shoulder, if not then it’s standing higher.
Please don’t make a mistake, and jump on Debian Lenny/testing right away, you need to follow what I say in the following part step by step, very carefully. When you have Etch/stable and then upgrade to Lenny/testing … it’s completely different thing from just installing Lenny/testing right away from one of the weekly generated sources.
Some of them are good, some of them are not. It’s a classic example of gambling. Kernel wise, I haven’t really covered anything about that one here … point is that you’ll end up on 2.6.22-3 and it’s been “stable” for awhile here on lenny/testing so … now if I start talking about this too … then really. No, it’s really good, that I Slackware freak in my soul, who loves to tweak and compile his own kernel didn’t have need for it, because this kernel is just … nice. Not bloated or anything, and still it “all works”.
Application wise, there’s only going one application that’s going to make big move on “Gnome invasion”, and that is Eclipse. Among many other things, it’ll bring Synaptic with it. Synaptic is great, it really is. Many of you now will ask about Adept, Adept 2.x is in stable three, there’s Adept 3 alpha in the experimental resp. at this point, but it’s just so unusable that it’s just … It’s weird, because people will be using it on Kubuntu … So we’ll be using apt-get and aptitude, because we’re hardcore and we know them linux :)
No need for fancy GUI stuff.
One more thing, since we want to use the most of our great KDE powered Debian, there are just few more things you should pay attention to, later on you’ll need to decided wheter you want it in your system or not. In the end we want the ultimate “machina” here, so let’s use all the best Linux/GNU can provide us with.
Amarok … ah yes. You have more then 1000 tracks in your collection, maybe few thousands … what 10k? Nice. Hm, does it actually annoy you when it’s updating collecting, or adding collection to your playlist, or it’s just taking too long to boot? Did you know you can make it all go away?
Amarok being the great application it is, can be set up to make use of MySQL for your collection. So instead of using “standard” SQLite … why not turn Amarok into a real beast it is? After this beast will think it was fed with additional 2GB of ram. Yea … yummy.
I don’t know you really want to this, since it’ll reflect on your boot time, since out of sudden you’ll be booting mysql-server. So if you only have few hundreds to a thousand … thousand and a half you might think this over. But anything over this number, you gotta have it like this!
KDE Guidance, ever heard of that one?
“A power management applet to indicate battery levels and perform hibernate or suspend using HAL.”
If you decide to go for this one, I’ll want you to go to KCenter > Power Control > Laptop battery | Uncheck the “Show battery monitor”
But why?
Well, because Debian doesn’t come with “Hibernate”, “Suspend” button along with your regular “End Session” “Shutdown Computer” “Restart Computer”. Sure, we have it compiled in our kernel, fire up konsole, be a major l337 pass “hibernate” and that’s it.
It’s going to sleep. But once you wake it up, once it get’s back to KDE, session won’t be locked! So you need to go to meeting, you send your computer to hibernate, you’re sneaky co-worker opens the computer lid, system wakes up, and there he’s in middle of your stuff.
Ok, so what’s the deal, KDE Guidance will replace your current (default KDE) battery monitor (that’s why we gonna turn it off), it has few simple options with that same session lock, and lid, and this and that. So yea, even tho it’s 5 mins of c++ to add “Hibernate” to your KMenu, I think this is just a better option.
Please remember these options, because they’ll “reappear” soon in “Step 8”
Putting pieces together
Now, after pretty much explaining everything that’s going to happen, what I need you to do is just follow these step by step instructions.
Step 1.
Go to “Downloading Debian CD/DVD images via HTTP/FTP” go under the cd section, choose your architecture, and find for example “debian-40r3-i386-kde-CD-1.iso“, assuming you’re not completely stupid and that you actually got your “Debian KDE CD”
Boot it up and start the intall
Step 2.
My partition scheme is something as it follows below:
- /dev/sda1 is made as primary partition and is my root partition, it’s on ext3 with “noatime” for mount option.
- /dev/sda2 is also primary partition is on ext3 with “noatime” as mount option as well, this is my home partiton
- /dev/sda5 is set up as logical and I use it as swap.
You can do it just like this, but you don’t have to. You can have your prefrences, just make sure that your ext3 is on “noatime” as mount option. Rest is not really that important in this case, that is defaults suit us just fine.
Step 3.
Don’t choose networking mirrors or anything right now, just finish the install, install grub on MBR … yea few things like the “standards” and you’ll be fine.
I’m sorry if it looks (from my tone) that I’m treating you as you’re doing Debian install for the first time, or that you’re complete idiot … precausion matters I guess :)
Step 4.
Now that your install has completed.
# apt-get install rcconf
# rcconf
You’re services list should be like something below:
[*] acpid[*] atd
[*] cron
[*] dbus
[*] dirmngr
[*] exim4
[*] kdm
[*] klogd
[*] makedev
[*] nfs-common
[*] openbsd-inetd
[*] sysklogd
[ ] alsa
[ ] avahi-daemon
[ ] bootclean
If it does look like that, good, if it doens’t make it look like that. Plus disable the following:
atd, cron, dirmngr, exim4, nfs-common, openbsd-inetd
After you’re done with that part
vim /etc/init.d/rc
Look for “CONCURRENCY=none“, it should be on 32nd line.
Change that same line to “CONCURRENCY=shell”
:wq!
Right now at this point, from grub to kde (kdm loaded) on somewhat modest machine you should be there in <= 40 seconds. Reboot if you wanna see your results. Yea, you’re all happy and stuff, too bad we’re not gonna stop here :)
Step 5.
At this point, what we’ll do is change “/etc/apt/sources.list” and prepare it for “apt-get dist-upgrade”. Please replace the following mirrors, the one from your country, I’m using this one, cuz I find it to be the best pick for area where I live. You have the whole list here.
But before that, make sure you installed “debian multimedia keyring”, you can find the same right here (give it executable permissions chmod a+x). Now that you have it all sorted out, your /etc/apt/sources.list should look like this:
++++++++++++++++++++++++++++++++++++++++++++++++++++++
# stable
# deb http://debian.inode.at/debian/ etch main contrib non-free
# deb-src http://debian.inode.at/debian/ etch main contrib non-free
# testing
deb http://debian.inode.at/debian/ testing main contrib non-free
deb-src http://debian.inode.at/debian/ testing main contrib non-free
# multimedia
deb ftp://debian.netcologne.de/debian-multimedia.org testing main
deb-src ftp://debian.netcologne.de/debian-multimedia.org testing main
++++++++++++++++++++++++++++++++++++++++++++++++++++++
After you’re all done, you’re ready for big moment :)
Step 6.
# apt-get update
# apt-get dist-upgrade
You may want to restart after it’s all done. But since Debian is the only distro that doesn’t even require a restart after whole distro upgrade … well you can be gansta and reset all those services and things so they are updated to new version … just restart ok? :)
One more thing, before restart
# apt-get install preload
Step 7.
Ok, now we may want to hit it off with some “protocols” and applications. This may be a confusing step. First add “security respiratory” for you Debian, I skipped this in “Step 5” because I was saving your ass from errors that could just confuse you … yea I know you already owe me a beer :)
# security
deb http://security.debian.org/ testing/updates main contrib
deb-src http://security.debian.org/ testing/updates main contrib
^ Add to your /etc/apt/sources.list, if it’s something like:
++++++++++++++++++++++++++++++++++++++++++++++++++++++
# stable
# deb http://debian.inode.at/debian/ etch main contrib non-free
# deb-src http://debian.inode.at/debian/ etch main contrib non-free
# testing
deb http://debian.inode.at/debian/ testing main contrib non-free
deb-src http://debian.inode.at/debian/ testing main contrib non-free
# multimedia
deb ftp://debian.netcologne.de/debian-multimedia.org testing main
deb-src ftp://debian.netcologne.de/debian-multimedia.org testing main
# security
deb http://security.debian.org/ testing/updates main contrib
deb-src http://security.debian.org/ testing/updates main contrib
++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please proceed with “# apt-get update”
Step 8.
In this step, I’ll explain how to setup Amarok to use MySQL in 2 minutes.
# apt-get install amarok mysql-server
Once install is done it’ll ask you to setup root (mysql root) password, try making it good. Now do the following, you do remember you root password right?
$ mysql -p -u root
Enter password:
mysql> CREATE DATABASE amarok;
mysql> USE amarok;
mysql> GRANT ALL ON amarok.* TO amarok@localhost IDENTIFIED BY ‘PASSWORD_CHANGE_ME’;
mysql> FLUSH PRIVILEGES;
Now, if you listened carefully enough this will be your first time running Amarok. When it asks about your music collection, instead of selecting “SQLite” select “MySQL” and add the following:
Hostname: localhost
Port: 3306
Database: amarok
Username: amarok
Password: PASSWORD_CHANGE_ME
If you’re wasn’t this time running Amarok no biggie, Amarok > Configure > Collection
Step 9.
KDE Guidance?
# apt-get install kde-guidance kde-guidance-powermanager
Step 10.
Right now, you may have noticed how much stuff I’m really not covering or explaining in details or at all. Every move I do which you can’t understand … just google it. Or what each package listed here does or whatever, you may want to know what’s it all about before installing it, if you’re not aware what’s it for. At this point just do what you’re told and that’s all, I mean no harm.
In this step, we’ll go over some applications that we might need but don’t have them. And these are just some, this is absolute minimum. Also, please note that after years and years of using GIMP and Pidgin, I’m making a final switch to Kopete and Krita. Also don’t forget to configure lisa in KCenter, if you don’t use it, disable it from booting.
System:
# apt-get install preload sux linux-headers-2.6.22-3-686 mysql-server
Internet/Network:
# apt-get install qca-tls lisa xchat pidgin pidgin-musictracker pidgin-plugin-pack
Looks/Appearance:
# apt-get install industrial-cursor-theme ksplash-engine-moodin gtk-qt-engine gtk2-engines-clearlooks ttf-bitstream-vera msttcorefonts kdmtheme kde-style-lipstik kscreensaver-xsavers xscreensaver-gl
Utils:
# apt-get install mesa-utils filelight yakuake unrar zip bzip2
KDE:
# apt-get install gwenview kaffeine kaffeine-mozilla kde-guidance kde-guidance-powermanager digikam krita amarok ktorrent kmobiletools k3b
Console:
# apt-get install sysvconfig htop mpg321 rcconf links2 mc vnstat yacpi
Devel/libs:
# apt-get intall g++ javacc build-essential kdebase-dev cdrdao libdvdcss2 dvd+rw-tools libdvdread3 transcode libncurses5-dev libstdc++5 xvid4conf ogmtools g77 fort77 kde-devel automake autoconf autogen imagemagick automake-1.9
Java:
apt-get install sun-java5-bin sun-java5-demo sun-java5-doc sun-java5-fonts sun-java5-jdk sun-java5-jre sun-java5-plugin
Office:
# apt-get install openoffice.org openoffice.org-kde
Multimedia:
# apt-get install devede dvdrip lives avidemux audacity realplayer w32codecs
Security:
# apt-get install kismet aircrack wpasupplicant macchanger wireshark weplab nmap nessus ettercap ethereal knocker john crack-common ophcrack medussa
As I said, these are just some of the applications that are included, that you may need, and till now nothing is mixed with your pure KDE environment :)
Since we installed pretty much everything we wanted, let’s go over services again.
Step 11.
Now, that we have it all sort out, let’s go over our services. After all those changes, when you run “rcconf” it should look something like:
[*] acpid[*] dhcdbd
[*] hal
[*] kde-guidance
[*] kdm
[*] klogd
[*] mysql
[*] network-manager
[*] network-manager-dispatcher
[*] preload
[*] sysklogd
[ ] atd
[ ] avahi-daemon
[ ] cron
[ ] dirmngr
[ ] discover
[ ] exim4
[ ] fam
[ ] mysql-ndb
[ ] mysql-ndb-mgm
[ ] nfs-common
[ ] openbsd-inetd
Ater it’s all like this. That’s pretty much it. You can tweak it more, but absolutely much more in detail with “sysvconfig“. But after this point I’m not gonna gurantee anything on how successful you’re gonna be and etc … So I’d stay with all this coniguration we have seen so far.
Step 12.
This is the last step. After all your system has been configured marvelously, you’ll prolly turn on some major looks/appearance change/tweaking. First off, I think you should definetely download and install “K Menu Gnome” and “Debian Menu Icons”. Which can be found under FoolControl Downloads. This step is completely optional, and as you can see I haven’t covered Compiz-Fusion here. I already wrote about that, and if you want Compiz on this thing, please come here.
Author notes
It actually took me few hours to write this, and I’d say some 2500 hours working on it, planning it, “designing” it. For what? It may be for nothing at all, few interested heads might appear and find all of this interesting, maybe even say let’s start working on it, a lot could happend and still nothing at all.
But one thing I’m sure of in all of this, that I spend this time trying to benefit overall Linux, Debian and Open Source community, and maybe I didn’t do anything at all. But I kinda tried. I really hope I’ll be able to make it to DebConf8 this August, because I’d really like to talk some things over.
I honestly do think how one Debian desktop should look like. The more people can actually try this “variant” the better, the more comments the better. In meantime tho, all I can say is enjoy :)
March 31 update
Heh, ok so I couldn’t make final switch to kopete so I added pidgin and all its plugins I’m using.
April 5 update
Ok, now what I’m doing is actually I’m on Debian stable (etch), but my applications are all coming from the testing resp. So you can just install stable, stay on it put testing resp in your /etc/apt/sources.list and install all of your apps from testing resp.
I seriously do find this is the best option so far.
Comments