Skip to main content

kexec rocks!

I've almost forgotten about kexec, but it really comes in handy as this beast takes an awful lot of time to boot. Not so with kexec:

$ uname -a
Linux v40z1 2.6.33-rc1 #1 SMP Sat Dec 19 02:25:22 PST 2009 x86_64 GNU/Linux
$ kexec -l /boot/2.6/bzImage.old --append="root=/dev/sda2"
$ date
Sat Dec 19 02:35:30 PST 2009
$ kexec -e
I'm in purgatory

Ubuntu 9.10 v40z1 ttyS0
v40z1 login: root
Password: 

$ date
Sat Dec 19 02:35:47 PST 2009
$ uname -a
Linux v40z1 2.6.32 #1 SMP Mon Dec 14 05:26:12 PST 2009 x86_64 GNU/Linux

I'm super cereal!

While the title of this entry is just a play on words, this is really about serial consoles:

  • Since Ubuntu 9.10 has moved to upstart, there's no /etc/inittab any more:
    $ grep -v ^\# /etc/init/ttyS0.conf
    start on stopped rc RUNLEVEL=[2345]
    stop on runlevel [!2345]
    respawn
    exec /sbin/getty -L 115200 ttyS0 vt102
    
    $ sudo start ttyS0
    
  • For Solaris10, we'd do:
    $ pfexec eeprom console=ttya ttya-mode="115200,8,n,1,-"
    $ egrep '^console:' /etc/ttydefs
    console:115200 hupcl opost onlcr:115200::console
    
    $ pfexec svcadm restart console-login
    
  • Be sure to set your terminal to the right baudrate. For a v40z, login to the service processor and do:
    > platform set console --noprune --speed 115200
    > platform get console
    Rear Panel Console Redirection Speed  Pruning Log Trigger
    SP Console Enabled             115200 No      244 KB
    

    Comcast sucks.

    Yes, I knew this day would come that I too have my own rant about this ISP. For the record, I wasn't really able to choose a different ISP, as I they don't serve ADSL in this area and Comcast seems to be the only cable provider around. There's Roadrunner Internet and they have the cooler logo but they just offered a Comcast resale package, which is not really what I was looking for. And for another record I have to say that Comcast is pretty stable, I only have to reset the modem every other month or so - which is totally acceptable for a low-cost homeuser contract, IMHO.

    That being said, I'm not too happy with Comcast's approach to net neutrality or just content mangling in general. IOW: Keep your hands off my traffic! Two major annoyances so far and the reason for this blogentry:

  • The so-called Domain Helper Service one has to opt-out to get useful DNS error messages

  • Apparently Comcast is blocking port 25. Of course, no one would ever send email from a MUA these days, with all the webmailers out there, right? One has to use port 587 to do SMTP via MSA. They even have a support page for this one (which can only be accessed when you turn off (!) JavaScript in your non-InternetExplorer browser). Maybe I should open a ticket with them and see if they can unblock ports on a per-customer basis. Hah!

  • I found the FAQ entry on which ports they're blocking, saying:

  • Ports 68, 135-139, 445, 520, 1080 are blocked by default.

  • Port 25 is not blocked by default but on-demand: "When spam from a compromised computer is detected, Comcast’s anti-spam systems automatically apply a sending block and send an email notification to the affected subscriber’s comcast.net email address." I don't remember any notification mail though....
  • gdb & system.privilege.taskport.debug

    When using gdb in Snow Leopard, they system asked me to

    Type the name and password of a user in the 'Developer Tools'
    group to allow Developer Tools Access to make changes
    
    Huh? I don't want to "make changes", I just want to debug a process. Turns out that monitoring/inspecting a process has been changed in Tiger and again in Leopard so that only members of the 'Developer Tools' group are allowed to debug. (Wow, I have never used gdb on Darwin before?). The right thing to do here is:
    sudo dscl . append /Groups/_developer GroupMembership username
    
    ...and get on with our actual debugging.

    Scribus: You cannot use EPS images or Print Preview

    When I wanted to play around with Scribus, the following error message greeted me on the first start:

    The following programs are missing:
    Ghostscript: You cannot use EPS images or Print Preview 
    
    Luckily this entry explained how to fix this, but instead of installing the whole foomatic package, I just used the MacPorts equivalent:
    $ port install espgs -x11
    
    Now /opt/local/bin/gs should be in place and Scribus should even find it by itself.

    wget: Connection closed at byte 3283. Retrying.

    This occured to me earlier this year, when trying to download from a redhat.com server:

    $ wget --version | head -1
    GNU Wget 1.12 built on darwin10.2.0.
    $ wget http://www.redhat.com/archives/ext3-users/2009-August.txt.gz
    --2009-11-16 00:03:34--  http://www.redhat.com/archives/ext3-users/2009-August.txt.gz
    Resolving www.redhat.com (www.redhat.com)... 96.7.144.112
    Connecting to www.redhat.com (www.redhat.com)|96.7.144.112|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 3284 (3.2K) [application/x-gzip]
    Saving to: “2009-August.txt.gz”
    2009-11-16 00:03:34 (60.2 MB/s) - Connection closed at byte 3283. Retrying.
    
    And yes, it would retry to download and will eventually grab the whole file - but the result was always corrupt. Luckily, this happened to others as well and now the download from these redhat.com archives succeed when --header "Accept-Encoding: gzip" is added to wget :-)

    ext2 vs. ext3 vs. ext4

    I always wondered if those ext* mountoptions did anything performance wise. Turns out they do, kind of:

    FS   mount option    avg over 3 runs
    ------------------------------------
    ext2 option: orlov        - 56.3333 sec
    ext2 option: oldalloc     - 66.3333 sec
    ext2 option: atime        - 62.6667 sec
    ext2 option: noatime      - 57.3333 sec
    ext2 option: data=journal   ---
    ext2 option: data=ordered   ---
    ext2 option: data=writeback ---
    ext2 option: acl          - 59 sec
    ext2 option: noacl        - 57.6667 sec
    ext2 option: user_xattr   - 59 sec
    ext2 option: nouser_xattr - 59 sec
    
    ext3 option: orlov        - 61.3333 sec
    ext3 option: oldalloc     - 62.3333 sec
    ext3 option: atime        - 62.3333 sec
    ext3 option: noatime      - 60.6667 sec
    ext3 option: data=journal   - 114 sec
    ext3 option: data=ordered   - 62.6667 sec
    ext3 option: data=writeback - 61.6667 sec
    ext3 option: acl          - 62.6667 sec
    ext3 option: noacl        - 61.6667 sec
    ext3 option: user_xattr   - 64.3333 sec
    ext3 option: nouser_xattr - 60.6667 sec
    
    ext4 option: orlov        - 49.6667 sec
    ext4 option: oldalloc     - 52.6667 sec
    ext4 option: atime        - 49.6667 sec
    ext4 option: noatime      - 50 sec
    ext4 option: data=journal   - 101.333 sec
    ext4 option: data=ordered   - 49.3333 sec
    ext4 option: data=writeback - 51 sec
    ext4 option: acl          - 48.6667 sec
    ext4 option: noacl        - 51.6667 sec
    ext4 option: user_xattr   - 49.6667 sec
    ext4 option: nouser_xattr - 50.6667 sec
    
    This was done by a script extracting a ~800MB tarball onto a freshly created ext* filesystem, 3 times in a row.