PXELinux + WDS

Finally got  a Linux PXE boot server to chain to a WDS boot server working!

Here’s what you need:

pxechain.com from SYSLINUX 4.04+, other version have a bug which will crash when you try pxechain.

on your DHCP server in dhcpd.conf:

option space PXE;
option PXE.mtftp-ip code 1 = ip-address;
option PXE.mtftp-cport code 2 = unsigned integer 16;
option PXE.mtftp-sport code 3 = unsigned integer 16;
option PXE.mtftp-tmout code 4 = unsigned integer 8;
option PXE.mtftp-delay code 5 = unsigned integer 8;
option PXE.discovery-control code 6 = unsigned integer 8;
option PXE.discovery-mcast-addr code 7 = ip-address;

class "PXE" {
    match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
    next-server LINUX_PXE_TFTP_IP;
    filename "pxelinux.0";
    option vendor-class-identifier "PXEClient";
    vendor-option-space PXE;
    option PXE.mtftp-ip 0.0.0.0;
}

on your TFTP server in pxelinux.cfg/default

LABEL WDSBoot
        MENU LABEL ^Boot to WDS server
        kernel pxechain.com
        append WINDOWS_WDS_SERVER::\Boot\wdsnbp.com

Obviously, replace LINUX_PXE_TFTP_IP and WINDOWS_WDS_SERVER with the appropriate IP addresses of your servers.  Additional nice thing is that in pxelinux.cfg, you can use the DNS name rather than the IP and pxelinux will resolve it for you before chaining the boot process.

If you don’t have those options in dhcpd.conf, wdsnbp.com will not get redirected properly to the Windows WDS server and try to get WDS boot info from the Linux server, which obviously won’t work.

Hope that helps someone!

No Comments

SMBC


No Comments

What happens when you don’t follow basic security practices

Some of you may have heard of the group Anonymous and how they’ve been doing all sorts of things regarding several controversial companies and such.  Disregarding all of that, this is a great article about how they hacked a supposed “security firm” as a retaliation recently.

The tactics they used were not super secret movie style backdoors or tools, they were all failures to follow basic security practices that led to a thorough and complete compromise of the security firm’s systems.  I highly suggest you read this when you have time, it’s a type of security breach that could easily happen to anyone!

http://arstechnica.com/tech-policy/news/2011/02/anonymous-speaks-the-inside-story-of-the-hbgary-hack.ars

For those who don’t have time to read the article, two KEY things that will prevent this from happening to you:

1) It’s unreasonable to expect people to have a different password for everything they access.  That’s just not how people work. However, one way to reduce the number of different passwords and still stay secure is to make up several different passwords for yourself that you use for different security levels.  i.e. use one password for web forums and newsletter signups that you don’t care for, a different password for your work accounts and email, and one more password for important stuff like your personal banking information.  That way if one password gets lost, you don’t compromise all the services at other “importance levels”.

2) Keep your software up to date!  If your software breaks or has a security hole because you haven’t bothered to update it, it’s your fault.  Updating software is an essential responsibility of every computer user.  “Don’t fix it if it isn’t broken” is a good philosophy if it really isn’t broken, but we often erroneously define “not broken” as “it hasn’t affected me yet”.  That’s a philosophy that has to change, ’cause it’s guaranteed to bite you eventually in this modern networked world.

No Comments

Light show

What happens when you shine a laser at a crystal chandelier?

Cooooool =D

1 Comment

Space Shuttle Advance

Just to show off that homemade space shuttle of mine a bit more =p

I tried to build it like a REAL Space Shuttle, based on everything I’d read about it.  So things I knew at the time, and I tried to incorporate as much of what I knew as possible into my Lego version:

  • The shuttle was built in component pieces:
    • Crew Module Flight and middeck, Airlock, Cargo Bay, Wings, Engine compartment
  • The OMS pods, removable
  • There was room for TWO CanadaArms in the cargo bay, even though the shuttle has only ever carried one at a time
    • RMS has a CAMERA on it
  • Front RCS pod, Aft umbilical connections, radio antenna in cargo bay, crew hatch (opens to mid-deck)

