How to resize a VirtualBox disk
1I primarily run Linux, but occasionally need to run something in Windows. So I use the open source VirtualBox program to run Windows XP in a box (where it belongs).
Most of the time, I create a new VM for a specific task. For example, around tax time, I might create a VM that has nothing in it except WIndows XP and Turbo Tax or Tax Cut — or better yet — Tax Act. To make this a little easier, I create a VM that has a fresh copy of Windows XP on a 10GB hard disk, and then I made a compressed copy of the disk image file. It compresses nicely down to 700MB, just about right to fit on a CD. So step one of doing my taxes is to copy this disk image file, uncompress it, and create a new VM that uses that disk.
That is, I treat the Windows OS as disposable — create a VM, use it, save my files somewhere else and then throw the VM away.
Every once in a while, though, I need more than the 10GB that I originally allocated to the VM. For example, iTunes usually needs a lot more storage than that. So I need to resize the Windows C: drive. It turns out that this is very easy to do with the open source tool “gparted“. This comes included in Ubuntu Live CD’s, so I just boot the VM into an Ubuntu Live CD session and prepare the new, larger disk.
Here’s the step-by-step, gleefully stolen from the VirtualBox support forums.
- Make sure you have an Ubuntu Live CD, or a “System Rescue D“.
- Create a new hard disk image (*.vdi file) using Virtual Disk Manager. In VirtualBox, go to File / Virtual Disk Manager.
- Set your current VM to use the new disk image as it’s second hard disk and the Ubuntu Live CD (or System Rescue CD) ISO file as it’s CDROM device.
- Boot the VM from the CDROM.
- If you’re using the System Rescue CD, start a graphical “X-windows” session by typing
startx
at the command prompt. - When your X-windows starts up, open up a terminal and type
gparted
. - You’ll need to create a partition on the new disk. So in gparted, select the new disk and the Device / Create Partition Table.
- Then select the windows partition and choose copy.
- Select the second hard disk, right click on the representation of the disk and click paste.
- Gparted will prompt you for the size of the disk, drag the slider to the max size.
- Click apply and wait…
- Important – when it is done, right click on the disk and choose Manage Flags, and select Boot.
- Exit gparted and power off the VM.
- Change the VM settings to only have one disk (the new bigger disk) and un-select the ISO as the CDROM.
- Boot the VM into your windows install on it’s new bigger disk! The first time it boots up, Windows may do a disk check and reboot.
Once you’re happy with the new larger disk, you might want to delete the old, smaller one.
This method should work the same, regardless of whether the host OS is Linux, Windows or Mac OS.
Keep that Ubuntu Live CD around — it really comes in handy!
Are you a human?
1I got an email from Ebay saying my password had been compromised and so my account had been disabled. I spent a couple of hours trying to straighten it out, and in the process, I had an online chat with their help desk.
I kept wondering if the agent, “Sheryl”, was a real person or just some program on Ebay’s web servers. So I asked her “which comes first, Halloween or Thanksgiving?”
She got it right… on the second guess. Her answer, though, proved to me that she was not a bot. My guess was that she was in a call center in India. However, I suppose she could’ve been Canadian – their Thanksgiving is in October. But I am betting on India.
Disabling Linux user accounts – passwd and chage
0On internet-facing machines, I like to disable the root password so that you can only log in as root using an SSH key. This is done by setting the seemingly-scary option PermitRootLogin without-password
in /etc/ssh/sshd_config . This option means that you can ONLY use a key to log in as root… a password will never be accepted, and so you can not guess it by trial-and-error.
While I am at it, I go ahead and disable the root password completely. That’ll be one less thing for me to remember, and one less thing to keep secret.
First, be sure that you have at least one “sudoer” user, or at least one SSH key in ~root/.ssh/authorized_keys . Otherwise, you’ll realize in an “ignisecond” that you’ve just locked yourself out.
Then, use the passwd
command to “lock” the account.
$ passwd -l root
This command will put a ! character in the password field of the /etc/shadow file so that no password hash will ever match the string in the shadow file.
But on SOME SYSTEMS, it also does a second thing — it may change the account expiration date to January 2, 1970. This will prevent SSH access, even with a key.
While researching this article, I had this “world-shifting-under-me” feeling, as I distinctly remember having to work around this issue. However, on every system I tried, I could not reproduce the expiration-date-changing behavior. Then I found that it was an issue that flip-flopped in the Debian community between 2006 and 2008. In 2006, they made the passwd -l
command lock the password and also expire the user account. But in 2008, they decided that the change affected too many people, where most had grown accustomed to the passwd
command affecting the password only, and not touching the account expiration date.
If you want to change the account’s expiration date, you should use the chage
command.
$ chage -E -1 root # never expire $ chage -E 1 root # expire on Jan 2, 1970 $ chage -E 0 root # not recommended, undefined behavior $ chage -E 2010-12-25 # expire on a specific date
So here I was, all set to share a nugget of wisdom with the world, and instead, it ends up being a trip down memory lane. However, in the process, I learned a couple of things.
A very safe way to disable a user account’s password, while keeping the account open to SSH access is like this: passwd -l user && chage -E -1 user
. The chage
part is unnecessary on modern systems, but it does not hurt anything.
A quick way to check on whether a password is locked, or a user account is expired, is to use passwd -S user
, like this.
$ passwd -S user user P 09/11/2007 0 99999 7 -1
This says that user‘s password is set (P), it was changed way back 2007, there is no minimum age (restriction on how often they can change their password), there’s a very long maximum age (time when they are forced to change their password), the warning period is one week, and the account is not inactive/expired.
So there you go, two for one, a Linux tip and a history lesson!
High-Altitude Balloon Launch (NSL-3)
0About a month ago, some friends found out about a contest called “Hackerspaces in Space”, where the object was to take a picture of the curvature of the Earth, with black sky over a band of blue. This kind of picture can only be taken from space… or from “near space”, above about 65,000 feet. That’s about twice as high as most passenger airliners fly! My friends quickly got together, declared themselves “NCNearSpace“, and researched everything from balloon physics to wind models to FAA regulations. Three weeks later, they launched two helium balloons up to about 80,000 feet. When they retrieved the capsules, they were rewarded with stunning photos.
The group was encouraged by their successes, and they sought out help in their next attempt, which would aim for a much higher altitude, hopefully 120,000 feet. This would require a much larger balloon. However, the team found that their earlier research had prepared them for this next launch — not much had changed, other than the sizes of the balloon and capsule.
One area that really needed some work was the recording and dissemination of position data. The first launch (dubbed “NSL-1”) was supposed to use a small GPS and a ham radio transmitter in a system called APRS. This system worked for a little while, but mysteriously stopped transmitting after 10,000 feet. They never heard from NSL-1’s transmitter again. Feeling rather bummed at the loss of their capsule, they hastily assembled a second launch using left-over parts and a SPOT GPS transceiver, a commercial unit and subscription service which is normally used by sailors, hikers, and mountain climbers. This second launch, NSL-2, did surprisingly well, considering its humble beginnings. The were able to follow the position using the SPOT web site, and they retrieved NSL-2 before the sun set. (About a week later, a farmer found NSL-1 and called the phone number, much to the delight of the team).
A week before the launch of NSL-3, I took a look at some scripts that had been used to retrieve the position data from the SPOT web site. Since the earlier chases had led the team through some very rural country areas, they found that it was not too easy to access the SPOT web site from the road. Furthermore, the SPOT web map required a full-sized PC with some pretty fancy web browser magic installed. It would be nice to get this information on a mobile phone. I did a little bit of hacking, and soon, I had a script that would:
- retrieve the data from the SPOT web site
- generate a small-format Google Map, which could be viewed on a smart phone
- send text messages to all of the followers (using a standard email list package)
- send an update to Twitter
- send an update to the ham radio APRS network
On the day of the NSL-3 launch, the system worked well. The use of SMS text messages proved to be a good way to get the balloon’s progress to the chase team. When we drove through no-coverage areas, the messages were queued up for us. And when we had 3G data coverage, we were able to see maps of the balloon’s path. For at-home followers, the Twitter feed kept sending out updates, and the Google Map was available.
As expected, the balloon went up, reporting its position for about an hour, from 8:55 until 9:40. Then, we stopped receiving updates while the balloon was above 60,000 feet (a known limitation of the SPOT). This uncomfortable time lasted about an hour and a half. Finally, at 11:10, we started getting updates again, and they continued for 35 minutes. After 11:45, all of the position updates were in the same place… some light woods next to a farmer’s cow pasture.
We were lucky… of all of the places to land, this terrain was not too rough. We got permission from the owner and then crossed the electric fence into the woods, where we found the capsule on the ground, about 40 feet away from a wide path. The balloon did not burst into many pieces as expected, but instead blew out on one side, leaving the flapping remains to get tangled in the parachute. Still, the capsule and its contents appeared to be undamaged.
The pictures were, once again, spectacular. But the on-board GPS data was inconclusive — it logged pressure altitude rather than GPS altitude, and even that data was cut off above 30,000 feet. So it’s hard to tell how high the balloon got (remember, NSL-3’s primary goal was to reach 120,000 feet). Our team will be digesting this data for a while… hopefully we can come up with an agreement on its burst altitude.
The team is thrilled with another successful launch and retrieval. And we already have plans for future projects. I have a feeling that there may be some data recording, logging and telemetry in my future.
Photo by Adrian Likins
House Guests
1This summer, my sister-in-law, Kim, and her six-year-old daughter, Emily, came to visit us from Hong Kong. Emily’s school is out for the entire summer, and our girls are tracked out for all of July, so they spent three weeks with us!
Their stay here ended up being divided into three week-long chapters: life at home in Cary, the NC mountains, and the NC beach.
AT HOME IN CARY
During the first week, Kim and Emily tagged along with our girls to their normal events: swim meets, a sailing class, visits to our local museums and downtown, and more. I went to work in the daytime, leaving them to their activities.
THE NC MOUNTAINS
The second week, we spent in the NC Mountains. We rented a cabin in the town of Bat Cave, and we ventured out into the surrounding area. My parents joined us for a couple of days.
On Sunday, we drove to Bat Cave, which is really not much more than a post office and a sign post, with signs saying “Bat Cave, NC” on both sides of the post. We took our time in getting there, arriving the late afternoon. We drove into the town of Chimney Rock to get our bearings (to pee), and we were surprised to find that the entire town was without electricity. So we snaked our way up the mountain to the cabin, which was a good 1000 feet higher in elevation than the town. Eventually, the power came back on, and my parents showed up, too. We settled in, which for some, means unpacking. For me, it means I set up my Linksys wifi router and started scanning for neighboring networks. I had high hopes, because although there was only one other home that could be seen from our cabin, it was another rental unit, and they had advertised internet. Contrast that to our rustic accommodations, with satellite TV and a hot tub, but no internet.
On Monday, we drove a little bit father down the valley into Lake Lure. We took a boat tour of the lake, whose highlights included the site where Dirty Dancing was filmed in 1987, and some nice summer homes (note to self, buy more lottery tickets). We ate a picnic lunch on the shore. A bit further downstream, we found the Broad River Gems & Mining Co., a curious little operation whose proprietors inadvertently taught us as much about the dangers of smoking as it did about geology. For a hefty $25/bucket, city-slickers like us can rinse away the NC mud to reveal stones that have been imported from around the globe (the mine we visited last year had cheaper buckets with fewer stones, and so it felt a little more like mining, whereas this one seemed more like a muddy piñata than anything else). On the way back to the cabin, we stopped by the side of the road to wade in the cool water of the Broad River.
On Tuesday, Mimi and Pops left, and we headed to Chimney Rock State Park. It was hot and humid, but we were not deterred — we made the brief hike up the outcroppings trail to the Chimney Rock, where we caught our breath and took pictures of the valley. We cooled off and had lunch at the Sky Lounge Deli, waited out a small rain storm in the Sky Lounge Gift Shop, and then rode the elevator back down into the cool rocky tunnel. With the rain, the humidity was now well into the 90% range, and we sweated as we hiked along the Hickory Nut Falls trail, which rewards the persistent hiker with a cool 404-foot waterfall.
Wednesday was another steamy day with scattered showers, which we spent at the Biltmore House and Gardens in Asheville. The house tour is bigger than I remember it (or my memory is smaller than the tour), and we even chatted our way into a ride on the old elevator. But in the end, I still have to take solace in the fact that my modest house has many more amenities than old George Vanderbilt’s did, and it costs much less to maintain.
On Thursday, we managed to drag our four-hour drive home into some sort of eight-hour marathon, with frequent bathroom breaks, in-flight movies, snack breaks, and a poorly-timed stop at the NC Transportation Museum in Spencer NC (we arrived there ten minutes before closing time, 5:00pm). I can promise that we’ll return to the NC Transportation Museum some day… that place could easily fill a Saturday!
We spent Friday and Saturday at home, doing laundry and generally recovering from our trip to the mountains.
THE NC BEACH
On Sunday, we packed up and headed out to Atlantic Beach. The drive down was uneventful, and we enjoyed watching videos in the van (I jury-rigged a portable DVD player onto a make-shift shelf in between the front seats). We got to the beach just in time to see the orange moon rising into the dark blue evening sky in the east… awesome.
On previous trips to the beach, we had usually gone out to the ocean in mid-morning, and then worked our way back to the pool by around lunch time… a recipe for sunburn. So this week, we tried a new tactic, staying indoors during the peak hours of 10am – 3pm. So on Monday morning, we woke up and went for a quick walk on the beach in the morning, where we spotted a loggerhead turtle’s nest! That afternoon, we went to Fort Macon — we were completely stunned to find that it now has a brand new visitors center. One of the volunteers was wearing a turtle shirt, so we asked him about the nest, and he said that it should hatch any day now! We left the fort and headed to the Beaufort waterfront, where we ate at Finz and then toured the NC Maritime Museum. Our last stop of the day was at Beaufort’s Michael J. Smith Airport, my attempt at showing Emily that real people can fly small planes in America (there were no planes to see that day… bummer). We returned to the condo for a swim in ocean and then in the pool. Later that night, I went out to check on the turtle nest… there was a small crowd gathered around, hoping to see them hatch.
On Tuesday, we repeated our successful sun-aversion formula, with a walk on the beach in the morning and mid-day at the NC Aquarium at Pine Knoll Shores. We explored the marsh area, saw crabs and snakes and sharks, and then attacked the gift shop. On the way out, we found a quick geocache nearby, and then headed off to Professor Hacker’s Lost Treasure Golf and Raceway (we did both, golf and racing). We finally topped it off with dinner at the Crab Shack, and a walk on the Pine Knoll Shores beach, where we found two more (less mature) turtle nests. Once again, after we got home, I checked on our turtles.
Wednesday was unusual for a beach day… we did NOTHING until mid-afternoon. The girls played games, and the adults read books and we all talked. Then we finally returned to Fort Macon beach to walk along shore at the easternmost tip of the island. We found hermit crabs and olive snails in the large tide pools, we climbed on the rock jetty, we collected smooth stones on the sand, and we watched an old fisherman catch and release a stingray. We came home and swam in the pool again. And again, we checked on our turtles at bedtime.
On Thursday, we woke up and packed to go home. It was starting to rain anyway, so we did not feel so bad about leaving the beach. We took the Cherry Branch / Minnesott Beach ferry across the Neuse River, and drive on up to Aurora to see the Fossil Museum. We spent just a little time inside before the kids were about to bust, so we went out to the dirt pile to dig for a while. As luck would have it, the rain finally caught up with us, so we filled a 5 gallon bucket with that prehistoric dirt and we loaded up the van to head back home.
GOODBYE
What a trip. Three weeks in North Carolina, and we did the mountains and beach and all points in between. We learned about gems, turtles, fossils, trains, sharks, the Civil War, rip currents, airplanes, and 19th century aristocracy. And we also ate at Waffle House! I’d call that an educational summer!
apt-xapian-index
2When it comes to searching, there seems to be two battling camps: the ones that prefer to index stuff in the middle of the night, and the ones that just want to search when you need to search. The problem is that, many times, “in the middle of the night” does not end up being “when you’re not using the computer”. The other problem is that this sort of indexing operation can often completely cripple a machine, by using a lot of RAM and completely slamming disk I/O.
As far back as Windows 3.1, with it’s FindFast disk indexing tool, I have been annoyed by indexing processes that wake up and chew your hard disk to shreds… just in case you might want to search for something later.
What a stupid idea.
The latest culprit in Ubuntu is apt-xapian-index, which digs through your package list information, assembling some treasure trove of information that was apparently already on the disk, if you ever needed to ask for it.
Solution:
sudo apt-get remove apt-xapian-index
A better long-term solution:
If you have information that you would like to be indexed for faster retrieval later, do the indexing upon insertion, not periodically. That is, when you apt-get install a package, set a trigger to update the relevant bits of your package index at that time.
NCSU Library
0I attended NC State University twice: 1986 – 1991 and 1997 – 2000. At that time, the library was no-nonsense, spartan and downright dull. I tried not to spend much time there.
Today, we were in that area of town, so I decided to show the kids around the campus. I knew they’d enjoy the view from the 9th floor, so we went to the library.
Wow… to say that they have renovated it would be an understatement. It looks nothing like the library that I knew.
Take a look for yourself.
The Creamery – an ice cream shop
Amazing… I think this sort of visual stimulation helps the mind work better, and I am happy to see the library’s new look. Go, Wolfpack!
The Final Flight of Atlantis
1When I was a kid, our family visited the Kennedy Space Center at Cape Canaveral in Florida. It must have been about 1977. When we were there, we learned about the soon-to-be-built Space Shuttle. I remember buying a deck of playing cards at the souvenir shop — they had an artist’s drawing of what the Space Shuttle was going to look like after it was complete. It seemed like science fiction.
The Space Shuttle program has been active now for three decades. And later this year, the fleet will be retired. With only three more scheduled missions remaining, our family decided to go see the final launch of Atlantis, mission STS-132.
Tickets were sold on the internet, but they always sell out very quickly. I was lucky enough to get SIX tickets to the Visitor Center. I was thrilled… except my friends were expecting me to get NINE tickets! We spent the next two weeks trying to make plans that fit within our new constraint. We decided that our family would use four tickets, and the other two would go to my friend David and his son, Chase.
THURSDAY
We took the girls out of school for two days (with the blessing of their principal), and we made the long ten-hour journey south. Scooby Doo kept us company in the van, and we occasionally checked for launch status updates and photos on Twitter — I was following a group called the “NASA Tweetup”, Twitter users who had been selected to go on an in-depth tour of KSC (it’s like the Charlie and the Chocolate Factory story, golden tickets for the super-special tour, but this one was for space geeks instead of sugar addicts).
We arrived in Titusville with a little bit of daylight left, which we used to scout out the area before finding our hotel way down in Melbourne. We had two full days at the Kennedy Space Center. The launch was on Friday afternoon, and Saturday was free to explore the exhibits.
FRIDAY
Traffic was heavy on the way in, but we finally got in and met up with David and his son. Along the way, our party had grown. David’s college room-mates had found tickets, so we now totaled nine.
We got off to a slow beginning, wandering around the Rocket Garden with no clue what to do first. But we finally decided to split into two groups. Our crowd wanted lunch, and that’s where we found the best bargain of the weekend: a plastic shuttle-shaped drink bottle with free refills. They cost $7 each, but they were worth every penny. It’s a super tacky souvenir that also keeps you hydrated in the Florida heat!
Lunch time was quickly turning into Launch time. At one point, I heard a loudspeaker announce “T minus ten minutes” and I panicked (before I realized that they do this awkward stopping and starting ritual). So we decided to survey the different viewing areas. The Visitor Center is close (7.4 miles), but it does not have a clear view of the launch pad, so they set up large TV screens in two different areas: one by the Explorer space shuttle mock-up, and one in an open field near the Rocket Garden. The TV’s give you a close-up view of the first few seconds after liftoff, and then you get a live view after the shuttle clears the tree line. Both of those areas were very crowded, and there were lots of trees that block the north-eastern sky.
We chose to forego the TV’s for a spot on the walkway behind the IMAX building. We were against the rail overlooking the pond, and that meant we had a clear view of the sky. I listened to my scanner to know what was going on. Audrey held binoculars, and I had a video camera. Foong and Sydney wandered to a shady spot that still had an open view.
Launch time came quickly… without the TV’s, it was easy for the time to sneak up. The next thing we knew, it was T minus 1 minute. I heard the countdown on the scanner reach zero, and then we waited for what seemed like 20 seconds before we saw a searing light shining through the trees. Atlantis finally popped up over the tree line, trailing behind it what looked like molten gold. The light was so bright, it was as if we were watching a movie of the blue sky, and someone had ripped a small hole in the screen, letting in the outside sunlight. It was very surreal.
As the spacecraft climbed, a helicopter circled over KSC, briefly crossing our view of the shuttle. Then came the sound, a low rumble that sounded like rolling thunder. Atlantis passed behind a small cloud, and continued up, building its pillar of smoke beneath it. Watching the smoke shoot out of the rockets and then hang in the air reminded me of the way you drip wet sand on a sand castle to make spires. It flows and then solidifies in place.
Within a couple minutes, Atlantis arched away from us, out over the Atlantic Ocean. Since we were at the bottom of that arc, we could not see the shuttle through the smoky trail. The solid rocket boosters were released, and so the smoke trail ended. When we saw the shuttle reappear, it was a tiny bright dot against the blue sky. It appeared to be heading downward as it curved its way over the ocean. Its straight downward path cut behind the twisted smoke trail that was beginning to be blown into a zig zag shape.
The scanner reported that Atlantis’s progress. It crossed the point of no return, where it could no longer return to Kennedy if needed. Then it was high enough to make its way into orbit even if one engine failed. Then it was high enough if TWO engines failed. Soon it reached 12,000 miles per hour. In just a couple of minutes, it had traveled 600 miles downrange… the same distance that we had spent all of Thursday driving.
Our attention slowly moved back to the ground. Wow. Those six astronauts were on their way into space. And we had been there to send them off.
We spent the rest of the day touring the Kennedy Space Center. We rode the shuttle simulator (which I would describe more as “cute” than “wild”). We saw an IMAX film about “Walking on the Moon”. And we spent a lot of time (and money) at the gift shop.
SATURDAY
As soon as we got back to KSC on Saturday, we went straight bus tour (well, OK, we did stop by the Orbit Cafe to fill those shuttle-shaped drink bottles). The bus tour made three stops.
The first stop was at an observation platform where you could see the Vehicle Assembly Building and the launch pad. This was a great photo spot, and we got to see a movie about how they assemble the “stack” (shuttle + tank + rockets) in preparation for launch.
The second stop was the Saturn V building, where we saw the actual Apollo launch control room, the humongous Saturn V rocket, and a movie about landing on the moon. We had lunch, did some exploring, and we touched a real moon rock.
The final stop on the bus tour was the International Space Station processing building. This place lacks the polish that the rest of the KSC has — it’s tucked away in the back of a drab federal government building, surrounded by chain link fence, and has a distinct “after-thought” feel to it. There are exhibits showing a history of orbiting labs, from Mir and Skylab to the modern ISS. But the main attraction was the mezzanine that overlooks the clean room where the ISS modules are assembled (during weekdays, I imagine).
We got back to the Visitor Center in time to catch one more IMAX movie, “Hubble 3D” (breathtaking). And then it was time to pry ourselves away and start driving north.
We drove as far as St Augustine and then found a hotel.
SUNDAY
Audrey had set a goal to dip her toes in the ocean while we were still in Florida, so we stopped by the St Augustine beach for a quick walk on the shore.
And after that, it was no nonsense for the next 600 miles. The girls did some homework in the car. Scooby Doo was noticeably absent.
To quote my friend Tanner, who saw the previous launch in April: “20 hours of driving. 8 minutes of excitement! TOTALLY worth it!!!” I’ll agree, but I have to add… the rest of the two days at KSC certainly helped tip the scales to the “totally worth it” side.
THE GOOD
- Endless refills on the tacky shuttle-shaped drink bottles.
- My favorite part of the tour, shuttle astronaut and NASA administrator, Charlie Bolden’s narration of the Shuttle Launch Experience.
- The hospitality of the KSC staff.
- The local ham club, who retransmits NASA launch info on their repeater.
- The kind strangers on Twitter (@Redshift42 & @ageekmom) who hooked us up with one last ticket.
THE BAD
- The two viewing places with the TV screens did not have a good view of the sky.
- The non-standard headphone jack on my Yaesu radio meant I had to hold the scanner up to my ear… plugging in the ipod earbuds caused it to transmit continuously!
THE UGLY
- That ISS Building could really use a make-over.
Countdown
0I don’t normally post song lyrics to my blog. But today is a pretty special day for me, and I think Rush captured the spirit pretty well with their song “Countdown”, from their Signals album, which was released in 1982.
Countdown
by Rush
from “Signals”, 1982
Lit up with anticipation
We arrive at the launching site
The sky is still dark, nearing dawn
On the Florida coastlineCircling choppers slash the night
With roving searchlight beams
This magic day when super-science
Mingles with the bright stuff of dreamsFloodlit in the hazy distance
The star of this unearthly show
Venting vapours, like the breath
Of a sleeping white dragonCrackling speakers, voices tense
Resume the final count
All systems check, T minus nine
As the sun and the drama start to mountThe air is charged — a humid, motionless mass
The crowds and the cameras,
The cars full of spectators pass
Excitement so thick, you could cut it with a knife
Technology high, on the leading edge of life~
The earth beneath us starts to tremble
With the spreading of a low black cloud
A thunderous roar shakes the air
Like the whole world explodingScorching blast of golden fire
As it slowly leaves the ground
It tears away with a mighty force
The air is shattered by the awesome sound~
Like a pillar of cloud, the smoke lingers
High in the air
In fascination
With the eyes of the world, we stare.
New York City
1Since the girls were tracked out for all of April, we decided to take a short trip somewhere, but we were not sure where we wanted to go. Audrey said that she had always wanted to go to New York City, so we pointed the van north and made our way to the Big Apple.
We made reservations at the “Holland Motor Lodge” in Jersey City… it was every bit of classy as it sounds. We could open our window and see the traffic going into the Holland Tunnel.
As we pulled into the hotel, we stopped at the gas station next door to fill up, and a bright yellow Lamborghini pulled up next to our junky old minivan. Look, kids, you don’t see that at home!
Wednesday
We arrived on Wednesday afternoon, so we went on into the city for a first glimpse. This was our chance to figure out the mass transit system to and from the hotel. Somehow, I managed to get talked into eating at the worst Pizza Hut I have ever been to… blasphemy, in the city with world-famous pizza. As it was getting dark, we made our way to Times Square and inside the huge Toys R Us store.
Thursday
Thursday was an absolutely beautiful sunny day.
We planned to start Thursday off at the Statue of Liberty, and that’s where we discovered the “City Pass” ticket books, the best deal of our trip: admission to six major attractions for one decent price. Our tickets included going inside the Statue of Liberty monument, that big block that she stands on (you can forget the crown — that’s a several month long waiting list). The view from the pedestal was great, and it was just enough stairs to be rewarding, and not so much that you felt it later.
Next, we took a subway to the World Trade Center site. To be honest, it was a disappointment. There is not much to see there, and there is no organized guide (maps on street corners, etc) to tell you where you are or what is being built. For now, it’s just a big construction site. Sad that after nine years, there is still no proper memorial.
We spent the rest of Thursday riding a bus up to Central Park, and then exploring that for a while. The girls enjoyed climbing on the rocks, and I found a geocache.
Friday
Friday was significantly cooler than the day before.
First on our agenda was the Empire State Building. Our City Pass got us right past the ticket sales area and up to the observation deck. It was CHILLY up there, but the view was worth it. We spent a long time up there, sometimes coming inside to warm up, and later going back out to look at the city from 1000 feet up.
We had lunch at a nice little deli across from the ESB, and then we headed off to the Museum of Modern Art. I was happy that Audrey recognized a few paintings and artists (most notably, “A Starry Night” and Picasso).
We did not have tickets to get in to the special exhibit of Tim Burton’s work, but the lady at the entrance thought the girls might enjoy it, so she let us in. How nice! But her niceness was complemented by the mean woman who later started yelling at no one in particular (me) about not standing (or letting your kids stand) in the middle of the hallway… duh, then why did they put TV’s showing cartoons on the hallway walls?
My cousin Allison lives and works in Manhattan, and she agreed to meet us and show us around. First up was her office, an advertising firm on 7th Avenue. From there, we took a subway ride and short walk to her apartment on the East side. And last, she took us to John’s Pizzeria in Greenwich Village for a proper NY pizza.
After dinner, we had to part ways. We had tickets to see the Blue Man Group. The show was crazy, and the girls just loved it. You know how, at any show, there’s always some person in the audience with a loud and infections laugh? That person was Sydney. She had a bad case of the giggles that night, and the BMG kept her giggling all night.
Getting home was more of an adventure than it should have been. The show got out at midnight, and we SHOULD have just taken a cab. But we tried our luck with the subway and then the PATH to Jersey City. But the schedules change on the weekends, and it can be difficult to find where to make the transfers, and it looked like we were in for a long wait, and everyone was tired. So I flagged down a cab and $51 later, we were in the luxurious comfort of the Holland Motor Lodge.
Saturday
We still had a few tickets in our City Pass books, so we knew exactly where to go. First stop was the Metropolitan Museum of Art. This one was larger and had a wider focus than MoMA, so we were a little overwhelmed. After wandering a bit through a maze of European art, we found the cafeteria. I ordered a crappy cheeseburger and fries, and only then noticed that they had the most wonderful salad bar — so I got one of those, too. Acting on a suggestion from one of the museum volunteers (and because some of us can be somewhat obsessive), we spent the better part of our afternoon trying to find Hatshepsut, the Egyptian Queen. She did not disappoint.
Since the Met is on the east side of Central Park, and our next stop was on the west side, we decided to take a meandering walk through the middle of the park. Once again, the girls enjoyed climbing on the rocks. In fact, it was difficult to pull them away.
Finally, we made it to the Museum of Natural History. Unfortunately, the MoNH closes at 5pm (the Met closes at 9pm — we did that backwards). So we did not have much time to see anything. The charismatic man at the ticket booth spent half of our available time telling me his life story, and then he suggested that we spend the rest of our time at the planetarium show. We did, and it was awesome. Whoopi Goldberg told us all about stars and the sun.
We made our way south, through more of Central Park (and over more and more rocks). We found a little Jewish deli on 7th Avenue where we ordered some supper, but then were told by our very snotty waiter that we ordered all of the wrong things. We made amends by ordering cheesecake. If that guy ever visits NC, I hope he gets the royal Yankee treatment!
By that time, it was dark, and that meant it was time to use our last City Pass ticket at the Top of the Rockefeller Center. Apparently, they were filming Saturday Night Live as we passed by to take the elevator up. The view of the city at night was pretty cool (although I think I like Friday’s daytime view better).
As we were coming down from our high of being in the city for three fun-filled days, the sudden reality hit Sydney that our time was up, and that she was not going to be able to visit the candy store that my cousin had recommended. However, armed with his iphone, Daddy came to the rescue, looking up the store hours, flagging a cab and giving directions to Dylan’s Candy Bar, just 30 minutes before it closed.
The trip home was uneventful. And seeing our own driveway was second only to the warm welcome we had received at the luxurious Holland Motor Lodge.
Installing Ubuntu on LVM
0I am a big fan of LVM, the Linux Logical Volume Manager. It allows me to create, resize and delete disk partitions very easily. That comes in handy when you’re trying new things out. And it also has a nice snapshot feature, which I use when I am making a backup of a partition… while it is still in use.
If you use the Ubuntu alternate install CD, it gives you menu options for using and configuring Logical Volume Manager. But if you’re using the normal Live installation CD, you have to do it manually. Fortunately, this is not too hard. Below, I will tell how I do it.
- Boot the Live CD and open a shell.
- Install the LVM package in the Live CD environment:
apt-get install lvm2
- Tell LVM to look for existing volumes, and make them active:
vgchange -ay
- You may need to mark one or more physical volumes as being LVM pv’s:
pvcreate /dev/sdX1
- You may need to create a volume group:
vgcreate vglaptop /dev/sdX1
- Create the volumes that you want to use:
lvcreate vglaptop --name=ubuntu --size=10G
- Put a filesystem on the new volume:
mkfs.ext4 /dev/vglaptop/ubuntu
- Run the installer and do “manual partitioning”.
- Use the menus to match up the newly formatted filesystems with the different mount points(root, home, etc).
- When the installer finishes, tell it to “keep on testing”. Do not reboot.
- Mount the new root filesystem:
cd /mnt ; mkdir u ; mount /dev/vglaptop/ubuntu u
- Mount any other partitions below that:
mount /dev/sda1 u/boot ; mount /dev/vglaptop/home u/home
(actually, you only need the root filesystem and /boot — you won’t need /home and others)
- Mount the “special” filesystems:
mount --bind /dev u/dev ; mount -t proc proc u/proc
- Start up a “change root”:
chroot u
A new shell will start, using the new root filesystem as its root.
- Install the LVM package inside the chroot:
apt-get install lvm2
- Re-build the initial RAM disk:
update-initramfs -u -k all
(this step may be done for you when you install LVM)
- You may need to update grub:
update-grub
- Exit the chroot shell:
exit
- Cleanly unmount everything:
umount u/dev ; umount u/proc ; umount u/home ; umount u
- Reboot:
reboot
And when it boots up, it will load the kernel and initramfs, and then it will mount the root filesystem, which is on your new logical volume!
Photo utility – renrot
0When I take pictures with my digital cameras, they name the image files something like this:
- Wife’s Nikon camera –
dscn0115.jpg
- My iPhone –
img_0367.jpg
- My Panasonic camera –
p1070126.jpg
I tend to let the images pile up on the cameras for a while, and then I copy them all onto our file server. I start off by dumping them all into one big folder. But then I sort them into folders based on the date and the event, with names like “pictures/y2010/2010-02-14_chinese_new_year
” for events and “pictures/y2010/2010-02
” for the random shots. I don’t mind this process, and it’s actually kind of fun to review them as I am copying them to our file server.
I should note as an aside, when I worked for Ericsson’s research lab in Singapore, I was talking to one of the researchers who had studied the many ways that people could organize and categorize photographs, both paper and digital. It turns out that a huge majority of people they studied tended to associate photo sets together, based on relative dates. That is, if you asked for a particular photo, they would think “that was about the same time as Bob’s birthday party, so it must have been in August”.
I know that there are newer ways to organize photos, with databases and “tags” and what-not. Mac people really love to let the computer take care of those details. But I still like the idea of using folders with dates… old school.
Since I am dealing with dates and times of photos, it seems a little silly that all of my photos are named using dumb serial numbers. I find myself looking at the image’s EXIF properties, the information that the camera stores about the image — when and where the image was taken, what the camera settings were, etc. This seems a little tedious.
I recently found a utility called “renrot”. It’s primary job is to read the EXIF data from a photo, and rotate the image to match the EXIF rotation flag. That is, it rewrites the image so that it will load from top-to-bottom, which makes it more compatible with less-than-intelligent viewers — like some digital picture frames. But while it’s doing that, it also renames the file based on the time and date of when the photo was taken.
So now I can start by going into the directory that contains my big pile of photos and doing this:
renrot --name-template %Y%m%d-%H%M%S --extension jpg *.JPG
If I wanted to be careful not to mix the iPhone pictures with the Nikon pictures, I could do this:
renrot --name-template iphone-%Y%m%d-%H%M%S --extension jpg IMG_*.JPG renrot --name-template nikon-%Y%m%d-%H%M%S --extension jpg DSCN*.JPG renrot --name-template pan-%Y%m%d-%H%M%S --extension jpg P*.JPG
If I want to be a purist, and just rename the photos without actually rotating the image, I can do that, too.
renrot --no-rotate --name-template %Y%m%d-%H%M%S --extension jpg *.JPG
Pretty cool.