How to become a Kernel hacker

My first obsession with Linux was getting the computer to dial out via SLIP/PPP.  Once I got it to connect to my uncle’s University of Toronto account I was set.  I subscribed to newsgroups, downloaded Linux Docs, and HOWTOs, and learned how to setup various servers.  I was constantly checking the man page for various commands when I wasn’t on the Internet.  I couldn’t always be online, it wasn’t my account and I didn’t want to abuse it.

When I learned enough I started compiling my own kernel, this was needed to enable certain SLIP/PPP options.  I had to learn everything by myself, I didn’t have any books and nobody at school had even heard of Linux.  This was back in the mid 90s.  Computer Programming class in grade 12 was Think Pascal on Macintoshes.  Computer Programming class in grade 10 was Turing on old crusty PCs.  It’s terrible how backwards Canadian schools are when it comes to computer programming curriculum.  I was exempted from grade 11 computer classes because I was always programming demo effects in Turing while other kids were making basic text scripts.  My programs had snow falling and gently flowing in the wind, with multi-coloured text scrolling on the bottom of the screen.  Turing could barely push 100 snow flakes on those machines, so I brought in Turob Pascal, shrunk onto a single 3.5″ floppy, and I demonstrated to the teacher the same snowflakes in Turbo Pascal, pushing 10,000 snow flakes.  He was impressed, but was powerless about the curriculum.  So everyone kept learning Turing, which was utterly useless.  At least with Pascal there was the chance for object-oriented programming concepts, and even some assembler could be used.  At home I was patching kernel source code in C.  You could tell that regular school bored me to hell.  I dropped out in grade 12 and went to work for Sprint Canada as an Internet Technical Specialist.

I never once wondered how the kernel does what it does.  I never once looked at the source code.  I don’t know why.  I think perhaps from the difficulties I had in setting up the system, administering it wasn’t easy, setting up all the programs, compiling and worrying about dependencies, it was so difficult that I must have subconsciously deemed it an impossibility.  Then after losing my job with Sprint Canada to constant lateness (I had gotten bored with the job), and after losing my job at Patriot Computer (I had gotten bored with poor management), I worked for UUNET Canada where we worked with Cisco and Juniper routers (GSR-12000 and M-160).  I kept a Linux server at home and constantly tinkered with it.  I started buying ThinkGeek t-shirts that had Apache written in huge letters on the front.  I miss that t-shirt.  It was dark blue.  So awesome.  They should sell it again!  And then I started a new obsession.  I had a book shelf nearly empty and I figured I’d fill it with computer books.  So I started making a wishlist on Amazon of all the books I could think of I would ever be interested in.  It’s kinda what I’m doing now, except now I can’t afford to shop on Amazon so I’m shopping at bargain book stores and buying $1 books on the mind, philosophy and other subjects, since computer books aren’t that cheap.  So I bought a book on the CCNA certification, I bought one on CCNP, and since my friend Mike Kim who worked at Q9 had a CCDA I also bought that book too.  Did I read them?  No.  But I also started buying some Linux books.  I was especially excited about these books.  I bought one on Linux Application Programming, and my favourite book of all.  It was so long that it didn’t fit on the shelf.  I had to put it sideways on top of other books.  It was called Linux Kernel Commentary.  And it had the full kernel source code and tons of comments explaining what each part of the code did.  This book excited me the most to wait and receive.

But then when the books arrived, my inability to focus on books kicked in.  Books aren’t as exciting as sitting at a computer, listening to techno music, hacking away on a project.  Books don’t posses that level of immersion.  Who wants to watch TV when you got a holodeck?  Who wants to read books when you can read HOWTOs?  I sure didn’t.  And so these awesome books sat on my shelf collecting dust.  Occasionally I would re-organize my shelf and sort the books according to authors, or according to subjects, when I got bored of how they looked.  But I never read them.

Yesterday I went into World’s Biggest Bookstore (WBBS) near Dundas Square and saw a book that brought back a huge amount of motivation.  It’s called Linux Kernel Programming.  I briefly skimmed it’s contents, and then I gave up, it looked too hard.  So I left it on the shelf and went home.  Plus I don’t have the money to buy it.  I have $200 in my savings account, and I’m desperately trying to get up to $400 so I can buy myself a replacement pair of contact lenses, which I need in order to read anything.  I’m nearly blind without them.  Even with them I’m half blind.  Poor me.  In my chequing account I have $30 until the 1st of October.  I need that money for food.  I spend maybe $30 per week on food.  So I’m stuck.  Unless I take money out of my savings to buy the book I won’t be able to afford it.  Then today I went for a walk and I went into WBBS again and I looked more closely at the table of contents.  I was ready to dip into my savings account.  Maybe I can live with old contact lenses for an extra month?  The book costs $60!!!  So I read for half an hour the table of contents and parts of various chapters.  What they talk about in that book seems so fucking foreign to me.  It’s interesting, but it seems beyond my level of comprehension.  Like they’re talking jibberish.  I didn’t understand much of what I read.  Kernel Sycnhronization, process scheduling, memory management, device drivers.  Linux has device drivers?!?!?!?  I thought this wasn’t like Windows?  What gives here?  Why does my OS have device drivers?  Didn’t we do away with those archaic things long ago?  I was perplexed.  In bitter disappointment I put the book down and browsed other sections in the computer section to calm myself down.  I felt like such a failure.  I would never be a kernel hacker.  I felt so sad.  I walked to the hot dog stand and bought a Polish sausage just to cheer myself up.  Plus it was lunch time, 4pm.

