Friday, August 03, 2007

My First Vista Experience

More Entertaining

I've personally been avoiding Microsoft Vista since it came out, mostly because I have a real OS on my laptop and one that works reasonable well on my work computer. I've occasionally used Vista in passing, moving the mouse around, watching the pretty glass window border effect but never really digging into it until today.

Normally my duties at work are purely sysadmin, building and maintaining servers and other tech support things. This morning due to a shortage of staff I once again donned my tech support hat and began working on a new Lenovo IBM Thinkpad with Vista Home Premium. The users was having issues with the amount of disk space taken up and wanted Mozilla Firefox re-installed on it. Shouldn't be too difficult....

Space Requirements

The journey begins with me first determining what's going on with the disk space, and why there's only 5Gb free. An overview of the hard drive shows that it's 56Gb total, but split into a 5Gb EISA partition and a 51Gb NTFS partition. I'm assuming the first one is part of the Thinkpad pre-install so I don't bother with it too much. After cruising the directories I find some that are large (5gb or so) and also look like Thinkpad specific pre-installs. Since they're labeled software, drivers, etc I remove them since all this seems useless with the machine up and running already. After all this I end up with 8Gb free (wtf?). I eventually find that most of it is tied up in user data that was moved from a previous laptop. Okay, so first problem is solved and it didn't really involve and Vista specific things since it's the same procedure under WinXP. Off to a good start.

The second issue I figured shouldn't be anything special; uninstall the old version of Thunderbird, reinstall, and load up the old profile. This is the point where I was introduced to the wonderful new eXPerience that is Windows Vista.

Safer

First I go looking for Add/Remove programs, but it's renamed, it's now under Program and Features (Classic view). Okay, name change, eh it happens. I open it up, and watch the programs load almost like from a webpage, they just sort of "fill down" (it even has a progress bar in the "address bar"). I'm too quick for it and see Thunderbird so I attempt to click it, randomly it grabs my click and thinks I want some Thinkpad software instead. Even for all this initial loading it didn't load the program icons so they need to fill in as I scroll down. Annoying. I find Thunderbird again, and click Uninstall.

Nothing happens. Nada. Zip. WTF? No error, no explanation. Okay, so it's a weird bug, so I decide to just install over the existing app. In order to do this I go online to get the latest version. Or not.

Better Connected

I foolishly think that Vista saw the open AP that's literally sitting right next to it and connected. Nope. I look for the familiar wireless networking icon in the taskbar, but don't find it. "Ah ha!", I say to myself, "thinkpads have a on/off wireless switch on their front!". I'd been bitten by this oversight before, but not today. I find the switch, and it's on. Okay, so I dig through the control panel again and find the Network and Sharing center, which I find I have to turn on network discovery. Okay, so it's a security thing, not really user friendly but not horrible either. Eventually I connect it to the AP to which it says "Getting IP configuration" and "Refreshing IP address" (aren't that sort of the same thing?). It took a couple of minutes for this to complete, which on a MacBook I used earlier today it did it instantaneously. Foolishly, again, I assume I'm connected so I open IE7, to which I get the infamous "This page cannot be displayed" page. Wonderful. I want to invesitage this further, so I go to the Start button and look for the Run option to launch a command window from. It's not there, I look around briefly for it but give up. I attempt to connect to the campus wireless network now and after a minute of obtaining an address I'm on and can load up web page. Hooray, it's 2003 again! I switched back to the other AP just for kicks and see it now works, okay...?

Now that I'm finally connected I go and download the latest Thunderbird, and attempt to run it. I thought that it would do that infamous pop-up authentication box but no, I attribute this to the account being an administrator. While the install is running it halts, saying it doesn't have permission to overwrite a .dll in the Thunderbird directory. I try again a few times, know it won't work, and cancel the install. I go to the source an attempt to delete the Thunderbird folder manually, only getting the same permission denied error. Um, maybe I'm not administrator? Quick check shows I am, once again WTF?

Finally I decide to see if there are any updates, maybe there's a patch for something and a good reboot will fix things. An hour after I start the updates(14) it finally finishes and restarts. Nope, same thing.

Memories

