Monday, December 12, 2005

read book now




BOOK Reviews



Linux and the Sony Vaio: A Report





Replies to critics

read book now






I have to admit that I did a crazy thing. Well, it all started when a co-worker bought a Sony Vaio 505FX and brought it into work. It was the cutest, thinnest little notebook I’d ever seen that still had an (almost) full-size keyboard and a trackpad. The dimensions are 10.2" x 8.2" by 0.94", but it looks even smaller than that. I fell in love with it instantly, but at first I was skeptical. Would I actually be able to type on that keyboard? Would I be able to use the trackpad? And, most importantly, would it run Linux?

Well, my co-worker let me borrow it for about a half an hour, which I spent typing and mousing into "Notepad". I was surprised at how well my fingers adapted to the keyboard, and I didn’t have too many problems with keys being in funny places. Also, I’m used to trackpads (my Mac PowerBook has one), although this one seemed just a tad on the jittery side. No big deal there.

Then, I took a trip over to the Linux Laptop Page at . The 505FX wasn’t listed, but it’s bigger brother, the PCG-737 was. The documentation for the 737 was pretty standard: Pentium CPU, NeoMagic chipset, PCMCIA support, yada yada yada. In other words, the thing was for the most part constructed out of commodity hardware. I guessed that if Sony was going to make one laptop out of standard parts, then it would be likely that the others would too.

Now, the Vaio comes with an internal modem, but not an internal CD drive, floppy drive or ethernet adapter. The external floppy comes bundled, so that’s no problem. The CD doesn’t, but I figured I could do without it; the only thing I would really ever use it for is the initial installation, and I remembered that there was some sort of network install available for Linux. If worst came to worst I could always borrow the CD from my co-worker and do the installation that way. After that I would no longer need the drive - If I ever needed to use a CD ROM drive again, I could mount the drive on my desktop machine as a shared network volume using Samba.

That left Ethernet. On the Vaio, ethernet connectivity is made available through PCMCIA cards (Nowadays called "PC cards", which I find confusing, although I understand why they changed it. As one friend quipped "’PCMCIA’ stands for ‘People Can’t Memorize Computer Industry Acronyms.’") I read to the Linux PCMCIA HOWTO, and it was pretty much the same story: If it’s commodity hardware, then it should work.

Now, I already had a modem/ethernet card from Global Village, a pretty nice one too. The only problem was, that it was originally designed for a Mac. Worse, it seemed that Global Village was somewhat adverse to publishing any technical specifications about their hardware; At least, scouring through the manuals and their web site I didn’t find any. The Mac issue didn’t concern me too much; After all, PCMCIA is supposed to be a standard, right? The other issue was somewhat troublesome however.

I mentioned this to my friend Stig, who said that he had an extra card that he wanted to sell, which was known to work with Linux. He would be in town in a week or so, and would bring it along with him.

After waffling for a few days, I decided to go ahead and get the Vaio. I got it at the San Bruno CompUSA (That’s the closest large computer store from here.) I decided not to order it over the network because I wanted to be able to return it easily if it didn’t work. I also decided to buy a 3-year extended warranty. The last time I "saved money" by not buying an extended warranty, the device (a boom box) jammed solid about a month after the warranty ran out. I told this to the salesman, and he apparently liked my story so much, he offered to extend the warranty to 5 years at no charge. (Then again, maybe they do that to everybody...I dunno.)

Got home, and decided to try out the Global Village card anyway. I figured that it would either recognize it automatically, in which case I could save myself some money, or it wouldn’t, in which case I would be no worse off than when I started.

Now, I currently have a RedHat 5.1 Linux CD. Version 5.2 has been out for several months, which has some better support for laptop screens, or so I hear. I hadn’t gotten that one - I tend to buy every other version instead of every one. So, I figured I’d try the installation with the 5.1 CD anyway. I decided to look in the RedHat manual to see what options were available for getting the data from my desktop machine (which has a CD-ROM drive) onto the notebook (which doesn’t).

It turned out that there were basically five different installation options: CD-ROM, external hard drive, NFS shared volume, Samba shared volume, and FTP. The last option looked particularly interesting: If I could install via FTP, then I could install the latest version of Linux right off of the Internet, without using my 5.1 CD at all.

Since I was installing 5.2, I knew that I wouldn’t be able to use the boot floppy that comes with 5.1. However, this turned out to be rather easy to solve—you can download the disk image for the boot floppy from the RedHat FTP site. Following the instructions in the 5.1 manual, I then proceeded to make a 5.2 installation boot floppy using the downloaded disk image. The manual also mentioned that if I was installing using PCMCIA, I would need a supplementary floppy with extra drivers. I downloaded that image too, and copied it to another floppy.