I put as much detail in until I basically ran out of white pieces to use =p I don’t even remember what set or sets I got the white pieces from, or the hinges, 90 degree bends etc etc.  I didn’t much care what else I took apart, used everything I could find to build this shuttle!

Oh and that big block I used for the engine compartment? =)

Is it any wonder why this was my favourite toy??

Oh all the pieces in the cargo bay were extra parts that I collected whenever I found bits of lego around the house.  I tried to save up as many pieces as possible to use and built more detail into it whenever I could, but I really did just run out of pieces and couldn’t add anything else, like a proper delta wing.

Still, definitely something I’ve very proud of, and now at least it’s immortalized in photos so if I ever drop it, break it or lose it somehow, it’ll be here =)

Now I’ll be able to compare it against the official Lego Space Shuttle Adventure, will post pics of that as soon as it’s done, and I’m gonna TRY put together a time-lapse movie of it coming together too…..key word is try =D

, ,

1 Comment

Space and Space Shuttles

I think my fascination with all things Space began in grade 3.  I distinctly remember a quiz in class about the names of the planets, and I couldn’t remember all of them.  I soon learned the “My Very Educated Mother Just Sent Us Nine Pizzas” mnemonic for memorizing the names, and soon I was at the library borrowing the entire shelf full of books on space and astronomy.

Somewhere in there I discovered space shuttles and totally fell in love with them.  What kid wouldn’t love “The world’s first true spaceship” or “The fastest airplane in the world”??  I must’ve been maybe 10 when I read “Challenger: A Major Malfunction” by Malcolm McConnell and was absolutely morbidly fascinated by the whole thing.  I remember reserving “Space Shuttle: A History of the National Space Transportation System” at one of the larger libraries in the city, what must’ve been the original edition.  I recently picked up a copy of the 3rd edition =)

So it’s with great sadness that I’m seeing NASA shut down the Space Shuttle program.  I’m very glad I got to see at least one launch in person, and I swear I’ll finish posting up pictures to that trip soon, but in the meantime, I give you:

Space Shuttle Advance

Space Shuttle Advance

I built this between grade 3 and grade 6, out of spare parts combined from all my various Lego kits back when I was a kid.  This is the first time I’ve actually taken pictures of it, it’s a bit dusty from sitting on my shelf for years, but it’s the one Lego model I have that’s still intact.

This post is long enough, so I’ll post more pics of Advance for later (I named it when I was like 10, give me a break).  I’ll show off a full tear-down with all the features =D One more reason for posting pics of Advance now tho is that at the encouragement of my wonderful girlfriend I’ve finally ordered my first official Lego Space Shuttle!

It arrived late last week, it should be awesome to have pics of both shuttles next to each other, and maybe next to one of the models I picked up from Kennedy Space Centre too.

Man I feel like a little kid =p

, , ,

No Comments

Mac lab auto-logout fix

Quick fix to a small Mac lab management headache.  It’s very useful to set the “Log out users after XX minutes of inactivity” setting in Workgroup Manager; however the built-in automatic logout dialog is often “too polite”.  If the user has left something open like Firefox, OpenOffice or even just TextEdit, the auto-logout will get canceled, leaving the computer logged in with no-one at the helm until some random person sits down on the previous user’s account!  BAD!

Found this post on MacOSXHints.com: http://www.macosxhints.com/dlfiles/idle_time_check.txt that showed a scriptable way to get the system idle time from a script.  Unfortunately the perl code in the example didn’t work for me, but since my perl-fu isn’t so hot I changed it a little bit.

This is a combination of shell script to check the idle time and run whatever you want to run, and AppleScript to display a nice little “final warning” dialog.  Default timeout of 30mins, overridable via either a simple setting in the script, or it’ll automatically check whatever setting you put in Workgroup Manager for the inactivity timeout and work off of that.