Wonderful. I'll attempt a few other things, but overall my first in-depth use of Vista was disappointing. My final thoughts:
  • This is a dual-core 1.8Ghz laptop with 1Gb of memory, it shouldn't be this slow when trying to do simple default OS things (ie Program listing)
  • Yes, the WWW is great, but breadcrumbs, progress bars, and under-lined links all throughout? It's an Operating System, act like it.
  • How can I dig deeper? The Run dialog was simple and didn't confuse normal users, but it easily allowed a lot of hidden functionality for power users; regedit, msconfig, cmd, etc.
  • New security features. Yes, they're annoying, but if I'm administrator and I want to delete a file, let me. No how stupid it could be, it's my computer, I do what I want on it.
After dealing with these issues listed I'm going to avoid Vista as much as I can personally and professionally. Which doesn't seem like a bad decision, seeing as MS appears to have given up on it like another ME with news that they're already working on the next Windows. Of course they could just focus on releasing something built from the ground up, like their Singularity project, and actually produce something innovative and worthy.

Update:

Eventually I solved the problem by renaming the Mozilla Thunderbird directory and installing from scratch. My boss also discovered this was a bug related to the Logitech Quickcam software, which I promptly uninstalled.

Wednesday, July 25, 2007

My Comic-Con Schedule

Living in SD has more perks than just beaches and tons of sunshine. It's also host to Comic-Con International, which is fastly becoming not on only the comic event of the year but also the entertainment event of the year. With major movie studios and TV networks premiering new and old shows it's a must for any fan of the genres. Even though they're spreading out a lot of the bigger events over the four days instead of loading up Saturday as they have in the past, I will only be attending Friday and Saturday. Luckily these two days encompass what I'm most interested in seeing:

Friday:

10:30am-Noon - Warner Bros
I'm pumped to see the first looks at the comic based Whiteout and Watchmen films

2:00pm-3:00pm - Spotlight on Neil Gaiman
One of my favourite writers, famous for Sandman and Neverwhere. Also wrote Mirrormask which is a weird but awesome Alice in Wonderland type film

4:00-5:30 - Vertigo: Looking over the Edge
DC's more "adult" line of comics, featuring Sandman, Fables, 100 Bullets, V for Vendetta, and Y the Last Man

Saturday:

10:45am-12:00pm - The Simpsons
Featuring Matt Groening and other production members on a panel

12:45pm-2:00pm - Heroes
Featuring a clip from the next season and many cast members (Including Hiro)

2:15pm-3:15pm - BattleStar Galactica
Panel on the final season with multiple cast members and producers

3:30pm-4:30pm - Penny-Arcade
One hour Q&A with Tycho and Gabe

4:15pm-5:00m - Marvel Studios
Debuts of the upcoming Hulk and Iron Man films, featuring Edward Norton, Robert Downy Jr, and Liv Tyler

5:30pm-7:00pm - Columbia Screen Gems
Featuring looks and discussion of Superbad, Resident Evil 3, and the awesome looking 30 Days of Night

Whew! These days are going to be packed! Unfortunately I probably won't make it to all of these, due to the lines that form before some of the bigger events, but there should be enough space in there to queue up before the ones I really want to make it to. Now I just need to make sure I pick up enough stuff on the floor to keep me busy while waiting.

Friday, July 20, 2007

Debian Software RAID Setup

The Problem

Over the past few years space on my server would increase based on the deals found on sites like Slickdeals. After some time this lead to a mishmash of two PATAs and one SATA at 120Gb, 160Gb, and 200Gb respectively on my personal media server. Glad as I was to have all this space it started to become disk management issue since I wanted the bulk of the space consolidated for media. Filling up one drive would require me to move data to another with more space, causing organization and software issues (NFS would not single export multiple mounts).

Remedy

Last week this all became moot when Fry's advertised a 500Gb SATAII Maxtor drive for 90$. My EPoX motherboard was capable for RAID-0 and RAID-1 so I figured it was time to upgrade to a terabyte and bought two.

The initial plan was to create a RAID-0 array (striping for performance), re-install Debian, copy all data, and remove the older drives for noise and heat reasons. With two of them PATA drives, they could stay in the system easily copy straight to the new array. The older SATA drive had the OS and I wanted to keep it around for config reference when I was re-setting up the server. Both of the SATA ports would be used for the new array, not allowing this SATA to remain in the system, this was solved by purchasing a Masscool PATA/SATA external USB enclosure and copying the data from there.

Issues

