Minimalism & Debian

Less is more, as the saying goes.

While I love using Fedora in my daily work, sometimes when I want to relax I find using an alternative distribution is good therapy.  Fedora is fabulous with its GNOME Shell finery, but occasionally I hanker for something simpler and more lightweight.  It’s also good to see how the other half lives 🙂

So, I decided to put Debian on my netbook.  With no GUI.  Everything I do on it must be by the command line, including web research.  Compared to Fedora, Debian‘s system requirements are practically non-existent, which is especially good if you want your system to still run nice and quick.

First steps…

  1. Firstly, I had of course to grab the distribution.  I’m not over-fussed about running cutting edge stuff on this machine.  For me, the most important thing is a low-maintenance base where I don’ t need to think much about the distribution changing every 6 months.

    I visited the Debian Mirror List and grabbed a NetInst CD image.

  2. Next off, I plugged in the USB CD/DVD drive and installed the software, making sure I didn’t overwrite my XP partition.  Well, you need a reminder every so often how awful life used to be.. 😉
  3. I won’t go into the installation process here – there’s plenty of documentation elsewhere which covers that.  So, once installed, I really wanted to keep the installed software as trim as possible.  That is, with one or two exceptions…
     
  1. Firstly, I have tried and tried it again but I just can’t/don’t/won’t do vi, vim or anything similar.  It’s just not my bag.  It’s emacs for me.  I also want to keep my mail inside emacs, so it’s goodbye to mutt – even if it does suck less, apparently 😉
  2. Also, Exim4.  The servers I manage don’t use it (generally it’s Postfix or QMail) and I already have a tiny smattering of Sendmail knowledge – so I have no desire to pick up on this.  I’m sure it’s a fine MTA and undoubtedly there are many technical reasons why I should keep it on my netbook… but even so, no thanks.

    Therefore, my software changes are:

    $ sudo aptitude remove exim4 exim4-base exim4-config exim4-daemon-light vi mutt

    $ sudo aptitude install emacs w3m-el sendmail

  • So far so good.  However, I was still stuck with a chunky 80×25 character screen when booting up, which is real ugly.  Through much searching and grub configuration editing, I found that my answer was actually to install the intel video package.

    $ sudo aptitude install xserver-xorg-video-intel

    You’re on to a winner here, because Debian Squeeze is already set up for Kernel Mode Setting.  In other words, as soon as your system starts booting up, the video drivers get loaded and the optimal video mode is enabled (or, at least, that’s the intention).

    Whether or not it’s worth specifying screenmode in grub is open for debate.  FWIW, I put this in /etc/default/grub:

    GRUB_GFXMODE=1024x600
    GRUB_GFXPAYLOAD=1024x600x16

    … And in /etc/grub.d/40_custom:

    set gfxpayload=1024x600x16

    Then, I simply updated grub with the new config:

    $ sudo update-grub

    Please note that this step relates to my Intel-based netbook.  Yours may vary.

  • The only significant piece of the puzzle remaining was to get wireless sorted out and connect to my server:

    $ sudo aptitude install wireless-tools iw wpasupplicant autofs nfs-common

    ** PLEASE NOTE: this step assumes your wireless network device doesn’t require firmware or that you already have the firmware installed in /lib/firmware. **

    Once done, you need to uncomment the /net line in /etc/auto.master and restart autofs:

    $ service restart autofs

    If you want to refer to server by hostname and are not running a DNS server, add the hostname to /etc/hosts (somewhere below the localhost lines):

    111.222.333.444      myserver.mydomain.com  myserver

    At this point, assuming all went well, you can cd to /net/ in either the shell or a file manager such as nautilus (if running a GUI).

    So, this takes care of a basic local network configuration, but we still need to actually get connected to it on wifi.  So, there is, in my /etc/network/interfaces:

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    allow-hotplug eth0
    iface eth0 inet dhcp

    # Wireless
    auto wlan0
    iface wlan_mynet inet dhcp
    wpa_ssid my-network-ssid
    wpa-psk  my-network-key

    Once done, save this file and change the permissions for extra security:

    $ sudo chmod 0600 /etc/network/interfaces

    – and connect up, like this:

    $ sudo ifup wlan0=wlan_mynet

  • Voila!  With luck, maybe a little patience, and possibly an extra step or two (which you can hopefully figure out, if needed) these are the key set up steps which will make your netbook/laptop nice and lean, and perhaps more fun to play with.

    Next time, I’ll go through a few tools I use for ‘net stuff.

    I recently upgraded to Fedora 15 on my netbook (a Samsung N130).  For a while I used Ubuntu 10.04 (nice and quick, reliable wireless, good battery), then 10.10 (bit slower, still reliable, reasonable battery) and then 11.04 (sadly a bit more sappy towards the battery and – subjectively- more laggy too).

    But saying that, I like Ubuntu 11.04 in many ways.  I think Unity is good, despite much antipathy towards it elsewhere on t’internet, and the intregration of social networking, media player, messaging and so on makes for a pretty swish experience.  One problem that started plaguing it on my netbook, however, was that wireless became increasingly unreliable.  Sometimes I’d have to reboot multiple times to get a conneciton to my Access Point.  Connecting to wireless when coming out of standby never worked, period.  

    The netbook contains a Realtek RTL8192e wireless chip – a problem in Linux due to Realtek not really pushing development as proactively as possible into the Linux kernel.

    So, what to do?

    If you’re reading this then you’re probably thinking you have two options:
    1) Struggle for an eternity to get the native Linux driver working properly, or
    2) Install ndis-wrapper, download the Windows driver binaries and use that instead.

    There were the options I felt I had after reading this fedoraforum thread  (F15, RTL8192 and Staging Drivers) and this thread too (F14 RTL8192E Staging Driver).

    I almost swayed completely to option 2), but as if by magic I managed to get option 1) working.  This was mainly thanks to this ubuntu forum post.  In the post is a link to a download with the native linux RTL8192e driver files (I have taken the liberty of copying this archive and uploading here, in case that link stops working).

    Here’s what I did:

    In a terminal, type (as root)

    # yum groupinstall “Development Tools” -y

    Then, as your normal user:

    # wget http://www.dirk-hoeschen.de/temp/rtl819Xe.tar.gz
      (or my link, above)
    # tar xfz rtl819Xe.tar.gz
    # cd rtl819Xe

    Then, again as root:
    # ./install.sh
    (this step compiles the driver and loads the resultant kernel module)

    Because Linux loads drivers (modules) dynamically, the device is brought up immediately.

    My wireless card was then recognised and visible in Network Manager.  My access point was recognised and easy to connect to.  I have noticed that negotiation times are a bit longer than before, but I can confirm that after a little testing I can now put my netbook into standby, then awaken it and hey presto! my wireless reconnects automatically.  This is not a fringe use case; I for one am very glad this works as it should now.

    Unlike the ubuntu post, I didn’t download the latest sources to compile.  I just went with the files in the archive. If you have difficulties, it may be worth investigating this – YMMV.

    Although Fedora 15 was a pain to start off with, due to this issue, I found that once sorted it’s now becoming a real joy to use.  The extended battery life is really something to behold too – I’m getting a 20-30% increase in operating time now (up to 4 hours instead of 3 on Ubuntu 11.04).

    Hope this helps someone out there.  If not, you may still want to follow some ndis-wrapper instructions – this might be a better alternative for you.

    Good luck!

    (to view all photos in this article, visit my flickr photoset)

    I’ve been needing a netbook for work for a little while.  So, chancing upon Martin Lewis‘s wonderful MoneySavingExpert web site, this article on cheaper netbooks was the prompt I needed.

    My main criteria for a netbook were:

    • Battery life as long as possible.
    • With my large hands, it must be as ergonomic and accommodating as possible.
    • Preferably without Windows.  What’s the point of paying for something I won’t use? 
    • Linux must work well on it.
    • As light & small as possible.

    Given that nearly all early (pre dual core) netbooks are based on Intel’s Atom / 945 mobile chipset, most of the above criteria were already met.  Ergonomically, I’d read that each netbook had its foibles, so this point was moot.  The battery life was, for me, the deciding factor, which is why I chose a Samsung N130: the only model in the discounted range which ships with a 6-cell battery.  In ideal circumstances, this will last 6 hours.


    Order process, shipping, packing and unpacking

    The Argos outlet on eBay accepted only PayPal payments, but this didn’t matter to me.  The purchase process was as painless as you could expect.  I ordered the unit on a Friday morning.  On a Monday morning, at my office, it arrived courtesy of a cheery DHL delivery chap.  No complaints so far!

    The packing itself was as you’d expect: satisfactory for the job, with nothing much else to note.  Unboxing the unit was a quick affair, and before long I had a shiny netbook on my desk.  Considering this unit is classed as “refurbished”, I could see absolutely no defect or mark on it whatsoever.  I would have been very happy were this brand new.

    Plugging in, powering on, first impressions

    When unpacking the device, I was impressed with the general feel of it.  The plastic shell feels robust and the lid action is smooth.  Instead of a clasp, the lid clamps to the base by means (I’m guessing) of a magnet arrangement, which has a lovely feel about it.  Furthermore, Fedora behaves as expected, going straight into standby when the lid is closed.

    The weight of the unit was good too.  Before I put the battery in, that is.  After that, the weight felt subjectively like it had more than doubled, which would put some people off I’d imagine. However, it’s hardly as heavy as my laptop so by my standards it’s still very light.  A positive effect of the battery unit is in providing more stability while on a desk, and more resistance to the motion of closing/opening the lid.  All together, it works well.

    Along the front, left of the touchpad, are 5 LEDs.  I question the value of having an “on” LED in addition to a “charging” LED, but these are tiny devices so power consumption is likely to be equally tiny.  Besides, if unplugged, the charging LED isn’t illuminated. Again, another moot point.

    The feel of the keyboard is good. There isn’t a compromise in terms of key press action, although to fit in a full QWERTY keyboard, some compromises in layout have had to take place. As you can see, the hash (#)/tilde and right square-bracket/brace keys are squashed in, but the compromise is acceptable.

    Fedora installation and general usage

    I use Fedora, CentOS and Red Hat in my day job, so for me it’s the architecture that I prefer due to familiarity (which, in this case, has not yet bred contempt!).

    Using the usblive-creator tool in F13 on my laptop, I was able to set up a USB drive with a Fedora 12 live CD image, ready to boot and install on the netbook.  I’d opted for F12 because I’ve had issues with mobile broadband on F13 that worked fine on F12, and mobility is the primary goal here.  A quick change to the boot order in the BIOS and it was good to go.


    I was surprised how quickly the installation completed.  After having read about Atoms generally being slow processors, I’d expected an unhealthy dose of lethargy when installing the OS.  The first boot wasn’t particularly tardy either (and this is running on a 160GB Toshiba hard drive with Fedora’s default encrypted LVM set up).  It’s comparable to my HP laptop (2007 model) with a Turion TL-60 (@2GHz) w/4GiB RAM (@667MHz).  In usage, though, it’s somewhat slower than the AMD laptop, taking considerably longer to load up Firefox (with half as many extensions, too).

    As hoped, my Huawei E270 mobile broadband dongle worked straight away.  I was also pleased that the webcam worked with no effort whatsoever (screenshot shows Cheese; ’nuff said)! So, what doesn’t work straight away?

    • Brightness controls on the keyboard.  Probably fixed easily by identifying the char code generated with the keystroke and binding it to the dim/brightening function in GConf (he says, having no real clue..)
    • Wireless.  I believe a Broadcom 4312 is under the bonnet, so this shouldn’t be a hard fix with a quick visit to linuxwireless.org.
    • Some things I haven’t tested yet, like monitor switching and the built-in microphone.  But everything else seems to work fine.

    A bit more on ergnomics

    It has taken me a little while to get used to the layout of the keyboard and touchpad.  A problem I am overcoming slowly is that the touchpad’s two buttons are actually a single, rocker-style button.  It sits flush to the surface of the base, and this lack of tactile feel I find awkward.  I often find my thumb in the wrong position, mistakenly pressing on the bottom of the touchpad rather than the left button.  The pointer then jumps across the screen instead of clicking on the intended widget.  A small but annoying issue.

    Also, the keyboard is great to use while typing (as I do here, writing this review on the N130) but for cursor positioning it can become more tricky.  Hitting CTRL-End to position the cursor at the end of some text, for example, is now CTRL-Fn-PgDn(End), given the multi-function aspect of the PgDn(End) key.  Likewise, the cursor keys are just a shade on the small side.  But these are minor complaints in the overall picture.

    Final analysis

    Taking into account the annoyances, weighing them against the needs of the many… I would have to have to award this machine 8/10.  At £150 (incl VAT) + £4 postage, it has exceeded my expectations.  Sure, it’s not perfect, but the price, utility and solid build get my vote.  I would recommend one for a partner, friend or colleague….. maybe even a parent 😉

    Oh, there is one thing about it that I couldn’t understand.  There was this sticker on the top which made no sense (“Designed for Windows XP”).  Surely you design an operating system for target hardware and not the other way around..?  Well, regardless, I think the new location for the sticker makes much more sense.  🙂


    < – old

    new ->