Search Results: "spa"

21 November 2009

Eddy Petrișor: Vote at the presidential elections!

Yesterday was the last day of presidential campaign, the most poisonous campaign since 1989, when the communist rule has fallen ... or so says history.

This campaign period was one of firsts of all kinds, mostly bad.

This is the first presidential campaign:This is the first time I realise how important it is for everybody to go and cast a vote for the candidate they prefer to dilute the effects of the frauds.

Go and vote for the candidate you agree the most!

Don't cast a "useful vote", otherwise you will disservice your prefered candidate in three ways:

Don't forget, tomorrow, the 22nd of November spare some 15-30 minutes and vote for the person that represents you most! Don't follow the flock, vote sincerely!


Vote, because your vote counts! Otherwise why would they bother to convince you to vote for them?

Torsten Werner: new arch all handling in Debian: lesson #1


Since some days we keep packages of Architecture: all in the archive as long as they are needed. You can find some details about that in my former post:
dak dominate will dodadoda the Debian archive soon.

The package that could currently profit most from that change is rpm! But the package dependencies are actually not strong enough. The source package rpm builds some arch all packages like rpm-common and several arch any packages and some of them (rpm, librpm0) have an unversioned field
Depends: rpm-common.
This dependency can be improved to
Depends: rpm-common (= $ source:Version )
to avoid nasty bugs after upgrading.

I fear that we have more of such packages in Debian.

20 November 2009

Julian Andres Klode: Back to the 90s Bye PC, welcome back thin clients


In the 90s, you had a large machine and several thin clients accessing it by using X11 via network. In 2010, you will have large datacenters providing applications to and storing the data of millions of users. As you might have guessed, I am talking about Google Chrome OS. It seems that the PC era is slowly coming to an end, with devices being increasingly connected to the cloud and people being always online; and storing their data on Google s servers. We do emails online using Google Mail, we do navigation online using Google Maps, we edit and view our documents using Google Docs, our newspaper is Google News; and when we want entertainment we open the browser and type youtube.com into the URL bar. Even if we were formatting the hard disk and reinstalling the system, most people wouldn t even notice; because all there data is stored online. There is also the question of freedom. Free software is not very widespread in the SaaS world. You also lose the control over your data. But RMS can tell you more about it. So it seems that 2010, Google is the new mainframe and netbooks and smartphones are the new terminals. Whether this is good or not cannot be said. The question you have to ask yourself is whether you can trust Google to keep your data secure or not. I trust them enough to host all of my emails, the RSS feeds I read, my searches. Posted in General

Neil Williams: po4a-build - one step docs translation

po4a, including the new po4a-build script, has been released and po4a (0.37.0-1) has been uploaded to Debian. This release also includes a fully updated Spanish translation, including the new po4a-build documentation, thanks to Omar Campagne.

po4a-build will be used as a build-dependency by emdebian-rootfs and svn-buildpackage (both due to have updated releases in a couple of days). (po4a-build itself was developed and tested within these packages - as 'genmanpages'.)

po4a-build is intended to make it as easy to produce translated documentation as it can be to produce the current untranslated content.

When po4a prepares the translated content as POD or DocBook XML, the final documentation can then be built using po4a-build. Both the untranslated and translated content is built as a single process, updating the POT files at the same time.

Existing build instructions are replaced by a single call to po4a-build and a simple configuration file is used to tell po4a-build how to build each element and which binary packages will include the translated and untranslated content.

See po4a-build (1) and po4a-build.conf (5) from the installed po4a package.

Feel free to try it out with any package that builds translated documentation, *especially* if it also builds binary gettext translations of program output without using autotools, e.g. perl scripts using $(MAKE) but not ./configure.

This should be a useful step in encouraging more packages to translate their script output and manpages. It is trivial to add translation to packages using the full autotools intltool setup, now po4a-build brings the same level of ease to packages only using $(MAKE). (If someone wants to investigate how CMake can do the same, let me know.)