Once everything was hooked up I ran the RAID BIOS config, set the new SATAs for RAID-0, and booted up the Debian Netinst CD. Surprisingly the installer showed both 500Gb drives as /dev/sda and /dev/sdb, completely ignoring the BIOS set RAID array. After doing a bit of research online for the RAID chipset (VIA VT6420) I found that it wasn't capable for true hardware RAID and instead relied on drivers in the OS to function properly, aka "fakeraid". These drivers only really existed for Windows and not Linux. Eventually I did find ones for Linux, but they were binary only and didn't look too friendly.

I thought about using them, but then remembered that Linux can do software RAID. Having briefly heard about software RAID before I was suspicious until I read a few articles explaining it's virtues. After tracking down a how-to Software RAID for Debian before I knew it I had a software RAID-0 array running on /dev/md0. For screen shots check out this Ubuntu Server Install guide.

Debian Config

The biggest choice while running the install was which file system to us. I gave ext3 a try first, with formatted space coming up to around 870Gb. XFS came out to 932Gb which was better, but after reading XFS's disadvantages (no journaling for data blocks) I decided it wasn't the best choice. JFS was last, which I was running on one of the drives I was replacing. It had worked flawlessly for the past couple of years, proving itself in the type of setup I would use. Overall JFS was the best option, giving a total of 932Gb of formatted space, For comparisons sake, a friend with the same setup ended up with 840Gb using NTFS on Windows.

I started the OS install, designating the entire drive as /, but hit a bump when it came to installing GRUB, which said it couldn't install to the MBR. I tried a few partition schemes to no avail, getting "unable to create partition" messages for everything, including swap. After a bit of frustration I split the OS and data onto separate drives; a spare 80Gb PATA for the OS and the RAID for data. I created a basic partition scheme (600Mb for /boot, 70Gb for /, and 5Gb for swap) on the OS drive and then mounted the RAID on /home, since this is where the bulk of the data would go anyway.

Results

Debian finished the install without a hitch and soon I was booting into my new clean system. A few cp -pfr and hours later I had successfully moved my server to the new drive and array. Below are some technical details:

micheal@jezebel:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 70G 4.5G 62G 7% /
tmpfs 502M 0 502M 0% /lib/init/rw
udev 10M 60K 10M 1% /dev
tmpfs 502M 0 502M 0% /dev/shm
/dev/hda1 564M 37M 499M 7% /boot
/dev/md0 932G 385G 547G 42% /home

micheal@jezebel:~$ cat /proc/mdstat
Personalities : [raid0]
md0 : active raid0 sda1[0] sdb1[1]
976767872 blocks 64k chunks

unused devices: none
micheal@jezebel:~$ sudo hdparm -tT /dev/md0
/dev/md0:
Timing cached reads: 1210 MB in 2.00 seconds = 604.80 MB/sec
Timing buffered disk reads: 442 MB in 3.01 seconds = 147.07 MB/sec
Particularly impressive are results of 147 MB/sec on hdparm, which is leagues beyond the 60MB/sec seen on the original SATA drive. A few config changes over the next few days and the server was up and running normally.

Conclusion

Overall Linux's software RAID capabilities are impressive, not only can it do 0 and 1, but when re-compiling the kernel it has just as may options, if not more, than a traditional hardware card. Performance is outstanding, without being limited by the RAID hardware it mostly depends on bus and CPU speed, which are easier to upgrade than a RAID card. After this experience with software RAID I would not only recommenced it for personal use but enterprise also, proving itself in configuration, ease of use, and performance.

Thursday, July 19, 2007

Quick GMail Note Trick

Been a while since my last post, but I'm planning to start writing some more. To start off with I wanted to share a little trick I've been using with Gmail for the past week.

Whenever I want to note an interesting page I usually use del.icio.us to tag it and keep it around. However, I'm always writing little notes to myself with what I did to get this or that working, and del.icio.us isn't really designed for that task. Instead I write myself emails, and make sure they're seeded with keywords so when I need to search for them they come up. I could use Google Notebook for this, but I find it easier to shoot off an email instead. The trick I started using is the google +addresssing feature. Normally it's used for creating a spam address, but I found adding a +notes and then creating a filter to label it as a note and remove it from the inbox is a fast and easy way to keep them all organized.

Monday, March 26, 2007

Ripping Vinyl with GNU/Linux