#!/bin/bash
# Detect Mac OS Idle and force-autologout
# Regular auto-logout is too "polite" and won't quit if user accidentally left
# any apps open.  This is more authoritive.
# Carl Chan 100707

####### Options #######
# Timeouts all in seconds
# Max idle time before forcing logout
maxidle_default=1800
# Final warning dialog box timeout
warning_timeout=10

function do_on_maxidle() {
	give_final_warning 2>&1 >>/dev/null
	if [ $? -eq 1 ]; then
		exit 0
	else
		killall -9 loginwindow
	fi
}
#######################

function give_final_warning(){
	osascript <<EOF
		tell application "System Events"
			display dialog "Final logout warning: This workstation has been idle for more than $(($maxidle/60)) minutes. Click cancel to stop auto-logout." buttons "Cancel" giving up after $warning_timeout with icon 0
		end tell
EOF
}

# Override script default if AutoLogOutDelay is set from Directory Server
if [ -e "/Library/Managed\ Preferences/.GlobalPreferences" ]; then
	maxidle_managed=$(defaults read /Library/Managed\ Preferences/.GlobalPreferences | grep "AutoLogOutDelay" | sed "s/[^0-9]//g")
fi

if [ -z "$maxidle_managed" ]; then
	maxidle="$maxidle_default"
else
	maxidle="$maxidle_managed"
fi

# Really cool way for finding idle time
# Modified from http://www.macosxhints.com/dlfiles/idle_time_check.txt
# perl expression didn't work and i don't know perl well enough to fix it
# so stuck with slightly clunkier method, but should be ok since this script
# isn't running continuously in the background
idletime=$(($(ioreg -c IOHIDSystem | grep -m1 HIDIdleTime | sed 's/[^0-9]//g')/1000000000))

# Check idle time and force logout if idletime > maxidle
if [ "$idletime" -gt "$maxidle" ]; then
	do_on_maxidle
fi

exit 0
AutoLogout.sh (1kb)

Here’s a little package with the whole thing wrapped in a pkg, includes a User Daemon to run it every minute.

ProudlyGeeky-AutoLogout (12kb)

Hope that comes in handy for someone else =)

, , , ,

No Comments

It’s not the equipment, it’s what you do with it

For all those who always say “my camera takes crappy pics, I need a better camera!”; it’s not the camera, it’s how you use it!

The iPhone Fashion Shoot – Lee Morris Shoots With The 3GS from FStoppers on Vimeo.

Couldn’t agree with the video more.  Wish I was good enough to make the iPhone camera look this good!

The best camera is the one you have when you need it.  The worst camera is the one you leave at home because it’s too big to carry or you couldn’t take it out in time to capture the moment.

, ,

No Comments

Welcome to Proudly Geeky!

Well, I finally got around to setting up my own personal website. Hosted on DreamHost instead of my own server now, lets me spend more time generating content rather than tinkering with the setup! Besides, DreamHost has much more bandwidth, and managment tools are pretty damn good, I’m rather impressed!

Anyway, I plan to use this place as my own personal “facebook away from facebook” page, where I can post links/pictures and just about everything else without worry about random privacy issues: here if anything gets broadcasted that shouldn’t, I’d only have myself to blame =D

One of the main reasons to move to DreamHost here is that I’ve got tons of space now, and a decent amount of bandwidth in order to host my photos with. I’ve been pretty bad with posting pictures up as of late, partially because I don’t want to post them on facebook, and partially just cuz I’ve been busy. One of the main sections, the photo gallery, has been newly set up. I’ve done away with Gallery2 from my old server, and am now using ZenPhoto. Much more modern, compact LAMP app than Gallery2 was, should be much easier to upload photos and keep them up to date now! (No more web/webdav uploading, I can RSYNC!)

Anyway, hope you all like what you find here!  I’ll try keep this place a bit more regularly updated =)

Oh, and one last thing: I’m a geek, not an artist, so don’t expect anything fancy.  This place will be functional, not necessarily pretty =D

Cheers,
Carl

No Comments