http://alioth.debian.org/projects/po4a/

http://alioth.debian.org/frs/download.php/3183/po4a-v0.37.0.tar.gz

http://freshmeat.net/projects/po4a/releases
(0.37.0 announcement pending approval by FM)

Russell Coker: Some Tips for Shell Code that Won t Destroy Your OS

When writing a shell script you need to take some care to ensure that it won t run amok. Extra care is needed for shell scripts that run as root, firstly because of the obvious potential for random destruction, and secondly because of the potential for interaction between accounts that can cause problems. Please note that nothing in this post is theoretical, it s all from real observations of real systems that have been broken. Also note that this is not an attempt at making an exhaustive list of ways that people may write horrible scripts, merely enough to demonstrate the general problem and encourage people to think about ways to solve the general problems. But please submit your best examples of how scripts have broken systems as comments.

Gunnar Wolf: EDUSOL almost over - Some highlights

Whew! Is it karma or what? What makes me get involved in two horribly complex, two-week-long conferences, year after year? Of course, both (DebConf and EDUSOL) are great fun to be part of, and both have greatly influenced both my skills and interests. Anyway, this is the fifth year we hold EDUSOL. Tomorrow we will bring the two weeks of activities to an end, hold the last two videoconferences, and finally declare it a done deal. I must anticipate the facts and call it a success, as it clearly will be recognized as such. One of the most visible although we insist, not the core activities of the Encounter are the videoconferences. They are certainly among the most complex. And the videoconferences' value is greatly enhanced because, even if they are naturally a synchronous activity (it takes place at a given point in time), they live on after they are held: I do my best effort to publish them as soon as possible (less than one day off), and they are posted to their node, from where comments can continue. This was the reason, i.e., why we decided to move at the last minute tomorrow's conference: Due to a misunderstanding, Beatriz Busaniche (a good friend of ours and a very reknown Argentinian Free Software promotor, from Via Libre) thought her talk would be held today, and we had programmed her for tomorrow. No worries - We held it today, and it is already online for whoever wants to take part :-) So, I don't want to hold this any longer (I will link to the two conferences that I'm still missing from this same entry). Here is the list of (and links to) videoconferences we have held.
Tuesday 2009-11-17
Wednesday 2009-11-18
Thursday 2009-11-19
Friday 2009-11-20
As two last notes: Regarding the IRC interaction photos I recently talked about, we did a very kewl thing: Take over 2000 consecutive photos and put them together on a stack. Flip them one at a time. What do you get? But of course A very fun to view and interesting interaction video! We have to hand-update it and it is a bit old right now, but nevertheless, it is very interesting as it is. Finally... I must publicly say I can be quite an asshole. And yes, I know I talked this over privately with the affected people and they hold no grudge against me... But still - yesterday we had an IRC talk about NING Latin American Moodlers, by Luc a Osuna (Venezuela) and Maryel Mendiola (Mexico). One of the points they raised was they were working towards (and promoting) a Moodle certification. And... Yes, I recognize I cannot hear the mention of the certification word without jumping and saying certifications are overrated. Well, but being tired, and not being really thoughtful... I should have known where to stop, where it was enough of a point made. I ended up making Maryel and Luc a feel attacked during their own presentation, and that should have never happened. A public and heartfelt apology to them :-(

19 November 2009

Russell Coker: First Dead Disk of Summer

Last night I was in the middle of checking my email when I found that clicking on a URL link wouldn t work. It turned out that my web browser had become unavailable due to a read error on the partition for my root filesystem (the usual IDE uncorrectable error thing). My main machine is a Thinkpad T41p, it is apparently possible to replace the CD-ROM drive with a second hard drive to allow RAID-1 but I haven t felt inclined to spend the money on that. So any hard drive error is a big problem. Fortunately I had made a backup of /home only a few days ago. I use offline IMAP for my email so that my recent email (the most variable data that matters to me) is stored on a server with a RAID-1 as well as on my laptop and my netbook. The amount of other stuff I ve been working on in my home directory is fairly small, and the amount of that which isn t on other systems is even smaller (I usually build packages on servers and then scp the relevant files to my laptop for Debian uploads, bug reports, etc. The first thing I did was to ssh to one of my servers and paste a bunch of text from various open programs into a file there. That was the contents of all open programs, the URLs of web pages I was reading, and the contents of an OpenOffice spread-sheet which I couldn t save directly (it seems that a read-only /tmp will prevent OpenOffice from saving anything). Then I used scp to copy 600M of ted.com videos that I hadn t backed up, I don t usually backup such things but I don t want to download them twice if I can avoid it (I only have a quota of 25G per month). After that I made new backups of all filesystems starting with /home. I then used tar to backup the root filesystem. The hard drive in the laptop only had a single bad sector, so I could have re-written it so that it would be remapped (as I have done before with that disk), but I think that on a 5yo disk it s probably best to replace it. I had been thinking of installing a larger disk anyway. On restore I restored the root filesystem from a month-old backup and then used diff -r to discover what had changed, it took me less than an hour to merge the changes from the corrupted root filesystem to the restored one. Now I have lots of free disk space and no data loss! I am now considering making an automated backup system for /home. My backup method is to make an LVM snapshot of the LV which is used and then copy that this gets the encrypted data so I can safely store it on USB devices while traveling. I could easily write a cron job that uses scp to transfer a backup to one of my servers at some strange time of the night. The next issue is how many other disks I will lose this summer. I have installed many small mail server and Internet gateway systems running RAID-1, it seems most likely that some of them will have dead disks with the expected record temperatures this summer.

Erich Schubert: If you are in Bavaria, sign up for the smoking ban vote!

Starting 01/01/2008, Bavaria had introduced a quite hard smoking ban, which also included bars and restaurants. It however contained a backdoor by excluding non-public locations, which led to the creation of 'smoker clubs' where you had to become a member to be admitted. At some point, most clubs were of this kind.In August 2009, however, the law was changed to exclude beer tents (Oktoberfest ...) and small bars. Many people belive that this was to get votes on the elections in september 2009 (which ended up in a minus of 6-7% compared to the previous election and a historical low for the biggest party).This caused several organizations to call for a public vote on restoring the smoking ban to the 2008 state (without the 'smokers club' backdoor). In order to force a public vote on a law (without the governments support!), we need 10% of the voters to register as supporters for the vote. You have to register at your registered home town. For Bavaria, this means about 940.000 supporters.If you are registered voter in Bavaria, please drop by your municipality and sign up. You need an ID and 5 Minutes, that's all. 940.000 supporters is an incredible lot of people to get to the offices, take along your friends!When we get enough supporters, the Bavarian government has two options: accepting the changes as proposed (and thus making the initative obsolete), or conducting a public vote on it, offering an alternative (e.g. the current law, no change) and have the voters decide (which is quite expensive, so if many many people sign up, they might save that money and just pass the proposed change themselves).For more information (german only), check the Nichtraucherschutz Bayern Website, including the sign up office locations.P.S. In other European countries, the introduction of a strong smoking ban has led to a 10-15% decrease in heart attacks (20% for non-smokers). The german constitutional court has also already ruled that the protection of non-smokers and employees from passive smoke weights stronger than the individual's freedom to smoke in enclosed spaces.

Chris Lamb: Transparent directory replacement with zsh

Under UNIX, it is possible to get into a position where your shell's working directory is pointing to an inode that no longer exists, but a "newer" directory with the same name exists. The easiest way of reproducing this scenario is as follows:
$ cd $(mktemp -d)
$ rm -rf $PWD
$ mkdir $PWD
However, as concrete example, imagine you are debugging something deep inside a generated code tree if you ran make clean and then make again from another shell, your debugging shell would be left pointing to an inode that does not exist (as it was removed by make clean), yet the make call would have made an identically named directory in its place. Shells behave rather unintuitively in this situation; ls will (correctly) return no results, but attempting to do anything useful results in curious error messages. I use the following zsh precmd hook to transparently fix this for me:
precmd ()  
  # "DOS emulation mode"
  if [ "$(stat -c %i . 2>/dev/null)" != \
                 "$(stat -c %i -- "$ PWD " 2>/dev/null)" ]
  then
    OLDOLDPWD="$ OLDPWD "
    if ! cd -- "$ PWD " >/dev/null 2>&1
    then
      echo "W: $ PWD  does not exist anymore"
      return 1
    fi
    OLDPWD="$ OLDOLDPWD "
  fi
 
The cost of the stat calls seem justified by the convenience and are in any case insignificant compared to the other things I am doing in my precmd. If you are using zmodload zsh/stat, then replace stat -c %i with stat +inode. (My previous experience with zsh tricks is that the functionality invariably exists already in some obscurely named builtin. Here's hoping.)

Biella Coleman: Phreaking your way into Egypt?

At times I am secretly (actually more openly) jealous of my colleagues in the English department who get to teach literature day in and day out. What a treat. So I always make sure to sneak at least one fictional story whether short such as Kurt Vonnegut s Unready to Wear in Welcome to the Monkey House, which is superb or something longer and way more verbose than Vonnegut who is the epitome of sparsity, such as Snow Crash by Neal Stephenson (Cryptonomicon is too long). I have just been informed by Phil Lapsley of one of the only fictional accounts on phone phreakers Loving Little Egypt and I might just make this the fictional account for my hacker class I am teaching next semester. I can never get enough of phreaking and since there is so little on the topic, this can top things off. Has anyone read it? Any thoughts? Any other fictional accounts on phreakers?

Biella Coleman: Phreaking your way into Egypt?

At times I am secretly (actually more openly) jealous of my colleagues in the English department who get to teach literature day in and day out. What a treat. So I always make sure to sneak at least one fictional story whether short such as Kurt Vonnegut s Unready to Wear in Welcome to the Monkey House, which is superb or something longer and way more verbose than Vonnegut who is the epitome of sparsity, such as Snow Crash by Neal Stephenson (Cryptonomicon is too long). I have just been informed by Phil Lapsley of one of the only fictional accounts on phone phreakers Loving Little Egypt and I might just make this the fictional account for my hacker class I am teaching next semester. I can never get enough of phreaking and since there is so little on the topic, this can top things off. Has anyone read it? Any thoughts? Any other fictional accounts on phreakers?

18 November 2009

Axel Beckert: Spam in SMTP not via SMTP

While examining the mail queue after a big mail server migration, I found the following reason for a bounce (hostnames replaced according to RFC2606):
550-5.1.1 - 
550-5.1.1 -
550-5.1.1 TO LEARN WHY YOUR EMAIL WAS REJECTED PLEASE GO HERE: 
550-5.1.1 - 
550-5.1.1 http://www.example.com/answers/dWtsb3R0b3NAdWtsb3R0ZXJ5LmNvLnVrPgA=AAA=/
550-5.1.1 - 
550-5.1.1 Cheap, Reliable Webhosting
550-5.1.1 http://www.example.com/a/hostgator/
550-5.1.1 -
550-5.1.1 Round-Trip Flights under $200 from Priceline!
550-5.1.1 http://www.example.com/a/pricelinertf/
550-5.1.1 -
550-5.1.1 Free Skype-to-Skype calls on your mobile
550-5.1.1 http://www.example.com/a/skype/
550-5.1.1 -
550 5.1.1 -
What s next? Advertisements in HTTP headers? Oh, I forgot, they already exist and are called referrer spam .

Martin F. Krafft: RAM reclaimed, mystery solved

Yesterday s RAM mystery was solved after dozens of people have written in with helpful comments. Thank you all. I need to find time to create a proper, commentable blog soon so that you all can get the credit you deserve! I now have the full 4GB of RAM available:
$ free   head -2
            total       used       free     shared    buffers     cached
Mem:       4063324    1657440    2405884          0     149080     643732

Yay! The suggestions ranged from timing issues to defective modules, from 64bit OS via south/north bridge limitations to sacrificing chickens to god spongebobs. In the end, several people put their finger on a concept called memory hole remapping , and that turned out to be the ticket. Here is what I learnt: This motherboard and the CPU memory controller supports (which means can address ) 4096MB of RAM. Since extensions cards, such as the graphics card and the network controller, also need addressable slabs of memory for their RAM or registers, ranges in the upper memory regions are mapped to the RAM of those cards. The file /proc/mtrr gives a clue over what s happening:
reg00: base=0x000000000 (    0MB), size= 2048MB, count=1: write-back
reg01: base=0x080000000 ( 2048MB), size= 1024MB, count=1: write-back
reg02: base=0x0c0000000 ( 3072MB), size=  256MB, count=2: write-combining
reg03: base=0x0d8000000 ( 3456MB), size=  128MB, count=1: write-combining
reg04: base=0x0e8000000 ( 3712MB), size=   64MB, count=1: write-combining
reg05: base=0x0ec000000 ( 3776MB), size=   64MB, count=1: write-combining

Registers 0 and 1 represent the addressable RAM available to the operating system. At position 3072, we find two slabs of 256MB each, most likely corresponding to the two graphics cards in the system. I think that the 128MB in register 3 is the AGP aperture. Registers 4 and 5 correspond to 64MB slabs each, most likely relating to the two network cards I have installed. The result is that addresses in memory beyond 3072MB are routed to the extension cards, which overshadow the original system RAM and leave it unusable. When I turned on the memory hole remapping feature in the BIOS, I empowered the BIOS to remap the memory space. The way it does this is BIOS-dependent, but most likely, it will remap the overshadowed memory region to the end of the total memory space. This is a software-only remapping, but the effect is that the system appears to have more memory. /proc/mtrr now reads:
reg00: base=0x000000000 (    0MB), size= 4096MB, count=1: write-back
reg01: base=0x100000000 ( 4096MB), size= 1024MB, count=1: write-back
reg02: base=0x0c0000000 ( 3072MB), size= 1024MB, count=1: uncachable
reg03: base=0x0c0000000 ( 3072MB), size=  256MB, count=1: write-combining

I am not entirely sure how to interpret this yet, but you can see that there are now an additional 1024MB at position 4096 (register 1), so the system seems to have 5GB of RAM available. Register 2 describes memory between 3072 and 4096 as not cacheable, because it maps to extension cards. I do not know how register 3 fits into the picture. By remapping, we cross the 4096MB mark. To make use of the additional memory, we will need PAE enabled to give you 36 bits, or a 64bit operating system: 2^32 is 4096M, so with only 32 bits available, 4GB is all the memory that can ever be addressed (dirty hacks excluded). Fortunately, this system has been running the Debian amd64 port even before it was officially released, and thus, once the BIOS remapped the memory, I could fully make use of it. Mystery solved, some knowledge acquired, many of you left to thank!

17 November 2009

Pablo Lorenzzoni: Looking for a new programming language to learn

I know it has been a long time since my last post. I am sorry about that, but life has it s complications every now and then (as you know)... Well, on to the article. Recently I had to reimplement in C a prefork server I wrote in Ruby for an internal project at Propus. Not that the Ruby version wasn t enough (after all, although being in Ruby, I was using Unix plumbing, much in the fashion Ryan tell us about in the now famous I like Unicorn because it s Unix article)... The problem is that, in one of our clients, the only version available for Ruby was 1.8.1. Yeah I know But we were not allowed to upgrade and, although it didn t seem at first, the same server presented a nasty memory leak in 1.8.1 that was not present in 1.8.7 and 1.9.1. I still don t know where the problem is I suspect some of the C-to-Ruby glues around TCP sockets might be blamed, but after a couple of days trying to figure it out, I decided it was easier just to reimplement it using C. It actually took less than a day to get the C version going nothing fancy and, apart from memory footprint, just the same functionality and about the same speed of the Ruby version. But it was enough to remind me I really don t like all the scaffolding one has to raise in order to make something useful in C. It s not just a matter of SLOC (of course, C version was more than 3 times longer than Ruby one)... I am talking about all the manual memory management, pointer operations and the disgusting experience of dealing with strings in C. I know some people are addicted to that sort of thing like heroin, but to me it just slows development. This experience made me think about learning a second compiled programming language. I do some Perl, a lot of Python and (of course) most of my work in Ruby, but those are all interpreted languages. For compiled languages I always resorted to C So I am officially looking for a language to learn. So far, the best candidates are OCaml (I got a little excited about JoCaml a few months ago, now I might get serious about it), Haskell, Lisp, Objective-C, Ada, and Vala. Of these, I ve been reading a lot about OCaml It seems a fine and expressive language, with decent foundations, object-oriented extension, broad standard library and (with JoCaml) concurrency Also it might give me the proper excuse to finally wrap my mind around a functional language! People keep me pointing to Java and Erlang Well for using Java I would much prefer using JRuby. Erlang, ITOH, has a weird syntax (at least to me) and it seems much of what makes it great will, eventually, be part of Ruby (or already is using libraries) either that or I ll just wait for Reia to be ready. Besides, neither can be compiled to native code (ok, that argument can be stretched both ways, so just ignore it). So, what do you think? Any advice?

16 November 2009

David Welton: Emacs fiddling: show the menu-bar when the mouse is near the top of the frame

My wife is having dinner with the baby at her parents', so I took a moment to do a bit of pure, pointless, fun hacking after reading a discussion of which emacs gui features to turn off on a site I frequent. I turn off the tool bar and the scroll bar to get as much screen real estate as possible, but leave the menu bar on, because it doesn't take up that much space, and I occasionally use it to grab some little used feature whose full function name I don't recall. My idea: make the menu bar appear only if the mouse is in that general vicinity. This initial implementation is hacky and doesn't work quite right; but it shouldn't take much to make it work. It's probably actually already been done somewhere, but it was fun to hack up something for the sake of hacking... something I don't get enough time for these days.
    (defun menu-bar-show-hide-helper ()
      (if (< (cddr (mouse-pixel-position)) 20)
      (menu-bar-mode 1)
    (menu-bar-mode 0)))
    (defun menu-bar-show-hide ()
      (run-with-idle-timer 0.1 t 'menu-bar-show-hide-helper))
I'll add fixes and updates as they are sent in.

Asheesh Laroia: Choosing something to work in Free Software is hard

Debian is primiarly organized into mostly one-person "projects," namely packaging a piece of software. But in the past few days on Planet Debian, there has been discussion about how existing packages in Debian need more help. Tim Retout wrote:
There's a huge role for non-DDs to play in getting fixes into Debian, but as far as I remember, the emphasis of the mentors documentation is on packaging rather than bug fixing.
I think this is a serious problem across Free Software. Open source contributors are grouped into projects. If you're burning out on what you're working on lately, or you are looking to become a new contributor, it's hard to know what projects need your help. As someone who knows Python and Debian packaging, it would be nice to be able to search Debian for Python-language packages that need help. I also think that Tim hit on a really important social point later in his post:
It seems to me that the mentor relationship works better when DDs get to know particular people
Tim's right that personal relationships make a big difference. I got serious about my NM application when I asked someone I already knew to sponsor my packages. But not everyone can be so lucky as to have a Debian Developer as a friend. And many projects aren't as friendly as Debian; there's no official mentorship available. I think that we need to start paying a lot more attention to personal relationships all across Free Software. (I'm working on a web tool in this space. Join me in #openhatch on irc.freenode.net to discuss it, or just stay tuned until I write it up tomorrow.)

Andrew Pollock: [life] Blogging on a plane!

Well, here I am, sitting in a chair at 10,000 feet (or whatever the altitude currently is), using WiFi. Writing a blog post. And we still don't have flying cars. I'm on my way to Dallas for the Ubuntu Developer Summit for the 10.04 (Lucid Lynx) release. Being an LTS release, this is of particular interest for what I do at work. Sarah's still in Australia (well she's actually on a flight to LAX as I write), so I took the VTA light rail + shuttle to the airport. I must say, aside from not being particularly speedy, it was a pleasant experience. I've finally cracked open The Audacity of Hope, which I received for Christmas or my birthday last year. I'm really loving the renovated San Jose airport. Now that all of the check-in counters have moved downstairs, they've about quadrupled the space the TSA has, which makes getting through security a much more pleasant experience. Add to that, the nice lady in the Admiral's Club kindly reseating me in an exit row, all by myself, and this is a pretty sweet trip so far. http://www.youtube.com/watch?v=8r1CZTLk-Gk

13 November 2009

Eddy Petri&#537;or: This Sunday, already 5 years...

This Sunday, we celebrate already 5 years since the initiation of the successful Save Carol Park civic action. Back then, the park and the mausoleum were in danger of being destroyed to make room for a cathedral, in spite of special status of the park, the already too low green spaces per capita ratio, in spite of the legal status and in spite of public opposition.

Nice to see it will be celebrated Sunday, 15th at 13:00 at Arenele Romane, and regular people being invited there (linked page in Romanian):

http://remuscernea.ro/2009/11/sarbatorim-5-ani-de-la-salvarea-parcului-carol/

I'll certainly be there!

<iframe frameborder="0" height="350" marginheight="0" marginwidth="0" scrolling="no" src="http://www.openstreetmap.org/export/embed.html?bbox=26.091198,44.41135,26.09513,44.414235&amp;layer=mapnik" style="border: 1px solid black" width="400"></iframe>
View Larger Map

Matthew Garrett: Legacy PC design misery

I've spent chunks of the last couple of days fighting a problem that's existed for about 25 years. The 8086 was a 16-bit processor with a 20-bit address space, limiting the maximum physical address that could be accessed to 1MB. However, quirks of the segmented memory system meant that addresses greater than 1MB could be constructed - these would wrap around to the bottom of memory. Because loading the segment registers was a time consuming operation, some programmers used this behaviour as a performance optimisation.

The 80286 introduced 24 bit address space. Unfortunately, this meant that the addresses that previously wrapped to the bottom of memory now pointed at real addresses - not ideal if you were expecting the old behaviour. IBM fixed this by tying the 21st address line (A20 - they're zero indexed) through an and gate, with the default behaviour being to keep it tied at 0 and thus maintaining the old wraparound behaviour. Applications that wanted to access the full address space needed to enable the A20 logic gate. IBM didn't want to add any extra hardware to their system if they could avoid it, so tied the other side of the and gate to a spare pin on the keyboard controller. By writing a couple of bytes to the keyboard controller, your PC-AT stopped pretending to be an XT and gave you access to all of the insanely expensive RAM it had stuffed in it. Hurray!

PCs have been emulating this behaviour since the AT was first cloned. Of course, this being the PC industry, many have got it wrong. There's a set of approaches for controlling the A20 gate that may work, varying in terms of performance and desirability. Most hardware will give the desired result (ie, I have no desire to run DOS executables from 1982, make my A20 work damnit) using any of the various methods of A20 enabling. Some hardware doesn't. The most common method used in bootloaders (where we still have access to system BIOS services) is to call int 15h with an ax of 0x2401, which asks the BIOS to enable A20 for us. This isn't implemented on all hardware, but we should get a failure back that lets us go and bang on the keyboard controller in an attempt to get it to pay attention[1].

Enter the Kohjinsha SC3.

I picked this up second hand in Japan. It's a ridiculously cute little tablet, only slightly larger than hardware that's comfortably in the MID range. It booted a Fedora liveCD perfectly, though having GMA500 graphics meant that what appeared wasn't terribly attractive. Installation proceeded happily enough, followed by a reboot and... nothing. Grub loaded the kernel and initrd, jumped to the kernel and everything hung.

So, for the past couple of days, I was stepping through the kernel setup code, trying to work out where and why it was hanging. I'd got it narrowed down to the region where the kernel tried to free the memory used by the initramfs, but the failure hopped around depending on my kernel build. Something was clearly very wrong. The strangest thing about this was that if I booted the liveCD boot menu and selected "Boot from local drive", everything worked perfectly. isolinux was clearly doing something that grub wasn't, but there's rather a lot of code to step through there.

Things became a lot easier once I found that the OpenSuse version of grub worked. Their grub has a rather smaller set of patches than ours, and only a few looked even plausibly relevant. It only took ten minutes or so to figure out that it was one that altered the A20 code. Things became much clearer then.

The main functional difference between the Suse A20 implementation and the upstream one[2] is that the Suse one explicitly tests whether the A20 enabling worked by putting values at two different addresses that would be the same if A20 is disabled. By comparing them, we know whether A20 is working properly or not. If not it can then fall back to other mechanisms. The Fedora code trusted the BIOS's claim that the int 15 call had worked. The Kohjinsha's BIOS lied, A20 remained disabled, grub copied the kernel and initramfs to chunks of address space that contained lies rather than RAM and everything fell over horribly.

Thankfully, not a difficult fix once the problem was identified. But seriously, people. How hard can it be not to screw this up?

(For an excrutiatingly detailed analysis of how hard it can be not to screw this up, see here)

[1] the Intel Macs don't implement the int 15 approach, but return a failure. They also don't have a legacy keyboard controller, so attempting to hit that resulted in grub falling over. The magic IO port approach works. Another example of how the Intel Macs aren't really PCs...

[2] grub2 implements the more paranoid check

Martin F. Krafft: Successful BIOS flash with flashrom

An older machine of mine previously ran off 7 harddisks, which were added over the years. Initially, there were two 80Gb drives, then one failed and I replaced it with a 160Gb drive, leaving 80Gb of unused space. At some point I had two 120Gb drives, which I also added, and then another 160Gb and a 250Gb drive, and finally I replaced the first 160Gb with a 320Gb one. Between the different RAID1 and RAID5 arrays across these disks, as well as the LVM configuration atop, I had completely lost overview of the assembly. It didn t help that the drives were all IDE (PATA), so you can imagine the cable mess! When two drives started reporting S.M.A.R.T. errors, I took the opportunity to replace the mess with the four 250Gb SATA drives I had lying around at home. The problem was that two of the four SATA ports apparently didn t work. Hence I went to try a BIOS upgrade for the plain Asus K8V motherboard (Via VT8237 chipset). I don t remember what floppies look like, and I hate all these DOS-based flasher programs anyway, so this time around I gave flashrom a try (using the outdated version in Debian lenny). I managed to read out the existing ROM image, but even after verifying that it looked very similar to the new one, I was still scared of turning my computer into a brick. While waiting for people on the #flashrom/irc.freenode.org channel to reassure me, I managed to wipe the saved image and essentially had no other way but to move forward. I used flashrom to verify that the image was written and rebooted and the system came back up, this time with support for all four SATA drives. Thank you, flashrom people!

Next.

Previous.