| (no subject) |
[Oct. 6th, 2008|06:19 pm] |
Early this year, I bought a 500GB NAS with the intent to make that my primary storage server instead of a power-hungry full-blown computer. It worked perfectly, and being that it's essentially an embedded Linux box, I even managed to finagle it to run the Slimp3 server software.
Fast forward to last Thursday, when I decided it'd be nice to make it a print server as well. There weren't any drivers in the stock kernel, so I found a replacement, installed it, and rebooted. The NAS didn't come back up. I opened it up and manually restored the kernels, but it still wouldn't boot. The bad kernel on the first go-round had put everything into "emergency mode" (EM), so it wouldn't boot again without, allegedly, some special incantations. None of them work, however, and I went from a device that tried to boot to one that would turn itself off after 3-4 seconds and just flash an error message.
On Sunday, I finally got things restored. Doing so involved booting the NAS and immediately rebooting it, which for some reason would prevent it from going into error-alert mode and instead put it in a pseudo-EM mode. Next step was to set up a Windows box on a special subnet running a TFTP server to deliver a kernel + ramdisk image to the NAS, which it used to boot into full-blown EM mode. It should have been easy from there, but somehow, the NAS would only listen for UDP discovery packets on the 192.168.11.0/24 subnet while only responding to TCP packets on the normal 192.168.0.0/24 subnet. Fortunately, Vista (not sure about other versions) lets you assign multiple IPs to a single interface, so I was finally able to flash the new firmware.
Boring story? The payoff is that had I flashed the firmware in the first place, I'd've gotten print server support out of the box, as it was added sometime in the last 8 months. Reinstalling the Slimp3 server was also a snap. Damn. |
|
|
| Flash Photography |
[Mar. 22nd, 2008|11:39 pm] |
In the vein that teaching helps you learn something better, I thought I'd write this down (mainly for my own edification and reinforcement, but still, it's the thought that counts). First, to preface everything, I've picked up a few pieces of lighting equipment, including a radio trigger and a light stand, to allow me to be more creative with my photography. I got most of that equipment this past Thursday, overnighted from Amazon, to have it in time to photograph my brother's spur-of-the-moment wedding. I did some quick reading at the Strobist blog, then it was off to the races.
In available-light photography, there are three variables that determine the final exposure: aperture, ISO speed, and shutter speed. To keep the same exposure, any change in one must be balanced by a change in another. Everything is measured in "stops", basically a change in value that results in the doubling or halving of light. For instance, F/16 at 1/100th and ISO 100 is the same exposure, light-wise, as F/8 at ISO 400 and 1/1600th. Going from F/16 up to F/8 is two full stops, so we need to quadruple the shutter speed or quarter the ISO speed to keep the light the same. The next change, ISO 100 to 400 is another two stops, totaling four stops that we need to change the shutter speed by. 1/100th -> 1/200th -> 1/400th -> 1/800th -> 1/1600th. Easy stuff so far.
Adding flash into the mix changes things up. Now, our exposure triangle becomes aperture, ISO speed, and flash intensity. Flashes only last for a fraction of a second, so with sync speeds (the fastest shutter speed when using a normal flash) of 1/250th, we can consider them to be pretty much instantaneous. Since 1 second is as good as 1/250th when you have such a short burst of light, we can just ignore shutter speed for now. The rest of the math is pretty much the same. Flash intensity, just like everything else, is measured in stops, so it slots right in.
( A photo )
Outside the studio, though, you usually won't be using flash as your only light source, so you need to balance the ambient light with the flash. This is done, essentially, by treating the scene as two separate exposures that you're taking at the same time. I'll use the above picture as an example. The first exposure to determine is the ambient exposure. This was a bright day, so I could have used the Sunny-16 rule (I didn't, mind you, I'm not that cool) which says that the correct exposure should be equivalent to F/16 at 1/100th and ISO 100. In the above photo, I wanted the background properly exposed. You could also, especially indoors, decide to underexpose it a stop or two to make your subject stand out.
The next step is to come up with the actual settings for the camera. The key point here is that the flash and the ambient exposure have to agree on the ISO speed and aperture. I'm using my normal flash on a light stand, so its power is nothing to brag about. As a result, I wanted to maximize the amount of flash light getting to the sensor. That means opening up the lens as much as possible, without going over my flash sync speed (1/200th for me since my radio trigger is el-cheapo, or however you say that in Chinese). So, the first setting is 1/200th, because I know that's going to be the limiting factor in such bright light. Now, thinking about the Sunny-16 rule, I know my possible exposures are F/16 and ISO 200, F/11 and ISO 100, or F/8 and ISO 50. Larger apertures let in more of the flash light, so F/8 and ISO 50 was the easy choice. Once that decision is made, I just have to set the flash up on its stand, adjust the power and distance until I'm happy (I believe I was using 1/2 power at about 6 feet away, to keep down the recycle times). |
|
|
| (no subject) |
[Mar. 10th, 2008|02:42 pm] |
|
I just got my $18 wireless flash trigger in the mail! Even more impressive, it actually seems to work! I can't wait to experiment with it later, especially with the extension tubes I got last year. |
|
|
| (no subject) |
[Jan. 23rd, 2008|09:18 pm] |
It's nice, the little things you can do with Linux sometimes. I just booted Erin's laptop into a Gentoo install disk and entered this command:
dd if=/dev/sda2 bs=1M | gzip -c | ssh pmcneill@192.168.0.2 "cat > erin/laptop/windows.gz"
Basically, do a bit-for-bit copy of her harddrive, compress it, then send it to my server for storage. We probably'll never find the Windows and Office CDs, if her computer were to have drive problems, so this should completely bypass that problem. The only step now is to set up incremental backups of the important files, and we should be covered.
Edit: Apparently I'm doing this just in time .. dd fails about 20% through the copy, complaining of a media error. |
|
|
| (no subject) |
[Nov. 10th, 2007|11:18 pm] |
|
I've had http://patrickmcneill.com/ running for a while now as just a photo gallery. I decided a few days ago to update it, adding non-photo content. Ultimately, it may end up as partially a commercial site, if I ever decide to try my hand at a photography business. However, right now it'll mainly just be my resume, the file recovery program I mentioned earlier, and the same old photo gallery. Oh, and my fancy new image viewer! I've been doing a ton of DHTML, Javascript, and AJAX at work in the last few months. I decided to bring some home and create a little "favorite images" widget. It seems to work most of the time, in most non-IE6 browsers, so I'm very pleased. |
|
|
| (no subject) |
[Nov. 5th, 2007|10:18 pm] |
My program works! I fed my first program 8 raw files from my camera and 6 JPEGs. That gave me this file, and one other:
jpg 50000 10000000 FFD8FFE1XXXX45786966000049492A000800000009000F010200060000007A00 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXFFD9
I just finished the second program, the one that would actually use the above file. After some twiddling to get everything working, I was able to recover all 290 JPEGs (the same number as the other program found) and 119 raw files from my memory card dump! Even better, the fingerprinting code worked perfectly. Neither of my two programs has any knowledge at all about the specific file formats, so I'm very pleased with myself. I need to post the program up somewhere, even though the code isn't in great shape yet. I hope I never have to use it again, so maybe it'll be of use to others. |
|
|
| (no subject) |
[Nov. 4th, 2007|06:23 pm] |
I've got a nice little project going that I'm really happy with. A few weeks ago, I mistakenly erased a memory card with some photos on it. I was annoyed with myself, but moved on because the photos were nice, but not that important in the grand scheme of things. Yesterday, though, I realized that I only reused about half that card after formatting it, so there was a good chance the data was still on the card even though the file allocation table was long gone.
A little bit of googling turned up a package called "findfiles", which actually included only one program: "findjpegs". Sounded perfect, but it didn't work. I broke out a hex editor and started reading the source code. After a short while, I'd found all of the photos I'd previously lost! This brings up an excellent reason to actually format your memory cards -- the file system is constantly defragmented so this sort of recovery is possible, and even pretty straightforward.
Finding the JPEG images was nice, but I'd also like to find the raw files now that I'm using Lightroom for all my post-processing. Not surprisingly, there's not a ready made program for this, so I have to break out my dusty C skills. I've decided to make this program somewhat extensible. It will run in two parts: fingerprinting and recovery. The fingerprinting part involves examining any number of existing files and determining how the start and end of the files are alike. For instance, JPEG files all end with "0xFFD9". Once it's got a generic fingerprint, the recovery software will, when I'm done, be able to search any file (meaning, in Unix-speak, any disk as well) for anything that matches. Very simple, but it should pull everything off my memory card. It should also be useful if a memory card ever starts to fail or becomes corrupted. If my computer can read the card at all, I should be able to get something off of it. |
|
|
| (no subject) |
[Sep. 5th, 2007|02:09 pm] |
|
Early last week, I ordered an iPod nano with some credit card reward points. On Sunday, or so, I read a rumor that Apple would be releasing new iPods today. Just now, I was reading a liveblog of the new iPod announcements. Literally, as I was reading the blog, the doorbell rang. It was DHL. They had my iPod, now outdated by about 15 minutes. |
|
|
| (no subject) |
[May. 5th, 2007|02:02 pm] |
|
I just turned on the hockey game and the commentators were talking about how it's the fifth game in a seven game series. One of their comments was that the winner of game 5s, when the series is tied 2-2, goes on to win the entire series 80% of the time. Sounds like a lot, but it's not. If you assume that the teams have exactly the same chance of winning, the game 5 winner would win 75% of the time, so 80% just means that the game 5 winner has a fairly small edge. That seems reasonable when you consider that they'd be guaranteed at least one additional home game, have momentum, and almost have a freeroll in game 6 since they can't be eliminated. Math is hard. |
|
|
| (no subject) |
[Nov. 18th, 2006|05:40 pm] |
Real estate agents are my favorite right now. First, I had one string me along while "trying" to sell my house. Maybe she did some stuff behind the scenes, but I was generally dissatisfied. Anyways, I'm over that. I've got a new agent who seems like she'll be better. She seems to have a good plan, so I'm confident she'll do a better job.
All was well with the world until this morning. I picked up a U-haul truck to move most of my stuff out of my house and up to my parents' in Virginia. I'm leaving tomorrow afternoon to get sister back to her place by 3 on Monday, so my schedule is pretty tight. You might say, "Well, what's that have to do with real estate agents?" Well, one of them backed into my car while I was out picking up the truck. Talk about a big wrench in my plans... |
|
|
| navigation |
| [ |
viewing |
| |
most recent entries |
] |
| [ |
go |
| |
earlier |
] |
| |
|
|