I want to understand how the kernel functions.  I don’t need my changes to be approved by Linus himself.  I don’t need to be that much of a guru.  Plus that requires being politically friendly, not just good at hacking.  I have no such skillz.  But I would like to understand how the kernel performs it’s tasks.  Why it boots up the way it does.  Why the boot up process can’t be more user-friendly?  Why is it so god damn ugly with all that yucky text?  Bogomips yourself Linus!  I still remember how it used to take 8 hours to compile a new kernel on my first Linux box, a 386sx-16mhz computer.  I wonder how long it would take on my current Pentium 4 2ghz.  I also don’t have a backup plan in case the new kernels fail.  I have Ubuntu installed, someone else installed it.  I don’t know how to install Linux anymore.  I have a Macbook but I can’t really burn a Linux bootable CD with it.  I don’t have the knowledge on how to do that.  I have flash drives, but I don’t know how to build a Linux bootable flash drive from a Macintosh that will run on a Pentium.  Is that even possible?  So I’m afraid of compiling my own kernel.  I just stick with what Canonical provides.  It seems to do a good job.  Perhaps recompiling the kernel isn’t a daily task anymore of Linux administration?  I always thought it was stupid to have to recompile my own kernel just to get on the Interent.  How stupid.  But I didn’t question it at the time, I just learned and learned until I got it working.

These days I question everything.  I have become a true Mac user.  I want one-click service.  I don’t want to compile things.  I’ve become lazy.  And as a result I am becoming technology phobic.  I’d like to change that.  I’d like to discover some means of figuring out the Linux kernel’s secrets.  I’d like some HOWTO or eBook to explain to me how the Kernel works.  Without me spending any money that is.  I have yet to do a Google search.  I fear doing a Google search.  I don’t want to go through thousands of websites just to get the information I know is contained in that one book at WBBS.  It’s all already there.  If only I dared to spend $60.  It took me 4 months to save $200.  I’m scared of dipping into my savings just to fullfil this dream.

I’m stuck.


Linux was simple in the 90s

Hello there, my name is Bojan and I live in Toronto.  I started using Linux in the early 90s.  My dad bought our family a 386 sx-16mhz computer for nearly $3,000 and I pretty much made it my own machine.  Every day after school I’d log onto the local BBS systems and download like crazy.  I played some doors (online games) like Trade Wars 2002 and Barren Realms Elite (BRE), too.  The largest Canadian BBS was called CRS, Canada Remote Systems, and through it I met my first girlfriend, in one of the chat rooms.  Jennifer and I met a year after first chatting online, we spent 14.5 hours on the phone the first time we talked, we were inseparable.  She was the best thing in my life for the brief moment while it lasted.  The BBS world brought much knowledge to me and much happiness.  It was the kind of social experience my next door neighbours simply could not afford to provide.  I chatted with people from all parts of the world and got perspectives on code and on software that I never otherwise would have gotten.

Then my uncle got me access to his University of Toronto account and I started exploring Usenet with tin.  It was a whole new world, this Unix thing.  Somehow I stumbled on a message about a great free operating system called Linux.  I found the source code to kernel 1.2.3 and immediately downloaded it.  My experience in programming at that time was mostly with BASIC on the Commodore 64, and even that was mostly just typing code into the machine from a book.  I still didn’t grasp the concepts of how to program, what is meant by compiling and linking?  What is an object file?  What are all these .H files doing here?  They seem so useless.  I had one other source of interest and that was Turbo Pascal.  Through the BBS world I had gotten ahold of the SWAG Pascal archives and I had spent a lot of time looking at other people’s code and trying to understand it.  I got so good at it that within a year I was programming my own door for my own BBS, called 12th Warrior.  I spent countless hours programming it and I got it up to v12D.  It featured something no other door did.  The ability for the SysOp to switch the screen to 28×80 display (text mode resolution) so that they would have 3 extra lines with which to see statistics about the local user.  I got the idea from the demo scene.   I was very interested in demos at the time.  Future Crew and Assembly was where it was at.  I was in awe of crack groups such as TDT, THG, INC and so forth.  But when I found Linux, somehow my interests in Pascal, demo scene and BBSes faded.  I was imbued completely.  I met someone else who ran LInux in Toronto called Justin, and he taught me quite a lot over the course of a year.  I would compile my kernel on the 386 and go rollerblading for the hours that it took to build the new system.  Listening to U2 on my walkman while rollerblading down Valleywoods was a blast.  I’d come home and see that I made a compiling error, I was compiling the wrong architecture.  So I’d have to wait another day for this thing to compile.