Next, I plugged in the Global Village card, the floppy drive, inserted the installation floppy, and hit the power switch. It went through the usual RedHat installation startup screen. I selected "expert" mode (since I wanted to know exactly what was going on). It then went through the usual DiskDruid partitioning setup. After that, it started asking me some questions: What ethernet driver did I want to use? I didn’t know which driver was the right one, so I tried each one, using the "Autoprobe" setting. None of them worked. So I gave up for the night and went to bed.

Next morning I got a visit from Leo Schwab, who brought his Linux laptop (an HP Omnibook 800) over with him, which had a LinkSys ethernet card. "Leo," I said, "can I borrow your Ethernet card? Thanks."

Popped the card in, plugged the other end into the network hub, and restarted the whole installation process. This time it didn’t even ask which Ethernet driver I wanted to use, it recognized it right away. I selected "install from FTP". At this point, it asked me to set up my network configuration. I set it to an unused IP address, gave it a netmask, domain, etc. In most cases, the default entry (i.e. where the installer "guesses" the netmask, gateway, etc.) was correct anyway, so I didn’t have to do much. One problem, however, was that the text cursor, for some reason, wasn’t showing up when I edited the text fields, which made editing a little difficult.

After the network was set up, it went to another screen where it asked me to enter the name of an FTP server, and a directory path for the RedHat files. I checked the manual to avoid confusion - it said that the installer needed to know where the "RedHat" directory was, not "redhat".

I went to my desktop machine and browsed the RedHat web page’s list of mirror sites at I looked around for a mirror nearby and picked one sort of at random. (My choice turned out to be somewhat unfortunate as we’ll see later.) I pointed my browser at that site until I found the "RedHat" directory, and the I typed into the installer dialog the parent of that directory. Hit OK.

At this point ethernet lights on the card adapter started blinking like mad; So did the lights on the ADSL router. "My God, it’s actually doing something!" A dialog showed that it was downloading a list of packages to install. After about 5 minutes, the package list came up and asked me what packages I wanted. Usually at this point I say "everything", but I decided not to this time because I wanted a system that was small, lightweight and not too confusing. Unfortunately, I didn’t know what half of these packages even were, so I didn’t know whether I needed them or not. (In my opinion, this is probably the worst part of the RedHat installation process. I know that the installer has text descriptions for the packages somewhere, because it displays them when the packages are being installed; but in the package selection dialog, all it shows you is the package name.) With Leo’s help, we winnowed the number of packages down to a reasonable number. I Hit OK.

The first package started to download. Very quickly, there was a turned out that the FTP site I chose was busy and refused the connection. I decided to skip that particular package and move on. I then realized I should have hit "retry" instead of "cancel"—sometimes you can get on a busy site by retrying the connection. OK, I said, I’ll just have to remember the name of that package and install it later.

Another 20 minutes passed, and there had been no further problems, but the install was going very looked like it would take about two hours, so we decided to go for a walk. On the way, we noticed a 1.7 million dollar house was having an "open house"...but that’s another story. (The kitchen was _big_!)

We got back, and discovered that there had been another problem, the same one: busy server. This time it was the Japanese documentation. OK, I did’t need that. Continue.

After three hours it finally completed, with 4 packages which didn’t install. (Out of about 600 total). At this point I decided to try and complete the installation—set up the mouse, X-Windows, etc. Unfortunately, the last stage, setting up the boot loader, had an error. Could it be, I thought, that one of the packages that had a problem was needed for the system to work properly?

The only thing I could think of at that point was a reinstall. I did’t want to spend another three hours, but fortunately there was a way out. I knew that most of the packages were already there. I also knew that the Redhat package manager is smart enough to deal with adding new packages to a set of existing ones. So I restarted the install, but I told it not to change the partition table or reformat the drive. Then, at the package selection dialog I selected no packages at all. Of course, this meant that it would still install the non-optional packages, the ones needed for the system to actually work. Fortunately, this was only about 20 minutes worth. This time I set the FTP server to "" which I know is a server with huge capacity. On Leo’s advice, I also made a boot recovery floppy this time when the installer prompted me to.

It got to the end of the install, but the error installing the boot loader was still there. "No problem," says Leo, "We’ll just boot with the recovery floppy and see what’s wrong." We do this and discover that the problem is simple - I forgot to set the main partition as being bootable. Duh.

