The Caffeinated Penguin

musings of a crackpot hacker

Fallout

| February 28, 2010

I finally finished playing through the original fallout (bought for $6 from gog.com). Totally worth it. Very, very good game.

I should note that it runs just fine under wine (tested: 1.1.31 aka the one which ships with Ubuntu 9.10).

Oh, and for the curious, the maintainers of the WineHQ AppDB drop “old” versions of Wine, without respect to what is currently shipping in distros. Try to be nice and submit a compatibility report and it will be rejected if you try to fudge the version number. KEEP OLD VERSIONS IN THE SELECT LIST. Lamers.

lxc basic howto

| February 20, 2010

largely from:

With additional notes from:

  1. Note that you likely want to create a separate partition for machines and put the machines there.
  2. apt-get install lxc debootstrap (Note – this is pretty inefficient in terms of space. The lxc setup does allow for read-only mounts of things. So, it can have its own /etc and html docs but share binaries and libraries with the host. But, I didn’t do it that way for ease of backups)
  3. Set up cgroup

    mkdir /var/cgroup
    mount -t cgroup cgroup /var/cgroup
    • probably want to add it to /etc/fstab as well:
      cgroup          /var/cgroup     cgroup      defaults              0       0
  4. Add a bridged network interface:

    brctl addbr br0
    brctl setfd br0 0
    • bring up the bridge with a given IP
      ifconfig br0  promisc up
    • add the existing interface and set it to a bad
      brctl addif br0 wlan0
      ifconfig wlan0 0.0.0.0 up
  5. Bootstrap a basic system

    mkdir machine
    sudo debootstrap --arch i386 karmic machine
  6. Create a config file:

    lxc.utsname = my_ssh_container
    lxc.network.type = veth
    lxc.network.flags = up
    lxc.network.link = br0
    lxc.network.ipv4 = 192.168.9.151/24
    lxc.network.name = eth0
    lxc.mount = /var/lxc-machines/machine/fstab
    lxc.rootfs = /var/lxc-machines/machine/rootfs
    
  7. Create the machine:

    lxc-create -n trac -f /var/lxc-machines/machine/config
  8. edit the appropriate files on the guest

    /etc/fstab:
    none    /dev/shm    tmpfs  defaults 0 0
    none    /proc       proc   defaults 0 0
    none    /dev/pts    devpts defaults 0 0
    none    /sys        sysfs  defaults 0 0
    • /etc/resolv.conf
    • /etc/hosts
    • /etc/hostname
    • Set them up correctly
  9. remove the following files:
    rm control-alt-delete.conf hwclock.conf \
    hwclock-save.conf mountall.conf mountall-net.conf \
    mountall-reboot.conf mountall-shell.conf \
    networking.conf procps.conf rsyslog-kmsg.conf \
    tty2.conf tty3.conf tty4.conf tty5.conf \
    tty6.conf upstart-udev-bridge.conf
    
  10. Create lxc.conf to generate things:
    start on startup
    script
        >/etc/mtab
        mount -a
        initctl emit virtual-filesystems
        initctl emit local-filesystems
        initctl emit remote-filesystems
        initctl emit filesystem
        ifdown eth0
        ifup eth0
    end script
    
  11. /etc/apt

    grab the sources.list from the host (if guest is same as host) or make one

  12. /etc/init/rc.sysinit.conf
  13. bootstrap a basic bash so the various nice utilities work:

    lxc-start -n trac bash
    • add user.
    • add admin group
    • set sudoers to allow admin group
    • add user to admin group
    • Generate locale:
      sudo locale-gen en_US.UTF-8
  14. Start the machine:

    lxc-start -n machine init &
  15. Start for real:

    lxc-start -n machine
  16. Notes:

    • Console:

      sudo lxc-console -n machine
    • Debugging:
      lxc-start -l DEBUG -o $(tty) --name machine

Toby Keith’s movie

| February 4, 2010

Totally not as bad as you’d think.

Windows task manager vs ps

| February 2, 2010

So, I was fiddling with java stuff at work the other day, and was struck by just how useless windows task manager is.

When running several:

java -jar something.jar

GNU ps actually shows which is which, because it includes the name of the jar file.

Windows just shows javaw.exe for all of them, so you don’t know what you’re killing.

Punditry: Shooty things

| February 2, 2010

Okay, to recap: Heller says that the FedGov can’t ban guns in common use, or that are logical evolutions of the arms required to be kept for militia purposes. DC is forced to open up their gun registry, but the registry is not abolished. There is suggestion that registration of arms may be reasonable, but no ruling is made on that.

This does not currently apply to the states, as this was an appeal from a DC court, and thus is strictly federal.

I should mention that, were it still in effect, this would likely have resulted in the overturning of the assault weapons ban. After all, the ruling was that they can’t ban guns (defacto ban or actual).

Now, McDonald v. Chicago may very well incorporate this down to the states.

If that happens, expect the state assault weapons bans to go be overturned, and the very restrictive gun registration requirements (say, NY City)

I would expect the more reasonable ones (say NY State) to stick around.

So, for me, this is a net win – no more “NY Compliant” black rifles, but I still need to wait for 2 weeks to buy a handgun.

That said, the handgun registry served two purposes:

  1. You got background checked by the Sheriff before getting your new gun
  2. Your handguns are recorded in a registry

The gun registry and corresponding ballistic databank have been cited as abject failures by every independent study done on them.

The background check is redundant with the federal NICS check.

It would be nice of politicians were rational, saved some money, and abolished these useless enterprises. However, I don’t hold out much hope for that happening. It seems easier to enact laws than get rid of them.

lxc is awesomes

| February 2, 2010

http://lxc.sourceforge.net/

Win.

(More to come. I’ll also be updating the community docs once I have all the kinks ironed out.)