Eventually I was running my own Usenet feed, subscribing to the plenthora of binaries groups that I could find.  I spent a lot of time reading comp.os things, the web wasn’t quite so popular at the time.  It mostly consisted of icon and picture galleries and the occasional interesting news site.  Slashdot didn’t exist yet!  Gee that was so long ago?  I got to running tin perfectly, I even learned shell scripting.  it was a neccesity.  Finally after a year of using Linux I heard about X11 and tried to run it on my 386 sx-16mhz computer.  It loaded just fine, but the speed at which it drew the windows for the Jet Set Willy game took a minute per frame.  It was unplayable.

My mom got a new computer, a brand spanking new IBM Aptiva M70 running an operating system that I never heard of before, OS/2 Warp.  And so I forgot all about Linux for a while.  I got into ReXX scripting, I learned all I could about OS/2.  I was convinced it was far better than any OS in the world.  It even ran Windows applications, something Linux didn’t do!  It ran DOS, OS/2 and Windows.  Talk about cross-compatibility.  The future must have rested with OS/2, right?  I showed my sisters some mind games that came with the Aptiva and they were hooked.  Every day after school they insisted on playing the mind games, they loved them.  I vaguely remember a few of them: Hyperman, Shark Lab, and a 3D wolfenstein like interface to a gallery of the ocean.  There was also an awesome video game I loved very much featuring a yellow cartoon like submarine.  I have tried to find this game since then but I have never been able to figure out what it is.  A year or two passed, I moved out at the age of 18, got my own basement apartment about an hour away from my family, and I got my very own Pentium 233MMX computer.  The first thing I did was install Windows 98 on it so I can play Starcraft.  Within a month I saved enough money for a second computer and I installed Linux on it.  I continued tinkering, this time with SQL databses, and Perl.  Through my job at Sprint Canada I got a side contracting job with Hypersource Communications and I got to build the Fifth Annual Report for the Prime Minister of Canada.  We used Dreamweaver, Perl, and Photoshop.  It was an interesting project, one I would not have been able to accomplish without all that Linux background.

Eventually my job at Sprint Canada didn’t interest me anymore and I started working for Patriot Computer.  There I was devastated to discover that a computer company ran it’s entire technical support department based on paper records.  Every call was kept on papers scattered throughout the office.  This seemed shameful.  So given the Windows platform they were using and my SQL knowledge I built a database application using Microsoft Access with a graphical forms interface.  I had never used Office products before, yet I think that my figuring out Linux helped me to be comfortable in new environments.  I was able to pick up Microsoft Access with great ease.  Within a month the entire call centre was using my database.  I had to make it multi-user aware.  The company grew to 30 employees for technical support and I was promoted to supervisor.  I had to upgrade the database at each step.  But this company wasn’t being run the way I thought it was.  It was run by Indian people, and they didn’t treat the market the way I thought they should.  We came to clashing at the end and I was let go.  Within three months they were bankrupt.  I had nothing to do with it.

Then I was devastated, and I moved in with my best friend Mikolaj.  I kept running Linux and fooling around with it.  I learned about IP masquarading, ip chains, and TCP/IP.  Somehow I heard that UUNET Canada was hiring and I applied.  They called me back for an interview after looking at my resume, and I took their entrance test.  I scored 98% on the test and was hired immediately.  Within 8 months I was promoted to the Tier II position, I was the emergency on-call for all of Canada.  My daily exposure to Cisco equipment allowed me to know topics such as BGP, MPLS, and routing in depth.  I even played around with Juniper M-160 routers.  They’re huge!  Sometimes I’d sneak in a video camera and record the awesome fun that team had.  I felt like it was my new family.  Every day did not feel like work, I felt like I was in heaven.  Sometimes we’d go for drinks after work and some of them would end up sleeping on my couch as they’d missed the last GO train.  We’d play XBOX together, we’d buy home theater equipment together, we’d route packets all day long.  We’d tell customers their networks needed upgrades.  We were the shit.  And through it all I kept Linux at my side.  I was now programming in PHP, MySQL and learning the basics of Kernel programming.  I bought books on device driver programming, I bought books on CCNA certification.  I was never good at studying.  I am nearly blind and yet I was working with people who held PhDs, yet I never even finished high school.  I was always good at figuring things out on my own, at my own pace.  If they were interesting to me.  Linux was always fun to tinker with.  It has that DOS look and feel.  Huge big letters I could read even with my poor eyesight.