That being done, we installed the boot loader and rebooted. It started Linux up wonderfully. Only one small glitch—looking at the bootup message log, it appeared that this version of the kernel hadn’t been compiled with "apm" support. "apm" stands for "Advanced Power Management" and it’s a standard hardware interface to allow software to power up/power down the machine, as well as put it to low power mode, sleep, etc. Useful for desktops, critical for laptops. I had selected the "apm" package in the packages list, and also told the installer to make sure that the "apm" daemon was started up at boot time, but that would’t do any good if the kernel didn’t have the apm code in it. Fortunately, reconfiguring and recompiling the linux kernel is easier than most people imagine it to be, although not trivial; If you’re running X-windows, it will even give you a GUI with checkboxes for all of the kernel options, and extensive help screens if you want them. I enabled APM, recompiled the kernel and installed the new kernel (being careful to keep the old one around...just in case. Fortunately, the new kernel has a different name, so not much needs to be done...)

I rebooted again with the new kernel, everything seemed to be working fine. The APM daemon started up OK. I spent some time tweaking the X-windows setup to look good in 800x600. One surprise - the trackpad (which looks to X-windows like a generic PS/2 mouse) actually seemed to be less jittery in XFree86 than it had in Windows.

At that point Leo went home for the evening, and his Ethernet card with him; I guess I’ll have to wait for Stig to drop by with his ethernet card before I can do any more downloading and customizing.


Talin ( Talin’s third law: "Politeness doesn’t scale."







Here’s a follow-up on the report I sent you a couple of days ago about my adventures installing Linux on the Sony Vaio laptop. I hope that last one didn’t have too many formatting problems; While I never purposely insert any codes or things into my messages, it’s hard to tell what a particular sequence of characters will translate into. For example, this paragraph is followed by a row of about 20 dashes.


My friend Stig came over for a visit and brought his spare LinkSys ethernet PCMCIA card. It works fine in the Vaio, so I bought it from him.

One minor problem is that in 640x480, the scaled pixels look really ugly. But since I run in X-windows most of the time, I can set the resolution to 800x600, which looks really sweet.

One thing I realized that I needed was some way to show how much battery time I had left. It turns out that there are in fact a lot of different Unix programs for monitoring power status. Most of these use the kernel APM services to get a number of interesting facts about battery and power level; But I wanted one that was small and wouldn’t get in my way, that would sit in the background of my X desktop.

I realized that the most convenient way to do this would be to have the battery indicator as a dockable applet. However, not every window manager under Linux supports dockable applets, so I realized I was going to have to switch window managers. The default window manager for Red Hat is Fvwm95, which gives a Windows95 look and feel. That’s the one I use at work. At home, I’m running "icewm", which I think is a little prettier (it’s themable), and seems to have better performance than some of the window managers I’ve tried.

However, for the laptop, I decided to switch to the WindowMaker window manager, because it supports dockable applets very well. WindowMaker looks almost exactly like the NextStep desktop, with a dock and everything, except that you can change the colors of everything.

I downloaded a couple of dockable applets, including a battery monitor, a CPU monitor, and an ethernet performance monitor. Unfortunately, you have to compile these applets to actually install them, but that’s easy enough; just type "make". Once they are compiled, you have to hunt around a bit to determine where the executables got put, and move them to some place useful, like /usr/X11/bin. Finally, to insert them into the dock, what I ended up doing is to run each applet as a seperate program, then alt-drag the running application into the dock. This creates an instance of the application inside the dock. Then, right-click on the dock to get the "settings..." dialog, and check the box that tells WindowMaker to automatically run the applet when it first starts up. There may be a simpler way to do this, but I haven’t figured it out.

I suppose the next logical task is to figure out how to activate the modem and PPP. But I don’t feel particularly motivated to do that right now, given that live ethernet cables are rather plentiful in my current environment.




Talin ( Talin’s third law: "Politeness doesn’t scale."




The battery on the Vaio is interesting; instead of being flat, like on most notebooks, it’s a " diameter, 8" long cylinder which is located right at the hinge between the display and the keyboard. According to the salesman at the store, this batter is good for about an hour and a half of use. You can also get a larger battery, which is two parallel cylinders (like a shotgun) which makes the notebook stick out a little in the back. Supposedly this battery lasts twice as long.

Just for a test, I decided to see exactly how long the battery actually would last. I started by charging it up to full. The battery indicator on the applet said 3 hours of time were left; I thought that might be somewhat optimistic. In fact, it turned itself off after almost exactly one and a half hours after I unplugged it.

Another interesting thing about the Vaio is that when it’s in sleep mode, it doesn’t actually store anything in RAM. Most laptops that I’ve seen have special RAM that has a "low-power" mode. Instead, the Vaio saves all of the working memory to a special partition on the hard drive. (When doing an install, you have to be careful not to wipe out this partition.) When you un-sleep the unit, it reloads the contents of RAM and continues.

The advantages of this are manifold. First, when the Vaio is asleep it’s really OFF, or near enough to it. My PowerBook, for example, draws a trickle of power even when it’s asleep, and if I leave it in sleep mode for more than about three days I’ll find that the battery has run down; and when I try to restart it, it reboots and then complains that it hasn’t been shut down properly. I imagine that with the Vaio scheme, you could leave it asleep for a much longer time safely, although I haven’t verified this yet.

Anyway, what this means is that even though I let the battery run down to nothing, I was able to successfully wake it up after restoring power. This is especially important for a Unix-based system, which don’t like to have their power simply cut off.

However, I realized after doing my battery test that there was probably more that I could do to extend the battery life. I decided to go over my kernel options to see what was available. For one thing, there’s an option "Make CPU Idle calls" which is supposed to allow the machine to go into low-power mode after periods of inactivity. In my kernel, the setting of this switch was set to "off". I haven’t had time to do another battery test to see if this had any effect, but I can report that it seems to have done no harm. There’s another option, "console blanking" which seems a bit more risky. We’ll have to see what happens with that one.

One thing that I’ve come to realize in this process is the difference that a ubiquitous network can make. My decision not to buy a CD-ROM drive was only possible because 1) I chose an operating system that was very network-aware, and 2) I now live and work in an environment where active ethernet connections are plentiful. Someone else on this site recently remarked about how applications were moving off of the disk and onto the network, so that you no longer need to buy a thesaurus program or CD-ROM street atlas when you can simply use one off of the web. With a network that’s fast enough and large enough, a CD-ROM really has no purpose. Of course, there are those advocates of Network Computing who say that even a hard drive can be replaced by a Network, but I’m not ready to buy that one yet. There’s always a sense in which I want to be able say "It’s my data, and I’m going to control it."

