Thursday, March 25, 2010

How-to (Part 2): Full read/write access to ReiserFS in Windows 7

A few years ago I did a good bit of hacking and wrote this article: How-to: Full read/write access to ReiserFS in Windows Server 2008 x64

This St. Patrick's day I was at a bar with a friend of mine from my old Community College days and we were discussion virtualization software.  Yes.  I am that nerdy.  I was bemoaning my usual complaint that VMWare Server 1.x, which I used in the original article since it supported raw disk access, takes an absurdly long time to start a VM on Windows Server 2008, and also Windows 7 (presumably Windows Vista as well).  This startup time is on the order of 6-8 minutes during which the entire system is hung and unusable.  He was curious why I didn't use something like VirtualBox.  I had been under the impression that VirtualBox didn't do this since it wasn't in the GUI or listed as a feature.  However, I was wrong.

My enlightened friend shared with me this manual page. So I finally had some options, it seemed.  It took a few hours of poking but I finally got everything working with VirtualBox and it is absolutely wonderful.

So here is how I did it on Windows 7:
  1. Install VirtualBox as normal.
  2. I copied the .vmdk files I'd used to set this up with VMWare.  If you don't have these files to copy then create a new VM in VirtualBox of the appropriate flavor of linux and do the installation as per the original article.
    1. You will need to support ReiserFS and Samba, make sure your setup includes these.
    2. Create the new .vmdk as per the linked page from the VirtualBox.  You can find the drive # by populating volume properties from the device manager.
  3. In order for the raw disk access to work under Windows 7 you will need to set the compatibility options on C:\Program Files\Sun\VirtualBox\VirtualBox.exe to run it as administrator.
  4. Link the new vmdk first to VirtualBox with the Virtual Media Manager, open the VMM and click "Add" to add the vmdk(s)
  5. Create a new virtual machine of the appropriate flavor of linux. If you copied files from a VMWare installation you will need to add a SATA bus to the VM's storage configuration and add the vmdk's to that controller.  If you installed from scratch in VirtualBox don't do this now, it will only complicate your life.
At this point you should have everything installed and be able to boot your VM, and share your files back to Windows.  The only problem with this is that VirtualBox is geared more to run as a consumer level virtualizer.  If you close the window the machine starts in, the machine will be forced to shut down.  This means that you would need to keep a window open, wasting space in your taskbar, just to access your files.  Fortunately, there's a way around that as well.

  1. Set the options on C:\Program Files\Sun\VirtualBox\VBoxHeadless.exe to run as administrator.
  2. Create a new text file on your desktop, name it "Start VM.vbs"
  3. In the file, paste:



    Set WshShell = CreateObject("WScript.Shell")
    WshShell.Run chr(34) & "C:\Program Files\Sun\VirtualBox\VBoxHeadless.exe" & chr(34) & " --startvm VBoxReiser", 0
    Set WshShell = Nothing
  4. Replace VBoxReiser with the name of the VM you created above
  5. Save this file
This is why you need to set VBoxHeadless to run as administrator.  You will be prompted to allow the program to run as admin, but then you will see no further windows.  Your VM will be running in the background without.  Since you've started this headlessly you will not be able to use the standard GUI to shut down the VM later, so you will need to create another VBS or BAT file, executing:
 
VBoxManage controlvm VMNAME acpipowerbutton