Then in 2002 I had a vision.  I would be a huge music star, as my hobby was to write music on the side.  I was good at programming music in Impulse Tracker.  So I learned that all the professionals were using Macintoshes.  So I did like any copycatter does, and I spent $5,000 on my first Macintosh.  A G4 733mhz machine.  I also bought Logic Audio 5, it came with a free upgrade to v6.  And so I forgot all about Linux once again.  I was mesmerized by the Macintosh.  The promise of easy to use computers appealed to me so much.  No longer compiling would be required.  Dependencies checking?  No more!  This was the tool of the gods!!!  Not some child’s toy like Linux.  Menus functioned, they didn’t disappear randomly off of the screen like they did in Gnome.  The mail application never crashed when I received an HTML spam message.  The Finder didn’t feature Emblem-support like Nautilus did on Red Hat, but at least it showed me icons within a second of opening the folder.  It didn’t spin uselessly for 10 seconds loading the data from the hard drive like Linux did at the time.  This was it, I was going to reach the big time.   And so I worked at UUNET and learned the Apple way.  I became an Apple fanboy.  Linux was shit now, and Apple was the mothership.

But none of my dreams came true on the Mac.  I couldn’t learn Logic, it was too complicated and cumbersome of a program.  Sure Impulse Tracker is a crummy old DOS application, but at least with it I could create amazing work!  With Logic all I could do was record a few chords and maybe add an echo here and there.  It sucked.  So I continued writing music in Impulse Tracker, and I used my Mac for everything else.  I eventually got a 17″ Powerbook, the largest laptop in the world, and played Halo on it at work, when my boss wasn’t looking of course.  I became pretty good at Halo, and it would become the first or second game I would ever play to the very end and finish it.  I’m not good at finishing projects.  I always have ten thousand things on the go, and never anything done.  I usually just give up and delete things I work on.  I never have any accomplishments as a result.  It’s a constant problem of mine.

Then I had a brilliant idea.  I’ll start my own record label to release my music.  iTunes Store was just becoming popular, so I figured I could make it really big.  People would surely pay a $1 for my songs.  They were awesome. I loved them!  So I quit my job at UUNET, and without any savings I decided I’d start a music career.  But when the summer rolled around I couldn’t afford to pay for my apartment any longer and I had to move out.  To the streets I went.  I lived off of 4 VISA cards for about half a year or so.  Then I ran into some health problems, ended up hospitalized for two months, the world wasn’t making any sense any more.  I moved back in with my grandma in Serbia.  A terrible decision.  Life there was even worse than the streets of Canada.  I was wearing torn clothing every day, my shoes had actual holes in them.  I shaved maybe once a month in fear of not being able to afford shaving cream.  My contact lenses were so old that yellow snot was coming out of my eyes daily.  We barely had food to eat.  The roof was letting water in, almost in every room.  Whenever it rained my grandma ran to the windows and placed newspaper on the floor to soak up the water.  The house was not very good for us, all the walls had mouldy newspapers, and there was even a room with black on the walls behind the wallpapers.  That was toxic mould.  Disgusting stuff.  It still hasn’t been cleaned up.

Then my mom steppped in and moved both of us back to Canada, and my grandma became a citizen.  Through her work I got a computer, for around $35, that runs Linux.  It came with something called Ubuntu.  I haven’t used Linux in about 8-10 years now. I don’t understand how it functions anymore.  When I boot up Ubuntu, it goes into a graphical display.  All the shell scripts have changed names, all the locations are different.  Nothing is as it was in Slackware.  It’s so confusing.

I want to be employable again.  I want to work with Linux at least on some level.  I believe in open source software, since the BBS days when people gave their Pascal code for free to the SWAG archive.  That was the start of open source, that was the true revolution.  People giving away their code – crazy people, right?  I belong with those crazy people.  I believe in free code.  But I also realize that I still have to pay farmers for food I eat.  So I need some way to pay for all this free stuff I want to do.  So that is what this blog is all about.  My focus on Linux, and other operating systems.  I have played with the idea of running BeOS but that seems so fudged up that it’s not even worth investigating.  I don’t know.  I liked the promise of BeOS when I first heard about it.  But nobody uses that anymore.  Anyway, I hope to make better use of my LInux machine as time goes by.  We’ll see what I manage to accomplish.