Of course, in hindsight it’s obvious that CD-ROM and ethernet are in competition as a distribution medium, but what was surprising to me, I guess, was that the point could be driven home so concretely. I mean, three hundred bucks worth of savings is pretty concrete.


Talin ( Talin’s third law: "Politeness doesn’t scale."



I noticed that one person wrote in wondering why anyone would bother with all of the trouble I have gone through. I realized that I hadn’t made my motivations very clear.

It’s true that I want a machine that lets me travel around, read mail, surf the web, etc. But I also want to travel around and continue to work on programming. Most of my programming these days is server-based, so it makes sense to have a programming environment that allows me to not only develop server software on the laptop, but connect to my servers at home and program on them as well. In the sense, what I’m creating is a full-fledged distributed development environment where I, and a number of other people, can collaborate on large projects irrespective of physical location.

It is my belief that the most important thing I can work on at this time is software that helps people interact with each other in interesting ways. My approach towards this is to immerse myself in Internet technologies, to eat, sleep, and breathe Internet. I believe I can do this faster in an open environment, where all of the mechanisms that I use are available to my inspection, than a closed one.

At the present time, I do not own a Windows machine, and while I do own a few pieces of Microsoft software (Office97 for the Mac, basically) I hardly ever use them. Is this because I have a deep hatred for Microsoft? It’s certainly true that I resent certain things that Microsoft has done to the industry. But I’m not really the hating type, and I’m content, for the most part, to live and let live.

I’m also engaged in a kind of philosophical experiment. This is not so much an anti-Microsoft experiment, as it is an anti-proprietary experiment. I’m very interested in the open-source development process. At the risk of being provocative, I’m beginning to think of proprietary software as a kind of mild perversion, sort of like selling indulgences. It’s true that the selling of indulgences was at one time an important part of the economy, and many people’s livelyhoods depended on it. But today nobody cares about that. The economy survived, and is in fact healthier than ever.

So part of my experient is to see just how far I can get, in terms of useful productivity, without relying on proprietary software. This does not mean that I’m not willing to _pay_ for software I use.

There’s also my sense of pride as a software craftsman. I’ve never really cared for the way Windows works internally or its APIs. I tried to write a music sequencer under NT at one point, and gave it up as simply too frustrating a task to be worth bothering with. Call me a geek, or a technical idealist if you will, I’m comfortable with those labels :-).

