Search Results: "ema"

20 November 2009

Biella Coleman: Moral Grey Zones: Roller-Hitching

Moral Grey Zone Many moons ago while doing fieldwork I went to a radical tech activist camp sponsored by The Ruckus Society to give a presentation on Free Software (which I actually still have online in the gaudy orange I so loved. I could only stay 2 days as I had to go to Debconf2 in Toronto for fieldwork but it forever changed my life in pretty significant ways. One remarkable thing about Ruckus was that for the first time I meet a particular kind of geek I had yet to come across: the crunchy and chewy granola/environmentalist/hippie hacker a type of hacker that can be found world over but is likely to be (unsurprisingly) living, sometimes in the trees (literally) in the Pacific Northwest. They are one of my favorite kind of people as I can talk endlessly to them about 2 of my great passions: Free Software and environmental justice. Comfrey, pictured above, was one such hacker from Portland who I met at the Ruckus event and now routinely shows up, usually unannounced to our house at least 1-2x a year. I woke up this morning to find him on our couch, got a bunch of knot-weed to chew on compliments of his foraging, and took the afternoon off to share some food. Among many stories, he told me of a new transportational pursuit of his, Roller-Hitching, which he uses to get around the country. He uses old school roller skates to skate along the road, even highways, until he gets picked up and get where he needs to go. Naturally, these old school states are not just functional in the sense that they are faster than two feet in motion, but since they signify a particular spirit of the 1970s you know, the groovy, dynamite, free love spirit of things, they draw positive attention and apparently when he roller-hitches, he gets picked up frequently (and made it from Minneapolis to Portland in 2 hours and 2 days: not shabby). 70s In California while on the 101 north of Arcata, California, Comfrey got stopped by the highway patrol and basically the cop wanted to kick him off on the grounds the he was a pedestrian (apparently prohibited on this patch of the 101). Comfrey, being a bright fellow, basically noted that roller skating is not really a pedestrian activity, that he was using, much a like a biker, a transportation device of sorts, so that he was in a grey zone between bikes and walking. At the time, the cop was convinced enough but did tell Comfrey to look up the law in the library cuz the next time he would give him a ticket and the next time after that throw him in jail. Comfrey has yet sourced the law but soon will. When he does, since I like to report on geeks and the law, I too will report on whether one can roller skate down or up the highway for those that might want to give Roller-Hitching a try.

Biella Coleman: Moral Grey Zones: Roller-Hitching

Moral Grey Zone Many moons ago while doing fieldwork I went to a radical tech activist camp sponsored by The Ruckus Society to give a presentation on Free Software (which I actually still have online in the gaudy orange I so loved. I could only stay 2 days as I had to go to Debconf2 in Toronto for fieldwork but it forever changed my life in pretty significant ways. One remarkable thing about Ruckus was that for the first time I meet a particular kind of geek I had yet to come across: the crunchy and chewy granola/environmentalist/hippie hacker a type of hacker that can be found world over but is likely to be (unsurprisingly) living, sometimes in the trees (literally) in the Pacific Northwest. They are one of my favorite kind of people as I can talk endlessly to them about 2 of my great passions: Free Software and environmental justice. Comfrey, pictured above, was one such hacker from Portland who I met at the Ruckus event and now routinely shows up, usually unannounced to our house at least 1-2x a year. I woke up this morning to find him on our couch, got a bunch of knot-weed to chew on compliments of his foraging, and took the afternoon off to share some food. Among many stories, he told me of a new transportational pursuit of his, Roller-Hitching, which he uses to get around the country. He uses old school roller skates to skate along the road, even highways, until he gets picked up and get where he needs to go. Naturally, these old school states are not just functional in the sense that they are faster than two feet in motion, but since they signify a particular spirit of the 1970s you know, the groovy, dynamite, free love spirit of things, they draw positive attention and apparently when he roller-hitches, he gets picked up frequently (and made it from Minneapolis to Portland in 2 hours and 2 days: not shabby). 70s In California while on the 101 north of Arcata, California, Comfrey got stopped by the highway patrol and basically the cop wanted to kick him off on the grounds the he was a pedestrian (apparently prohibited on this patch of the 101). Comfrey, being a bright fellow, basically noted that roller skating is not really a pedestrian activity, that he was using, much a like a biker, a transportation device of sorts, so that he was in a grey zone between bikes and walking. At the time, the cop was convinced enough but did tell Comfrey to look up the law in the library cuz the next time he would give him a ticket and the next time after that throw him in jail. Comfrey has yet sourced the law but soon will. When he does, since I like to report on geeks and the law, I too will report on whether one can roller skate down or up the highway for those that might want to give Roller-Hitching a try.

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

Ian Wienand: Go L4!

By now everybody has now heard about Go, Google's expressive, concurrent, garbage collecting language. One big, glaring thing stuck out at me when I was reading the documentation:
Do not communicate by sharing memory; instead, share memory by communicating.
One of the examples given is a semaphore using a channel, which I'll copy here for posterity.
var sem = make(chan int, MaxOutstanding)
func handle(r *Request)  
    sem <- 1;    // Wait for active queue to drain.
    process(r);  // May take a long time.
    <-sem;       // Done; enable next request to run.
 
func Serve(queue chan *Request)  
    for  
        req := <-queue;
        go handle(req);  // Don't wait for handle to finish.
     
 
Here is a little illustration of that in operation. Semaphores with Google Go Serve creates goroutines via the go keyword; each of which tries to get a slot in the channel. In the example there are only 3 slots, so it acts like a semaphore of count 3. When done, each thread returns its slot to the channel, which allows anyone blocked to be woken and continued. This instantly reminded me of the very first thing you need to do if you ever want to pass Advanced Operating Systems -- write a semaphore server to provide synchronisation within your OS. In L4, threads communicate with each other via inter-process communication (IPC). IPC messages have a fixed format - you specify a target thread, bundle some data into the available slots in the IPC format and fire it off. By default you block waiting for a reply -- this all happens within a single call for efficiency. On the other side, you can write servers who are listening for remote IPC connections, where everything happens in reverse. Here's another illustration the of the trivial semaphore server concept Shehjar and I implemented. L4 semaphore server example Look familiar? Instead of a blocking push of a number into a slot into a channel, you make a blocking IPC call to a remote server. My point here is that both take the approach of sharing memory via communication. When using IPC, you bundle up all your information into the available slots in the IPC message and send it. When using a channel, you bundle your information into an entry in the channel and call your goroutine. Receiving the IPC is the same as draining a channel - both result in you getting the information that was bundled into it by the caller.
IPCGo
Start threadStart goroutine
New thread blocks listening for IPC messageGoroutine blocks draining empty channel
Bundle information into IPC messageBundle data into type of your channel
Send IPC to new threadPush data into channel
Remote thread unbundles IPCgoroutine drains channel and gets data
Whenever you mention the word "microkernel", people go off the deep-end and one thing they seem to forget about is the inherent advantages of sharing state only via communication. As soon as you do that, you've broken open an amazing new tool for concurrency, which is now implicitly implied. By communicating via messages/channels rather than shared global state, it doesn't matter where you run! One of those threads in the example could be running on another computer in your cloud, marshalling up it's IPC messages/channel entries and sending them over TCP/IP -- nobody would care! At any rate, do not communicate by sharing memory; instead, share memory by communicating is certainly an idea whose time has come.

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.

Bdale Garbee: TeleMetrum Progress

Keith and I have been pretty quiet about TeleMetrum for a while... but that doesn't mean we've been idle! In recent weeks, I've built up several more flight units and two more ground station boards, as noted in my production log. We're both trusting rockets solely to our boards and Keith's firmware at this point. In fact, we've accumulated a significant number of succesful flights, including a cool drag-race between 4" airframes at NCR Oktoberfest where we both put brand-new, nearly identical rockets fully at risk flying only TeleMetrum boards, and a flight by Keith the same weekend on a full-K Loki K350W moon-burner in which he set a new personal altitude record! I've also flown a board with 100-g accelerometer installed successfully in a flight that peaked at 52.8 g! We're now hard at work on a "next version" of the hardware, incorporating everything we've learned so far. There are a number of significant changes planned: To make all this fit, I'm stretching the board an extra 1/4 inch to a total outline of 1 by 2.75 inches. We're also moving all the connectors, the GPS patch antenna, and the beeper to the "back side" of the PC board. This is a win on several levels... it will allow us to have silk-screen labels for the connectors, will help protect the baro sensor from sunlight and the various surface mount parts from physical damage during rocket prep, and opens up more board surface area for component placement and routing on the "top side" of the board. In practice, this means that boards will be mounted on standoffs with all the active components facing "down" and the connectors facing "up." Before we'll be ready to build some of these, we need to get in some more flights to test the various changes we're making. In particular, the change in ejection charge circuit, and the GPS receiver chip and antenna choices we're now favoring. Unfortunately, Keith and I are now both into the time of year where launch opportunities come less frequently, even before we consider the weather. Meanwhile, Keith's firmware and ground station software are now doing nearly everything we've envisioned wanting from this project. It seems entirely likely that he'll be ready to declare "version 1.0" soon after we obtain and verify the functionality of our next version of the hardware... In the meantime, our friends at Woot have posted a really funny video combining material from a couple launches this summer of my 10-inch Goblin, on one of which we flew some of their screaming flying monkey dolls... Enjoy!

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!

MJ Ray: A browser tip I should have known before

I knew that / (slash) activated the Quick Find in Firefox and its close relations, but I didn t know that ' (apostrophe) activated a Quick Find (in links). That s quite helpful when jumping through web admin interfaces where I know which links I want, I m using the two-handed keyboard (not the one-hander) and prefer not to jump between keyboard and mouse. I don t see that on the menus anywhere, so how was I meant to find it without digging through the manuals? What other speed-up shortcuts are lurking in common applications? Is there something like Emacs s where-is function (c-h w) for Firefox that will tell you where to find something?

17 November 2009

Biella Coleman: The Winners

These are the winners from my yearly class contest : SERIOUS BABY lol ..sometimes Did I just Get Rejected From McDonalds? (Watch to the end) This is one of my all time favorites funny videos and it has a nice catchy tune and I will also post one of my ALL TIME favorites after I show it in class next week.

Biella Coleman: The Winners

These are the winners from my yearly class contest : SERIOUS BABY lol ..sometimes Did I just Get Rejected From McDonalds? (Watch to the end) This is one of my all time favorites funny videos and it has a nice catchy tune and I will also post one of my ALL TIME favorites after I show it in class next week.

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.

15 November 2009

Jonathan McDowell: Playing with an e-reader

I've always preferred dead tree to reading things on screen; I just find it easier. I've tried reading fiction in the past off a laptop and just didn't find it as enjoyable an experience; whether it was the form factor (hard to curl up with a laptop, even a netbook), the quality of the screen or the interface I don't know. Equally with technical documentation if it's something I'm using a lot I prefer a printed copy to flick through. However e-ink based e-readers are becoming much more common and affordable and I figured I should give the whole ebook experience another try.

I spent 3 weeks in October in the Bay Area on work, so I borrowed my Dad's Sony PR505 for the trip. First problem is that it's picky about USB charging - works fine if attached to a computer, but using a Blackberry charger looks like it's fine but then results in what looks like a hanging reader. However once charged it lasts for ages - I charged it before I went and only hooked it up to my laptop once during the trip to transfer some new content onto it. The form factor is also quite good; a bit heavier than a book, but not excessively so. Holdable in one hand, big enough screen that I wasn't squinting at it. Slightly too big physically to easily go in a coat pocket the way a paperback would unfortunately, but perfectly fine for taking to read at breakfast every morning in the hotel.

The screen was also much better than I'd expected. I knew the technology was different and supposed to be easier to read than traditional LCDs, but I was sceptical. Overall I had no problems with it. I was even quite impressed with the Sony's zoom function - one of the PDFs I was reading was too small when view full screen, so I zoomed in so it was readable. The nice feature was that then the "next page" button gave me the next bit of text to read, rather than the actual next page, so it remained very easy to navigate through as I read. A small touch, but very welcome.

This isn't intended to be a review of the Sony reader; that just happened to be the model I was easily able to borrow. I happened to see a Kindle in use on the plane and I was struck by how much bulkier it seemed, though having looked at the relative specs it seems this is entirely due to the keyboard rather than any difference in screen size. The Nook was also announced during my trip and I'd quite like a play with that as it looks quite nice.

Despite my positive experience with the Sony I'm not planning to go out and get one just yet. And that's the lack of sensibly priced content. When I bought my first mp3 player I could take my exising CD collection, rip it and be able to play it on my new device. This meant I got an immediate benefit of having my entire music collection with me all the time, just by buying the player. If I buy an e-reader then in order to get all my existing books on it I have to go and buy them again. What's worse is they'll cost me the same or more than I paid for the paperbacks. I can't go and exchange my Pratchett collection for the electronic versions for a nominal fee. I can't easily scan them in myself and produce some decent ebooks. I can't even go and buy the entire set for 20; I'd have to spend something like ten times that. With mp3s I can continue to buy the real item and also have it on my portable player. Or, while albums still don't seem to be much cheaper electronically than on CD, there is at least the ability to buy a single track if that's all I want. Books don't have a comparison. I'm not going to want to buy a single chapter, am I?

There are some sites out there that can provide cheaper ebooks - Rachel Willmer runs ebookprice.info which lets you compare pricing from different vendors. There's also Project Gutenberg if you're looking for out of copyright books. Finally Peter Corlett pointed me at the Baen Free Library, which I haven't downloaded anything from but will definitely investigate at some point. I still maintain that none of these are enough and that content provision will continue to be a hinderance for e-reader mass adoption until there is some fundemental change in the way its provision is handled.

13 November 2009

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

Russell Coker: What to do When You Break a Server

Everyone who does any significant amount of sysadmin work will break a server. Most people who have any significant experience will have broken several. Anyone who has never broken one should be treated with suspicion by other members of the sysadmin team, they probably haven t learned the caution that most of us learn from stuffing something up badly. When you break a server there are some things that you can do to greatly mitigate the scale of the disaster. Firstly carefully watch what happens, for example don t type rm -rf * and then walk away, watch the command if it takes unusually long then press ^C and double-check that you are removing the right files. Fixing a half broken server is often easier than fixing one that has been broken properly and completely! If you don t know what to do then do nothing! Doing the wrong thing can make things worse. Seek advice from the most experienced sysadmin who is available. If backups are inadequate then leave the server in a broken state while seeking advice, particularly if you were working at the end of the day and it doesn t need to be up for a while. There is often time to seek advice by email before doing something. Do not reboot the system! Even if your backups are perfect there is probably some important data that has been recently modified and can be salvaged. Certain types of corruption (such as filesystem metadata corruption) will leave good data in memory where it can be recovered. Do not logout! If you do then you may not be able to login again and this may destroy your chances of fixing the system or recovering data. Do not terminate any programs that you have running. There have been more than a few instances where the first step towards recovering from disaster involved using an open editor session (such as vi or emacs). If the damage prevents an editor from being used (EG by removing the editor s program or a shared object it relies on) then having one running is very important. These procedures are particularly important if you are unable to visit the server. For example when using a hosted server at an ISP the more cost effective plans give you no option to ever gain physical access. So plugging the disks into another machine for recovery is not an option. Does anyone have any other suggestions as to what to do in such a catastrophy? PS This post is related to the fact that I had to recover the last couple of weeks of blog comments and posts from Google s cache Update: I got my data back, not I have to copy one day of blog stuff from one database to another.

12 November 2009

Russell Coker: Links November 2009

Credit Writedowns has a populist interpretation of the latest Boom-Bust cycle [1]. It s an interesting analysis of the way the US economy is working. Bono writes for the NY Times about Rebranding America [2]. He praises Barack Obama suggesting a different reason to believe that the peace prize is deserved and describes what he believes to be the world s hope for the US. IsMyBlogWorking.com is a useful site that analyses your blog [3]. It gives some advice on how to improve some things as well as links to feed validation sites. Evgeny Morozov gave an interesting TED talk How the Net Aids Dictatorships [4]. I don t agree with his conclusion, he has some evidence to support his claims but I think that a large part of that is due to people not using the Internet well. I expect things to improve. The one claim that was particularly weak was when he mentioned radio stations in Rwanda as an example of technology being used for bad purposes the entire point about the first-world discussion about such things is the radio vs the Internet. Ray Anderson gave an inspiring talk about The Business Logic of Sustainability [5]. He transformed his carpet company, decreasing it s environmental impact by 82% and it s impact per volume of product by more than 90% while also significantly increasing it s profitability. He says that corporate managers who don t protect the environment should be regarded as criminals. Making his company more environmentally friendly reduced expenses (through efficiency), attracted more skillful employees, and attracted environmentally aware customers. Managers who don t follow Ray s example are not only doing the wrong thing for the environment, they are doing the wrong thing for their stockholders! Ray s company Flor takes carpet orders over the web [6]. They won t ship a catalogue outside the US, so presumably they only sell carpet to the US too. Marc Koska gave an interesting TED talk about a new syringe design that prevents re-use [7]. His main aim is to prevent the spread of AIDS in the developing world where even hospital staff knowingly reuse syringes. It will also do some good in developed countries that try to prohibit drug use. David Logan gave an interesting TED talk about tribal leadership [8]. His use of the word tribe seems rather different from most other uses, and I am a bit dubious about some of his points. But it is definitely a talk worth seeing and considering. Deirdre Walker is a recently retired Assistant Chief of Police who has worked for 24 years as a police officer, she describes in detail her analysis of the flaws in the TSA security checks at US airports [9]. Brian Krebs wrote an article for the Washington Post recommending that Linux Live CDs be used for Internet banking [10]. Windows trojans have been used to take over bank accounts that were accessed by security tokens, that could only be accessed by certain IP addresses, and that required two people to login. It seems that nothing less than a Linux system that is solely used for banking is adequate when a lot of money is at stake. The NY Times has an interesting review of the book Ayn Rand and the World She Made [11]. It seems that Ayn was even madder than I thought. Gary Murphy has written an interesting analysis of the latest stage in the collapse of the US Republican party [12]. The ABC (AU) Law Report has an interesting article about Evony s (of China and the US) attempting to sue Bruce Everiss (of the UK) in Australia [13]. The Guardian has an insightful article about the IEA making bogus claims about the remaining oil reserves [14]. It seems that the experts who work for the IEA estimate that oil is running out rapidly while the US is forcing them to claim otherwise. Dean Baker of the Center for Economic and Policy Research has written an interesting article about the economic effects of the war in Iraq [15]. Apparently it caused the loss of over 2,000,000 jobs considerably more than the job losses that could ever result from efforts to combat global warming.

Leo 'costela' Antunes: Learning a bit more about ACPI

Ever since my misadventures into ACPI-land with my old laptop I ve been quite curious to better understand how it s all implemented under Linux. I skimmed the ACPI spec and that may have given me some insight on how to hack together a temporary fix to the problem I had then, but it doesn t really count as real understanding. Since I don t currently have the necessary time, I wrote it off as just another one of my many dead-end interests, but I nevertheless remained subscribed to the linux-acpi mailing list and the curiosity was still there, so it was a nice surprise to read a couple of posts by Mathew Garret on the subject, elucidating some bits of technicality, and I just decided to show some appreciation by posting about it! (I figure there s not enough appreciation out there, generally speaking ) Who knows, maybe someday I ll get my act together and be able to contribute some code?

Holger Levsen: Customized Blends

Almost exactly a year ago, the term "Custom Debian Distribution" was changed to [1 "Debian Pure Blends"] to better reflect what it is about: a variation of Debian within Debian. So far, so good. Then there are also "Debian Blends", which are not pure, meaning they have some parts which are not yet in Debian.

But the intention is clear, a Debian Blend aims to be fully part of Debian.

This week it occured to me that there is something else, something which is widely done and which is something else, so it should have it's own term: "Customized Blends", where some parts of the "distribution" is taken from a Debian Blend, while there are others, which are customisations, which are not likely or even desired/possible to end up in Debian.

As I see it, LiMUX is such a distribution, or what is installed in the schools in Extremadura or Rheinland-Pfalz atm. Mostly the software they use is Debian (either from stable or backported version), while some parts are not, like bookmarks, wallpapers, custom (sometimes propietary) software or firmware for specific hardware.

My motivation in pointing this is out, is to create an awareness that those "Customized Blends" are an important and frequent part of the Debian Blends ecosystem _and_ that it's for their own benefit to contribute back. Minimising the diff to a "real" pure Blend is good :-)

Next.

Previous.