Archive for June, 2007

What the hell is wrong with my monitor?

Sunday, June 17th, 2007

Here’s a picture:

Whoa is monitor

This is the same monitor that I’ve had for seven years, and it’s having some pretty drastic display problems, as evidenced by the picture. I thought it might be just a problem with the display settings, but couldn’t seem to fix it. I’m guessing that I dropped it one too many times, and the best fix would be to replace it. Maybe it’s a problem with the graphics card, but I doubt that.

Wireless access with a Ruby script

Sunday, June 17th, 2007

I wrote a Ruby script to automate the process of connecting to a wireless access point. Granted, it would be better if the wireless adapter connected on startup, but I haven’t gotten that far yet. The script is a command line executable. It scans for all available networks, or lets you specify a network not listed in the scan. Then it gives the option of connecting with or without a WEP key, and finally it connects using DHCP.

This is one of my first Ruby scripts and as such is a bit rough. It could probably be condensed and would really need some comments, error checking, etc. But here it goes, in less than 50 lines:

#!/usr/bin/ruby

class Wifi
  def initialize(devfile)
    @devfile = devfile
    @ssids = []
  end

  def scan
    @ssids = []
    for line in `wlanconfig #{@devfile} list scan`
      ssid = line.chomp.split(/s+/)[0]
      unless ssid == "SSID": @ssids.push(ssid) end
    end
    @ssids.push("other network")
  end

  def chooseNetwork
    if @ssids.empty?: scan end
    puts "Available networks:"
    option = 1
    for ssid in @ssids
      puts option.to_s + ") " + ssid
      option += 1
    end
    print "Select network #: "
    @network = @ssids[gets.to_i-1]
    if @network == "other network"
      print "Specify other network name: "
      @network = gets
    end
  end 

  def connect
    print "Connect using WEP?: "
    if gets =~ /^y/i
      print "Input WEP key: "
      wep = gets
      `iwpriv #{@devfile} authmode 1`
      `iwconfig #{@devfile} key #{wep}`
    end
    `dhclient #{@devfile}`
  end
end

if __FILE__ == $0
  wifi = Wifi.new("ath0")
  wifi.chooseNetwork
  wifi.connect
end

Drop a comment with any suggested improvements. It sure could use some.

Mighty Jump Drive

Monday, June 11th, 2007

I mounted and formatted my USB jump drive today. A fairly minor achievement, but a good application of what I’ve been reading in the Linux Administration Handbook about adding disks. When I plugged the jump drive into the USB port, it mounted automatically. The kernel assigned the drive the device file /dev/sdc1. So I went ahead and unmounted it, as follows:

sudo umount /dev/sdc1

Then I created a new file system on the disk, ran fsck, and remounted it:

sudo /sbin/mke2fs -j /dev/sdc1
sudo /sbin/fsck -f /dev/sdc1
sudo mkdir /mnt/jump
sudo mount /dev/sdc1 /mnt/jump/

That’s that. Nothing too complicated. With the jump drive under my belt, I’m going to create a RAID 5 array with multiple LVM partitions. Just kidding.

MadWifi, part II

Tuesday, June 5th, 2007

My shoulder is kinda sore from so much patting myself on the back. This happens to be my first post on the new system via a wireless Internet connection. After physically connecting my DWL-G510 wireless adapter to a free PCI port, I downloaded and installed the MadWifi driver and followed their ‘First Time User’ HOWTO to get the adapter up and running and connected to my local access point.

I think the next challenge will be to shut down the PC, move it back over to the other side of the basement (I had temporarily relocated it closer to the router so that I could connect to the Internet with my short Ethernet cable), reboot the machine, and see if I can reconnect. And after that, I’ll do some research to figure out how to configure the adapter to automatically connect at startup.

MadWifi

Tuesday, June 5th, 2007

Back to the task of installing a wireless network adapter. I have a D-Link DWL-G510 Wireless PCI Adapter that I want to install. As a brief anecdote, when I went to a computer store over a year ago to purchase the adapter, the salesman asked me which distro I was running, to which I responded that I didn’t know what distro meant. He rolled his eyes, handed me this adapter and asked me if I had any friends that could install it for me. Now I need to go about proving him wrong.

He did tip me off to a project called MadWifi, a device driver for wireless adapters with an Atheros chipset, and according to the MadWifi site, mine is compatible.

Great success

Monday, June 4th, 2007

I just logged into my install of Fedora 7 for the first time. And now I’m running the package updater. The updater is downloading .rpm files and installing them, 12 in all. Considering this OS has been out less than a week, that seems like a lot of updates, but I think a lot of them are standard, such as Firefox 2.0.0.4.

I fixed my DVD-ROM problem that I mentioned in the last post, but it’s only a temporary fix. Both my DVD-ROM drive and my CD burner were connected to the computer using the same ATA cable, and the CD burner (device 1) was working while the DVD drive (device 0) was not. So I simply rewired the drives so that the DVD drive was device 1 and the CD burner was not connected at all, and then the DVD drive started working. And in fact, I was able to boot directly from the install DVD, as specified in my BIOS, without the use of the Smart Boot Manager floppy. So I was able to successfully install Fedora, but the next thing that needs doing is to rewire the drives and get them both to work.

i386 it is

Sunday, June 3rd, 2007

It seems that I’m now on my way toward getting Fedora 7 up and running on my old PC. Fedora 7 became publicly available last Thursday, and I decided to download the install DVD image via a torrent provided through the Fedora Project site. I ran into a bit of a snag because I don’t know anything about my processor, aside from the fact that it was made by Intel (it’s a Pentium III). So when presented with a few different Fedora 7 installers to choose from, I wasn’t sure which to go with, until I made this (rather simple) discovery regarding i386 on Wikipedia:

The range of processors compatible with the 80386 is often collectively termed x86 or the i386 architecture; today, Intel prefers the name IA-32 however.

Problem solved. I downloaded the distribution and burned the rescue CD. I’m going to have to burn the full install DVD at work tomorrow, since I don’t have access to a DVD burner at the moment. But I was able to successfully run the rescue CD on my computer, using a Smart Boot Manager floppy; maybe I did retain something from my toils a few months ago.

The new foreseeable stumbling block, once I have the install DVD, is the fact that I think my DVD drive isn’t working. My tower has a DVD-ROM drive and a CD burner, but I could only get the rescue CD to load in the CD burner, which doesn’t load DVDs. So maybe I’ll need to fiddle around with the DVD drive before proceeding with the install, but I’ll leave that until another day.

UPDATE: D’oh. The above discussion of processor architecture and which distribution to install was way too complicated. As it turns out, this question is answered in its entirety on the first page of the Fedora install guide. Who would have thought?

What’s a little clutter?

Sunday, June 3rd, 2007

My workspace

Perhaps some of my “technical” difficulties could be easily solved with just a bit of tidying up. But perhaps not, and so, why risk it?