Recently my Dad started sending me pieces of his vinyl record collection. He has a ton of good stuff from Led Zeppelin to The Beatles and everything in between from 65'-75'. My plan is to archive all the albums to my computer and do some other fancy things with them like converting each track to an MP3, allowing for easy distribution via CD or over the Internet. Below is the process that I used after doing many hours of research on and off line.

1. The Equipment
In high school I was able to acquire some relatively decent vintage stereo equipment before the prices shot up on eBay in recent years. Here's the list of hardware I used:
  • Technics SL-20 Belt Drive Turntable
  • Technics SA-110 Stereo Receiver
  • Technics SH-8XXX Graphic Equalizer
  • 64-Bit Debian GNU/Linux Computer
All the equipment except the turntable was in excellent condition, but after taking it to Classic Audio Repair in Normal Heights they replaced the RCA cable, belt, checked the speed, and recommended a Grado Green MM cartridge for improved playback. They also showed me how to adjust the tone arm's counter balance and the correct anti-skate setting. Everything is hooked up through the record inputs/outputs on each device and the sound is excellent.

2. The Software
Noticeably I'm a huge Geek, and one of my requirements for doing this was everything application must be Free Software. The one exception is I compressed the tracks to MP3 instead of OGG, this decision was made since my parents are the final destination and it will just make things simpler on their end. Here's the software I used for ripping, analyzing, processing, and encoding:
3. The Process
Before I rip a record I clean each record with a RCA disc washer kit, clean the tip of the stylus, and check that the EQ levels on the equalizer are all set to zero.

In Audacity I play the record watch the levels when it peaks, moving the record level slider correctly so it's right around 0 since I don't want it to be too loud and end up distorted. I hit record in Audacity and start playing the record, checking the levels and making sure the sound is coming through and then sit back and listen to the wonderful sounds of 30 year old vinyl playing away. Once the side is recorded I cut off the beginning and end silence and save it as a WAV file which is usually around 190Mb or so. I do this for each record, being careful not to bump the turntable or cause any excessive disk activity on the computer that would distort the sound.


Once all the vinyl is ripped digitally I process each WAV file through normalize-audio, which will boost the sound levels up to a normal volume acceptable for playback. The command is straightforward, just pass it a filename and it will only take a few seconds to up the levels.

After the audio is normalized I re-open the WAV with Audacity and use the Edit->Split feature to find the gaps between songs and cut the WAV into individual tracks. After the tracks are found I use File->Export Multiple to export through LAME each track as a 192-kbps MP3 file, with a generic file name and no ID3v2 tags.

Using the program EasyTag I then load that directory, and use the GNUDB manual lookup to find the proper album, click apply to all tracks, then save the tags and file names. This will rename the tracks correctly and fill out all the ID3v2 tags, making it a lot easy to catalog and use with MP3 players.


The final step is to archive the original WAV file into FLAC, which is a lossless compression codec, cutting the size of the file by about 65% but maintaining the fidelity of the original WAV. The command I use to do this takes a while but as you can see the compression is impressive:
flac --lax -mep -b 8192 -l 32 -r 0,16 SideA.wav -o ../flac/SideA.flac

190M SideA.wav
116M SideA.flac
4. Results
I tested the resulting MP3s in XMMS, Winamp, iTunes, and streaming through MusixIndex, which all worked as expected:


5. Conclusions
Fortunately my Dad took great care of his record collection, and they still sound great. The packing itself is still in top condition and even better than what I'd expect it to look like after 30 years. Unfortunately no matter how much you do to improve the sound quality, through equipment, cleaning, and filters it's unrealistic to expect the records to play as well as when they were new. The sound was still amazing, but occasionally there are the pop/clicks and sometimes distortion of the sound. Each record is different, some sound flawless while others (New Riders of the Purple Sage) are actually not circular anymore which causes the tonearm to skate some, adding a sort of swishing sound every revolution.

Even with some of the sound flaws, I've come to accept that that's the way it is. If I wanted a clean error free recording I'd pick up the CD and just rip that instead, but then where's the fun in that? Plus the MP3s and FLAC sounds exactly like the original record, pops and all, which when listening on a portal MP3 player gives you the feeling of warmth you'd expect from original vinyl.

Update

To address some comments:

The equipment is hooked up like this:
Tunrtable-> RCA-> Receiver-> RCA-> Equalizer-> RCA to 1/8 Headphone jack -> Line-In on a PCI SoundBlaster Live!
The sound card is roughly 7 years old, but has excellent Linux support and Creative was one of the first hardware companies to produce open source drivers back then. All other inputs and channels on the card are muted to avoid any noise.