This will shut the VM down, assuming it is responding to ACPI signals.
    Any network configurations you had in VMWare should be relatively simple to set back up in VirtualBox.

    I've been running this for a few days now and it is so much better.  I no longer need to dread rebooting because of the horrifying start times from VMWare.  It was fun to do a nice bit of tech stuff out of work.

    --PXA

    Wednesday, March 10, 2010

    Perverting Common Wisdom (A stock market tale)

    "Perverting common wisdom, Nephew, is the mark of all great conspiracies" - Baron Vladimir Harkonnen (Dune, Frank Herbet)

    It's an accepted premise that to make money you need to spend money. And to spend money you need to have money. So by syllogism, to make money you need to have money. This applies to the stock market quite sensibly, and most people agree that you should start an investment account with $2,000 or else you simply won't be able to make the aggregate gains required to counter commission fees. Aggregate gains is very important, because it is really how you are to play the game correctly. Most stocks will not jump several hundred dollars, or for that matter several dozen dollars, in anything resembling a sensible period of time to hold a stock. Not without some major news coming out of that company.  So you're looking to make a few cents to a few bucks on hundreds of shares.

    But what if you don't have this $2,000 to invest, is it still possible to make money? With, say, $700? If you are careful, subtle, and lucky can you make not-enough into enough?
    To this end I'm starting a new blogspot site:  A Stock Market Tale
    Hello, Readers. I'd like to play a game.

    First, my rules:
    • I can only use my initial investment of $700, and any money earned from this initial investment
    • As I only have $700 and want to make the absolute most of it, I cannot pay for any service beyond my broker.  Everything I use for my research will have to be free.  No trials either, that's just lamesauce.
    • Every purchase will be my own decision, I will not overtly take tips.  I will be required to justify each decision based on clear and rational criteria.  This isn't to say I might not ask my friends for opinions on things, but I will never ask "What should I buy?" or accept "Hey, you should buy ____, I think it'll go big."
    • Sometimes I will have to stay in cash, but if I haven't made a move in 2 weeks I will declare game over.  Temporarily, at least.
    • If I lose too much I will declare defeat.
    Now your rules: (otherwise known as a disclaimer)
    • I have absolutely no idea what I am doing.  I am in no way implying that I have developed some super secret methods or intuition.  You will not, under any circumstances, consider what I say as any form of advice.  If I write that I am doing something it is in the interest of disclosure.  If you make any decisions based on what I say, that is your own fault and I cannot be held responsible because this is not advice.
    • What I am doing I am doing as my own personal interest.  It is obviously not my job and outside of any profits I make I am not being paid for any of it.  If AdSense on the side of the official blog make any money, it's a plus but it is not the point.
    • I am not doing this as an endorsement of any official broker or any companies I might invest in.  I do not intend to reflect onto my employer or any related entity.  
    • Please understand that I'm just a dude writing about stocks with no formal training or inside information.

    The plan of attack:


    Since I have a limited amount of money to invest I'm going to be looking exclusively at stocks priced at less than $10 a share.  This is the only way I can make a net profit, any higher and I won't make enough aggregated over the number of shares to amount to counter commissions.

    Since I have no news information other than what is freely available, and most of the companies I'll be looking at just don't make news, I will be relying purely on technical analysis to pick my stocks.  I will also be mitigating my risks using stop loss orders to sell my positions if they drop too far past a level based solely upon an analysis of the chart.

    As I buy and sell positions I will sporadically update the new site (A Stock Market Tale) with details of how I'm doing, and also why I'm moving the way I've decided to.  Hopefully it'll be interesting.

    --PXA

    Thursday, February 25, 2010

    Mac's iPad and other related musings, Part 2

    And we're back...
    This was a somewhat less depressing thought I had yesterday morning when I was walking to my morning train.

    I am a huge fan of Palm's WebOS on their 2 new smartphones, the Pre and the Pixi. I've had a Pre since June and despite the fact mine is physically wrecked I still think the OS is great. I hope Palm makes more money so they can use better hardware and QA. But I was thinking about WebOS applications, being written primarily in Javascript and also the new gaming capable APIs which I believe are in Java for direct hardware access. Java is a desktop language...and Yahoo! widgets are written in Javascript. Unfortunately, Yahoo! widgets suck. I haven't really seen anyone using them out in the wild, and of course they're only available on the PC.

    But what if it were possible to use certain WebOS applications AS widgets? The Palm Application Catalog could be extended to the desktop, and you could run the same games and utilities on both. I'd written an application to scrape the mbta_alerts twitter feed and show me if my train was delayed, wouldn't it be cool to have that on my computer and take advantage of the better network connection? This also creates a 2nd distribution channel for developers.

    The way I read it, Apple's trying to put the iPad somewhere between a laptop and a device like the iPod touch. Unfortunately that space is currently occupied by netbooks. For all their shortcomings, they have one major leg up on the iPad: They are a real computer. So if Palm were to create a system which would allow their WebOS apps to run on real computers, they can not only grab desktop space but can also invade that contested area for lightweight applications running on lightweight computers.

    As far as I know, no one's created anything that can run the same applications on a mobile device, on a low-power computer, and on a full desktop. Also, Palm has been pushing the idea of reliance on the "cloud", in WebOS devices information like installed applications, device settings, and contact lists are automatically synchronized to the internet. This capability is already there, wouldn't it be EVEN COOLER if you could log in to this desktop WebOS system and get all your installed applications?

    Garsh, I hope someone at Palm is paying attention 'cause I totally want this now.

    Wednesday, February 24, 2010

    Mac's iPad and other related musings

    MaxiPad. Moving on.
    When I'd heard about Apple's tablet announcement, I thought it was a joke. Everyone wanted a Mac tablet. For YEARS I'd hear about people wanting Mac to finally make a tablet or a netbook computer. What they finally put out was an oversized iPod Touch with an extra chromosome and gimpier than Lt. Dan, and while the usual sections of the computing industry immediately engaged in fellating the device a lot of people were left scratching their heads. It has 3G but is locked to AT&T, it won't multi-task, you can't install your own software on it (App store only), you need an adapter just to get a USB port, it has no camera, no flash support, won't play widescreen video, I'd imagine it has no microphone as well, no video out either. So...what do I use this thing for?

    Anyway, it did get me to thinking, which I guess is good.

    Over the past few years I've been watching as most of the last generation of evil empires try to rescue their public image by adopting transparent processes, on the surface at least. As contrast Apple operates in complete opacity, under a shroud of darkness. Hidden away from the world in his dungeon fortress, Barad-dûr, Sauron -- I mean Steve Jobs -- steers Apple in his single-minded quest for domination. Or something. Honestly, do you know what goes on there, 'cause I don't.


    This leads into my next thought. Over at Defective By Design (The anti-DRM folks who I love dearly), they made up some great posters for the iPad launch.

    This tagline: Your computer is our computer, is a theme I've seen slowly spreading through the industry over the past few years. The players are beginning to realize the surest way to ensure continued profits is to execute control. On the other hand you can also ensure a measure of quality, as Apple demonstrated by the stranglehold they've kept on what hardware their OS will run on. Microsoft plays the side of the coin where they give the customers a measure of freedom, they want to control the industry more than the customers. I'm sure they have aspirations to get there eventually but they're gonna start at the top and work their way down. They've started with the driver signing requirements in Vista and Windows 7. For now you can turn off the verification, but you have to do it on each boot. This is already causing problems for a set of end users and spells certain doom for alternative Windows drivers. It also paves the way for increased hardware costs as manufacturers are forced to submit drivers for approval just so their hardware is compatible with Windows Future-Version. Virtualization software, which often uses system drivers to provide more direct access to system resources and better performance, will be effectively required to ask Microsoft for permission to compete with Microsoft as they product their own virtualization software. This seems like a tremendous conflict of interest. A few years ago Microsoft filed a patent for a method of building DRM control into an OS kernel, I think this is the first step towards that end.

    Apple's interests, it seems, lay in squeezing their consumer base for cash. They've already begun teaching people to expect less capability for the same price. The iPad does less than an iPhone or iPod Touch and costs much more. The MacBook Air was a bad machine, and didn't even have an optical drive but cost more than any other laptop of similar capability. And they've been hiding configuration options on their OS since its inception. And as an amusing aside, one of the reasons cited for rejecting the Google Voice app from the the App Store was that having another phone application on the device might confuse their users. This is probably why all their hardware has rounded corners -- so their users won't hurt themselves by chewing the edges, because they clearly think people are that stupid.
    Their recent patent is for displaying advertisements through the OS. The filing includes a flow chart for how the OS could determine when to play an ad, and it includes checking to see if the user has pre-bought time. That's exactly how it sounds...Apple thinks there is a strong possibility that sometime in the future people will be willing to rent ad-free time on their own computers. The patent also specifies that the OS could disable key features such as the mouse or keyboard except when prompting for interaction to make it impossible to not watch the advertisements. The only way this will work is if people accept the idea that what they have paid for is not theirs. That a computer is similar to the digital tuner box that TV companies will rent you and that your use of the OS is just a service you pay for.

    Wow, I hope neither of these folks get what they want. I like being able to choose things about my computer, and I like the idea that I own it and can beat it into doing what I want provided I'm clever enough.

    More upbeat musing coming soon.

    Saturday, December 26, 2009

    VLC includes Santa Hat icon, offends Buddhist?

    A few days ago I noticed my VLC icon, the much beloved cone, had donned a red "Santa" hat. I thought it was a cute little "easter egg", and thought nothing more of it. This morning I was wondering if there was a plugin or if it would be easy to make a feature for VLC that involved the icon randomly swapping hats. Deerstalkers, fedoras, pressman's hats, baseball caps...just hats. For fun. I came across a recent thread on the VLC dev forums where someone was requesting the hat be removed or a patch be made to allow users to toggle the hat on or off during the Christmas season. This person was apparently incredibly offended the some developer thought it would be cute to give the cone a recognizable hat for a few weeks out of the year. I'm really curious if this person also gets offended at restaurants that put up orange and black streamers or cardboard witches in late October, or people who wear "What would Jesus do?" bracelets. I found a little survey generator and I'm going to try to embed it here and see if I get enough readership to actually collect some useful data here. Just for my own edification.

    The link to the thread is here: http://mailman.videolan.org/pipermail/vlc-devel/2009-December/070015.html

    [The survey period is over, it has been removed.]

    Monday, December 21, 2009

    Halleluja! AT&T: 1 year later

    In the wake of the SNL skit poking fun at AT&T's signal problems, I noticed it has been almost a year to the day since I bought an iPhone. Now while I managed to escape their service in July it took quite a bit longer for me to escape their contract. And I only now assume to have escaped the contract as I can no longer log into their website and I haven't recieved letters from any collection agencies. AT&T has failed to directly contact me on this issue: EVER...so I'm just guessing.

    So the adventure started because Verizon refused to allow me to try the Samsung Omnia without locking me into a 2 year contract. I had allowed my agreement to lapse and then purchased a BlackBerry Storm. But, when I tried to exchange the Storm for the Omnia I was told that I would be bound to a new 2 year agreement. Apparently the 30 day trial is shared between the phone and the service and any change to either within that time negates the trial.

    The Omnia was Verizon's final chance to retain me as a customer at that point and since they wouldn't let me see if I liked the phone enough to keep their service, I canceled my contract and left the store...heading over to the AT&T with my head hung in shame I asked for an iPhone. The rep hooked me up with my account, activated the phone, applied my RIT employee discount, sold me some screen protectors, and sent me on my way. Aside from a few odd hiccups at Wal-mart involving the phone refusing to work since it thought the SIM card was out, nothing seemed odd for the trip home. I brought the phone home and immediately set about jailbreaking it. The phone was working out pretty well for a while, apart from some of that GSM noise and sketchy signal. Over the next few months living in Rochester the signal problems grew worse and the noise became more annoying. I'm not sure if it was actually making it more, or if I'd just slowly grown to hate it.

    AT&T support seemed only grudgingly willing to help me concerning my poor reception. While I understand the description of the issue leaves a lot to be desired as a technical support request, these people are being paid to at least try, which they did not. And from a customer perspective separate from the technical problem, they didn't help me at all. These people refused to admit there were any issues, kept repeating that I was in a good signal area like saying it again would make it true, and they wouldn't even consider compensating me for the poor service by giving me even one-time discounts.

    I was dropping calls sometimes 3 times within a minute. It was horrifying. And I wasn't even in a major metropolitan area, I just had poor signal. And it wasn't my phone because as soon as I left my room, or stepped outside if I was in a particularly sturdy RIT building, I was able to use the phone perfectly well. As a former Verizon customer for several years I had never experienced the frustration of a dropped call. In fact, I can't remember it happening to me before this, EVER. This constant dropping of calls and failing to ring even once caused my overreacting mother to call the county Sheriff's office to investigate my apartment and make sure I was ok. I have NEVER been so angry at a phone company.

    Eventually, after almost 4-5 months of this I got them to consider this might be their problem. They offered to replace the SIM card on the phone, which I knew wasn't going to help, but I decided to play along since they were finally paying attention to me as a customer and not the enemy. Unfortunately, just a little after this I had to graduate and move, so we postponed the replacement until I had settled in my new apartment. When I called again after moving, the rep at the other end, while being slightly kinder than anyone else I'd spoken to up until this point wasn't any more helpful. I was told I was 3 miles away from the nearest tower, with the maximum range of GSM being...survey says...3 miles. The guy basically told me I was out of luck, there's nothing they can do regarding compensation, my options were either step outside every time I need to make a call and hope they build a tower nearby in a few months or switch carriers. So took the sensible option: I switched to Sprint when the Palm Pre came out in July. After ~8 months, I was finally free. Or ... crap.

    While Sprint was being really good to me, discounting me for poor service and eventually giving me a device which gives me flawless reception in my apartment for free, AT&T was trying to charge me a cancellation fee. They sent me 2 bills, each 2 months apart for the fee. They didn't call, they just sent me sporadic bills. I finally called them and I was again confronted as the enemy. I got through the first level which told me nothing could be done, and the next level who told me they couldn't do anything, and that level's manager who told me I was completely unjustified in asking for the fee to be dropped. (The fee they charged me to cancel the service I wasn't getting...yeah.) But he'd put it into arbitration just to get me off the phone. A representative from the cancellation department would contact me within a week.
    A week went by, then 2, then a month, then 2...and no call. Eventually it was December again, and I decided to pop into my att.com account to see if the fee was still there. And much to my surprise I no longer had an account with att.com. I can only assume that AT&T finally decided to drop the cancellation fee they had no basis for charging me. Greed is not a basis. But they must have been so embarrassed at their own unreasonable handling of my case and took so long to make a decision, that they decided not to call me.

    So, 1 year later... AT&T has completely spoiled any chance of my considering them a responsible entity. They are a bad company, with a crappy network, a slew of crappy phones, and some of the worst customer service I've ever had the displeasure to receive. They are a joke, and it is funny...in a very sad way.

    --PXA

    Sunday, December 6, 2009

    Bourgeois Beer: Sam Adams Utopias

    With a price tag of ~$200 per bottle, Sam Adams Utopias is a beer for those who feel a little heavy in the wallet. As it is also released only every 2-3 years, and it very hard to get ahold of, it has a reputation of being a fine beer for those who seek new and extreme flavors out of beer.

    Some tag Utopias as a "Super-Beer", and with an ABV of 27% it's certainly something beyond mortal beers.

    I managed to get ahold of a bottle through a friend of mine who still lives in Rochester near Beers of the World. I wasn't able to find it in the liquor stores near my apartment, which is ironic given my proximity to Boston. I picked up the bottle when I visited my parents for Thanksgiving.

    The bottle comes with a serial number which doubles as a discount code at the Sam Adams store for a free Utopias signature glass made by Reidel. Now that I've finally got ahold of that glass and sampled the Utopias out of it, both chilled and at room temperature, I feel it's time to write about it.

    At first, the swirl and look. The beer is almost completely un-carbonated, it sits heavy in the glass. Swirling it causes a noticeable coating to form on the side of the glass. It's not Stone Russian Imperial Stout or Old Engine Oil, but it's pretty thick. The beer is clear and dark, mostly an amber color like most beer. A little more towards the dark brown of a stout than the golden color you'd get in most lagers.

    At the sniff you start getting into it. There are hints of dried fruits, brown sugar. There's also a similarity to the Dogfish Head 120 IPA, or Imperial IPA, owing to the incredibly high alcohol content. It almost seems like it's trying to be a low power liquor or high power wine, like a warm tawny port or a sherry. Some sort of fortified wine or burnt red wine. A lot of reviews place it similar to a brandy but I think the fortified wine label fits better, it just doesn't have that angry burn of a full-on liquor. When chilled more red fruits come out of the sniff, wild berries, blackberries.

    On to the main course, drinking the beer. The mouthfeel is very satisfying. It's lighter than it looks but still thick enough to coat the tongue. Also not so thick it feels like I've chewed off a chunk of something. The beer itself is not like anything I've ever tasted, not with regards to beer, anyway. Just like the smell, it's more like a burnt wine than anything. There are hints of lots of farm fruit, but it's all subdued. Strawberry, black berry, raisins, red grapes, cooked apples, etc. They all taste more like a jam than the fruit itself. That subdued, soaking in sugar idea. When it's chilled it tastes more like a cleaner, more refreshing beer. Some of the sweeter flavors are toned down making it fruitier, more like a lambic beer. Even cold it's still incredibly complex. Warm, the beer takes on darker and sweeter tinge. The alcohol is also more pronounced. The dark brown sugar that was almost completely vanquished by cooling it takes center stage when it's room temperature. The burnt wine flavors are also a lot more prominent when it's warm.

    My recommendation for this beer is to chill it first, then allow it to warm as you drink it, so as to get the full representation of the flavors. Some of the more subtle fruit-based flavors get lost in the alcoholic might of the brew when it's drunk at room temperature.

    Also, my recommendation for this beer is not to buy it unless you're in it for the experience. The flavor just isn't too incredible, mostly because it doesn't taste like beer. You can get the same ideas by mixing a dry port wine with a really grape-y red wine...and maybe some of thick stout. This beer is in the same vein as the Thomas Hardy's Ale, that I also didn't like. Both that beer and this one are way too similar to a wine.

    While I have a tremendous amount of respect for the brewmasters that crafted these, I just want a clear distinction between beer and wine...these ground breaking beers blur the lines a little too much for me.

    Drink on, folks!
    --PXA