Finally, I find that there are certain things I can do in the Linux environment that are very powerful. For example, I just learned yesterday how to set things up so that I can do secure file copies between machines as easily as a normal file copy: "scp machinename:directory othermachinename:directory". Of course, you have to have ssh (secure shell) and various ssh utilities installed in order for this to work.

I have to admit, however, that administrating these machines is a fair bit of work. If I was simply running a standalone machine in my house, it wouldn’t be so bad, I could just set it up and leave it. However, I’m running a continuous connection to the net with a DSL router, which means that I have to maintain a firewall. And the thing about firewalls is that you need to look at your logfiles once in a while - active defenses being better than passive ones.

I’m also finding that unless I’m very careful, it’s easy to tweak one machine and forget to update the others; Not a serious problem, but it’s irritating when something works on one machine and not another. I’m working on setting some way of keeping these things synced together. Like everything else with Linux, someone’s probably already solved it, you just have to find the solution.

My buddy Stig, a serious Unix guru (I’m only a journeyman by his standard), has been staying over the last couple of days, and we’ve been doing some serious shell-script hacking. What we created is a script which runs every day, checks the log files from the web server (it parses the web server’s configuration files to figure out where the log files are), resolves the domain names in the log files, runs the resolved log files through Webalizer (a logfile analysis program that builds pretty pie-charts and bar graphs of traffic on your site.), then compresses the file and concatenates it together with all of the other log files for that week, leaving a new, empty logfile for the server to write to. Oh, and it also resets the web server so that it knows to start writing to the new, empty logfile instead of the old one. The script actually waits until the web server is fully reset before actually reading the log file, it does this by watching the process table. That whole script took about six hours to write, and was harder than I thought it would be.

Another thing I did recently was to set up IMAP. IMAP is similar to POP3, which is a standard internet protocol for fetching mail from a mail server. The main difference with IMAP is that when you open a connection, it initially only sends the mail headers, not the complete messages. You can then delete or move a piece of mail from the server without ever actually downloading it to your local machine.

I use Netscape as my mail reader, which is compatible with IMAP. I find that using IMAP with Netscape is very easy, it’s only slightly different than when using POP. For one thing, I now have two main folders at the top level, one called "Local Mail", and one named "" which is the name of my IMAP server. Both of these have an "inbox". The Inbox for local mail contains all of the mail that I received before I switched over to IMAP, and the inbox under janus contains all of the mail that’s currently on the janus server. I can click on any message to read it, just like I did before.

What’s really cool about this, though, is that I can now read your mail on multiple machines. For example, with my laptop I can look through my mail at just the messages I want to read. I can delete any messages I don’t care about. Later, when I get back to my desktop machine, I can access the same set of messages and move them into folders for categorization.

I noticed at one point that if I left Netscape running on both machines, both would show the same mail (I have them set to do an update every ten minutes, which is the default.) However the desktop machine has a number of message filters which automatically move messages from the inbox to various folders. Each time a message was moved, it would be transferred from the server to the desktop machine and then deleted from the server. On the laptop, however, what I saw was that a message that had been moved was visible, but had a little red "X" next to it indicating that the message had been deleted. I think what I should probably do is set up those message folders on the server rather than on the local machine, so that both machines will be able to view them.

This also means that from now on, if I switch mail clients, I will no longer have to worry about old mail that cannot be imported from one program into another. I remember being very annoyed when I switch from Eudora to Microsoft Outlook on my Mac. Fortunately, I’ll never have to worry about that anymore.

One other advantage of IMAP is that it can be made secure using SSL, while POP3 is a major security hole - it sends passwords in the clear.


Talin ( Talin’s third law: "Politeness doesn’t scale."




Talin is an award winning game designer, costume designer and artist. In 1986 he created the hit Amiga adventure game _The Faery Tale Adventure_, including all of the design, writing, programming, artwork and music for the game. Other software creations include _Discovery_, _Inherit The Earth_ and _Music-X_. He has on occasion strayed into an entrepeneurial role, and was the Director of Research and Development for The Dreamers Guild, a software development startup, for five years. He has also been known to give lectures at conventions, and write non-fiction articles (i.e. *rants*) from time to time. His interests include mythology, history, philosophy, political theory and science fiction. He is currently employed as a Senior Architect at Transactor Networks, Inc.



birdline.gif (1428 bytes)