The sound is through the equalizer to make sure all the levels were 0 before being send to the computer, it also gave me a visual clue to if the music was playing (occasionally I would mute the speaker volume). Plus, have you ever seen a Technics EQ from the early 1980s? The thing just looks damn cool when it's doing what it's doing.

When I recorded with Audacity I set the record level to coincide with the VU level, making sure it peaked at 0. Normalizing the audio was minimal and since each album had a different record level I don't have the annoyance of one being louder than the other.

I wanted to get the best quality I could (The new cartridge and cleaning gave the most improvement) but being that it is ~30 year vinyl I'm not going to be a huge stickler for perfection.

References
http://www.delback.co.uk/lp-cdr.htm
http://www.br0wn.co.uk/vinyltocd.htm
http://www.atpm.com/9.03/under-the-hood.shtml
http://www.kuro5hin.org/story/2004/9/13/11498/3759
http://www.linuxjournal.com/article/6628
http://home.att.net/~halbower/music.html
http://www.turntablebasics.com/advice.html

Friday, March 09, 2007

Quick Sysadmin Tip

Ever noticed you're running out of room on a partition and you'd like to free up some space quickly that may be hidden in unused directories? Here's a quick and easy way using the du command:
  1. Find the partition that's low on space and cd into it
  2. Do du -sh * | grep G to give a usage summary in human readable form and grepping out any dirs with a gigabyte or more
  3. Look at the results and see if there's any dirs you could remove, or go into further
  4. Repeat steps 2 and 3 until you've gone through the directory tree, removing any unnecessary files and directories
Sure it's only useful for large portions of space, but you could replace the G with an M to get more results. Searching for larger files over a gig is usually quicker and produces better results though.

Monday, March 05, 2007

Perpetual Reading

While editing my myspace profile today (don't even get me started) I was looking at my "book" section. At the moment I have the two books that I'm currently reading, which is different from most pages that have a long list of favorite books. I was thinking if I should list my favorites instead, and when doing so came to the realization that a few of my favorite books are not just ones that I read and put away, but continuously read over and over again.

Looking back over the years and what I've kept in my laptop bag I've come up with a list of these perpetually read books:
I could list these as "favorite" books, but at the same time I'm always at some point in reading them, constantly learning and understanding more about them, hence perpetual.

Tuesday, February 20, 2007

Xfce Desktop on Etch

Last week I decided to make the jump from Debian Sarge to Etch on my home media server. The upgrade was for the most part painless, although there were a few snags I hit that I will explain in more detail in another post. For now though I wanted to post a nice screen shot of my new Xfce desktop:


On the left is the main app panel featuring: xterm, K3b, VMware, GAIM, Grip, XMMS, DVD::RIP, Iceweasel (aka Firefox), and Konqueror. Finally the little mouse with the X is the Xfce application menu, then hardware temperature sensors (a little high actually) and system load information. The top panel is running six virtual desktops with a taskbar on the right side. The app that is currently running is DVD::RIP in GUI mode making an Xvid video out of the Talladega Nights DVD I recently purchased.

Wednesday, January 17, 2007

Random Debian Scripts

Today at work I decided to do make a few Debian scripts for generating a dynamic MOTD and auto-updating using apt-get and I thought I'd share.

Debian MOTD

The first script is a fun one and requires the fortune and cowsay packages. When run, it generates a cow saying a random message from the fortune quote program and writes it to /etc/motd. Cowsay isn't just limited to a cow, and a look through the documentation will reveal a whole range of ASCII art. Mine is set to run every night at midnight and it makes for some fun variety throughout the week. Here's an example of what a login looks like:
Welcome to Debian GNU/Linux 3.1!
_________________________________________
/ Q: What do Winnie the Pooh and John the \
| Baptist have in common? A: The same |
\ middle name. /
-----------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||

Linux jezebel 2.6.16-2006-03-28-mcw-01 #1
PREEMPT Tue Mar 28 21:32:57 PST 2006 x86_64 GNU/Linux
Debian Apt AutoUpdate

The second is for those who get tired of running the same apt-get update && apt-get upgrade command day after day just to keep their system up-to-date. The script is simple enough, using the -y argument to allow for unattended updates and writing verbose output to a log file.