Joshtronic

Wireless Connection at Boot (pre-GUI)

Monday, 15 June 2009
A while back I got my wife a new laptop from Dell, got it set up with Ubuntu 8.10 and then proceeded to fight with YoVille! for a week or so prior. Since then, I still had a few action items on my list, specifically getting wireless working on boot / the network manager not prompting for a password on boot. See, my wife's laptop is set up to auto login (yeah I know, gaping security hole). Said auto login would be great, but then she has to enter a password in to unlock the keyring so that the network manager can connect to our wireless network. Kind of self defeating IMHO. So I finally set out to fix the situation, and started with my laptop which is currently running Alpha 2 of Ubuntu 9.10. To get wireless working on boot, I added an entry to /etc/network/interfaces
iface wlan0 inet dhcp
wireless-essid secret-router-name
wireless-key s:even-more-secret-passphrase
auto wlan0
Superb! Except that the network-manager showed that I wasn't connected. That's when I met the wonderful network-manager replacement known as Wicd. In Ubuntu 9.10 (and perhaps in 9.04) Wicd is included in the repository so installation was as easy as pie:
sudo apt-get remove network-manager network-manager-gnome
sudp apt-get install wicd
After a reboot I had a wireless connection and a widget to show the status. Keep in mind this was on the beater laptop and not my wife's. When I went to repeat the process on my wife's laptop I ran into a mess of issues. Specifically, the network interface was called eth1 and not wlan0. Also, Wicd was not in the repository for 8.10 (going to upgrade her soon, but that's another post) so I had to download it from the Wicd SourceForge page. All in all, it was a fairly minimal hiccup to get her laptop running as well, and with a small bit of hacking I was able to get the wireless auto connect working flawlessly when coming out of hibernation and suspends.

New Project: Function of the Day

Saturday, 13 June 2009
So I've bought yet another domain, but actually got a site up in a timely fashion this time. The site is called Function of the Day and it's just that, a site that presents a single programming function every day. Right now it only supports PHP, but the plan is to add more languages as time progresses. Assuming the site gains a bit of interest from the community, the sooner new languages will be added. Hell, if you really want to see the ball get rolling faster, get in touch, and I'll put you to work.

Super Awesome Setup Script, Yummy!

Sunday, 7 June 2009
The script better known simply as `sassy` was a long time coming. Every time I upgrade Ubuntu and then have crap fall apart to the point that I end up reinstalling I end up saying "Josh, if you had a script that would easily get a fresh install of Ubuntu up to speed for you, you'd be set". And set I shall be. I started building a script that includes a listing of all of my installed packages and updates all of the /etc conf files to get me there. This did include some changes in how my system was set up, specifically where I kept files. I've since moved everything into my /home directory, including my development web sites which are now symlinked back to /var/www to match my production server. The plan is to eventually move /home on to it's own partition so that I can reinstall the system and leave it intact. The script thus far is under 100 lines and is going to be a lifesaver on my next install (9.10 I will be performing a clean install). I won't be posting the source code as I feel the script is just a bit too customized towards my needs. I do recommend setting something similar up yourself, it's a very fun project and takes a minimal amount of Bash knowledge to get going. It will also help get you in the mindset of keeping backups. The only gotcha I've come across is that when restoring MySQL on Debian, if you restore the "mysql" database, you will end up hosing your install because the debian-sys-maint account's password changes. It's easily remedied, but I'd avoid doing a full import on that database if at all possible.

And finally, I upgraded my hard drive (part 2)

Friday, 29 May 2009
And so the story continues. After much difficulty installing / setting up my new hard drive, I decided to make matters worse by cloning my old Windows XP partition to one of the partitions on the new drive. After a small amount of research, I came across `ntfsclone` part of the ntfsprogs package. As quick as you can say "apt-get install" I had it installed and was toying around with it. My biggest concern was that I was coping a 400GB drive to a 500GB drive. I was able to clone my drive and boot it up successfully, albeit it was only reporting 400GB. Wait a second, where did my Vista bootloader go? Shit, lost it again. Before I addressed that issue, I went ahead and resolved my 400GB drive issue. Luckily, there was another application named `ntfsresize` that fixed me right up.

Okay, so now I'm at the point where I have successfully cloned my XP drive, but Vista was lost because of the missing bootloader. I went through the motions of running the restore bootloader from the installation disc... 5 times. Yes, 5 times, because after Googling around a bit, I found that the restore doesn't work all of the time, in fact it's very common for it to take multiple attempts before it works. "WOW", is all I can say about that. Now the repair did finally work, only now I could only boot into Vista, and no option for XP. Fed up, I went searching for an application to fix the glitch. Said application was Vista Boot Pro, which was well worth the $9.95 to fix my situation. The program worked first time and allowed me to add Vista and XP to the bootloader with the labels that I wanted. I've yet to find an open source alternative so that may end up being a project of mine in the near future.

And finally, I upgraded my hard drive

Monday, 25 May 2009
Was a long time coming, seeing as I purchased the 1.5TB drive back in February. Pre-upgrade I had a 500GB drive partitioned into two partitions. The 100GB partition housed Linux (Ubuntu 8.04 upgraded to 8.10 upgraded to 9.04) and the 400GB partition was Windows XP. Wait, what? To clarify, I still use Windows XP for audio production. The larger partition size was to accomodate massive amounts of audio in raw formats. In addition to my internal storage, I have a 120GB external Seagate which housed music, audio samples, VST Plugins, software installers, and a mess of other things.

Before I proceed with discussing the upgrade and issues I ran into let me tell you a little story. It's only since my latest computer purchase that I have had a computer that didn't use IDE drives. That being said, I don't have SATA cables lying around or even know much about them. The same day I made mention to a coworker that this would be my first SATA drive upgrade and that I would need to purchase a cable from the store, he offered to bring one to me the next day as he a whole box of them. So began my issues.

Initially I went ahead and removed the old drive and installed the new drive in it's place. The old drive was moved to the second drive slot and I hooked up the power to both drives, the original SATA cable to the new drive, and my coworker's cable on my old drive. Rebooted, checked the BIOS, only the new drive was showing up. Weird. After a few reboots and reseating of the cables I ended up moving my coworker's cable to my DVD burner, the cable from the burner to my old drive and rebooted. Everything showed up fine so I p roceeded to partition the new drive into 3 500GB partitions.

The act of partitioning ended up being a bear as Windows wasn't too fond of the partitions I had made with `fdisk`. Sadly, Windows XP saved the day and I set up my 2 Windows (XP and Vista) partitions and left the rest for the Ubuntu install to manage.

After the partitions were set up I had to make a decision about what order I should install the operating systems. First pass I went ahead and decided on Vista, then XP then Ubuntu. This didn't seem like much of an issue until I learned that the Vista Bootloader was new and improved, and that XP killed it when I installed it after Vista.

At this point, I couldn't boot into Vista and figured, "might as well give the Ubuntu 9.04 Live CD a shot". A previous post of mine was a rantfest concerning the Ubuntu upgrade process and how Compiz stopped working after my upgrade to 9.04 due to a faulty driver. Well guess what, Live CD worked flawlessly. I suppose I could appologize for what I directed at Mark Shuttleworth but in all actuality the Ubuntu upgrade process is still pretty immature IMHO.

It was around this time that the fun really started. I was going to start reinstalling my two Windows partitions (XP and then Vista) when I started having drastic issu es reading my installation media. After multiple attempts with different [Dell certified] copies of Windows I decided to start messing with the SATA cables again. At this point my DVD-ROM was using my coworker's SATA cable. I said to my wife "I bet if I swap the cord back to the original cord Vista will install properly." Sure as shit that was how it went.

Windows Vista installed, Windows XP installed, and now on to Ubuntu. Surprisingly the Windows installed went relatively smooth after the cord swap compared to the Ubuntu installation. Ubuntu would crap out at seeminly random places during the install bitching about how it was unable to read the disc. A few retries and it finally installed without issue.

Wonderful! So now I'm sitting on a wonderful triple boot system. Unfortunately the story doesn't stop here. At this point I decided to test the DVD-ROM under different circumstances. I cycled through all 3 cords, different connections on the motherboard, different power cables I even completely restored the configuration back to the original. Just for reference, I was all sorts of pissed off at this point, specifically because the coworker that OFFERED me the cable without any solicitation had something insightful to say to me when I told him the situation. He said, and I quote, "beggars can't be choosers". To say the least I gave him a huge piece of my mind, and subsequently decided that I will never take anything from said person in the future. Long story short, the drive was unable to burn DVD's, CD's were sporadic (1 out of 3 successful) and eventually, the drive just flat out stopped showing up if I was using the coworkers cable. So $6.99 (plus tax) at the recently re-opened CompUSA later I owned a new cable, and all 3 drives were showing up correctly. Unfortunately, the DVD-ROM still won't burn discs correctly and I eventually gave up on it.

Stay turned for Episode 2: Migrating Data to the New Drive or: How I Learned to Stop Worrying and Love NTFSProgs.
Older »