Henry Griggs Rambling
Recent TopicsVisit to Australia 2002
Sydney house 2002
Circular Quay 2004
Circular Quay 2002
Centrepoint Tower 2004
Oz Birds 2004
Oz Birds 2002
Bridge Climb 2002
Popular TopicsGallbladder removal
Photo of the day
Geek Alaska 2003
UK in 2003
Geek Caribbean 2002
Photo Of The Day
Installing Slackware 9.0 on a Sony Vaio Picturebook C1XS
16th August 2003
I will be going on the 2003 Geek Cruise soon. This time, I didn't want to be without a laptop. I wanted a small laptop, the smallest laptop I could get. The cabins on the ship have a small room safe, and those safes are not very big. I want my laptop to be able to fit in the safe. And anyway, I just wanted a small laptop. Small is good, smallest is best. I did a lot of research and found the laptop I wanted - a Sony Vaio Picturebook. Of course, I wanted a brand new one, with all modern conveniences. That was going to cost about $2,500. Big money for something so tiny. I was geared up to get one, when I discovered that Sony USA had discontinued the model. I was disgruntled to say the least.
I checked out Dynamism.com. They specialise in the smallest laptops, the latest and the smallest. They import them from Japan where small is king. They are expensive. But they sure carry some nice stock. Have a look at their main page and see those models. I am envious.
I also checked out Emperor Linux, as they sell laptops of all sizes, including the tiny ones, with Linux pre-installed. Did I mention that whatever laptop I got, it was going to be a Linux laptop? Emperor Linux advertise regularly in Linux Journal, and I'd seen their ads for a while. Nice looking laptops, and the pre-installed Linux was a fine feature. They even give you a choice of which Linux, offering my favourite Slackware. But once Sony discontinued the Vaio Picturebooks, Emperor Linux didn't have them either.
I also spent a fair bit of time on Linux on Laptops, researching which machines worked best with Linux.
So I turned to eBay. I spent weeks researching the prices and the models, and my needs. I settled on the C1XS model. It's a 400 Mhz Crusoe CPU, 64 to 128 meg RAM, and a 12 gig hard disk. These machines come with external floppy and external cdrom. I went looking for a package that had everything I needed. It took a while to find an auction that had almost the full suite of items, and from a seller who had good feedback, and it appeared they were selling their own machine and not just flogging off something that had arrived on their doorstep. The one I had my eye on didn't have the Rescue CDROMs, didn't have any manuals, looked a bit battered, most probably had a non-working camera, and had a battery that didn't hold a charge. Perfect. I bid for it, I won it. Paid $540 for it. I was happy with that. It arrived a week later. It was battered. It was grimed with food. I cleaned it. I cleaned it fastidiously, feeling a bit like Monk. Once clean, I assessed it. Sure, it was battered, but it worked fine. It had great potential.
It had Windows XP on it, a fairly raw install. All I know about Windows XP is how to turn it off. I can't use this stuff. Horrible user interface. It had to go. I don't do Windows anyway. I use Linux, and I use the Slackware distribution.
The cdrom drive attaches to the laptop via a PCMCIA card. The floppy drive attaches via USB. I plugged both these devices in, put the first Slackware boot disk in, and fired it up. It booted from the cdrom which pleased me. Some of my machines haven't in the past and I had to resort to creating floppy disks and booting from that. But not the laptop, it booted from cdrom perfectly. I started the installation, used fdisk and removed all the partitions, and then created the two Linux partitions. Started the setup program, started the swap partition and put a filesystem on the other partition. Time to install Slackware. Oops. It couldn't find the cdrom.
The end result is this. You can boot from the CDROM or from the floppy. BIOS controls that. But once you've booted, unless you have drivers to handle the PCMCIA card, you can't get access to the CDROM. And if you don't have drivers for USB, then you don't get access to the floppy drive. There I was with a laptop and no operating system. A useless piece of technology. I tried to put Windows 98 on it. Same problem. No PCMCIA CDROM drivers. I even tried RedHat and Mandrake, as I've been told that they are very good with laptops. Same deal, only harder to diagnose.
I did a lot of web research. Linux on Laptops gave me a lot of information. Some sites indicated that all I needed to do was type "linux ide1=0x180,0x386" or "ide1=0x180,0x386" at the boot prompt of the Slackware installation, and this would give me access to the cdrom. If I tried the first, it said immediately "kernel not found". If I tried the second, it would start to boot then do a kernel panic. It might work on other Vaio Picturebooks, but it didn't work on mine.
What I needed was get access to the PCMCIA drivers. Slackware lets you do this. You can create a floppy disk with the supplemental PCMCIA drivers on it. Then you boot from the install disk, login as root, and type "pcmcia", and load the floppy. I did that and discovered that it might work on a normal laptop, but not this one. The kernel didn't have USB drivers that recognised the Sony USB floppy drive.
What I needed was to get the PCMCIA stuff onto the cdrom. I remembered seeing something about doing this in the Slackware usenet group, alt.os.linux.slackware. I had saved the post, so I checked it out. Yes, I could build a custom install cdrom. I copied the contents of the cdrom to hard disk. On the cdrom, there is a README file (/isolinux/README) that described how to create a new cdrom. I cut part of that out and made a shell script. Then I copied the files from the supplemental floppy disk into place. I used the shell script, it created an ISO image and I burned it to cdrom. I had a custom install cdrom. I booted that, and tried it. Damn. The PCMCIA stuff was on the cdrom all right, but I didn't have access to it. I needed to put it somewhere where I did have access to it. How to do that?
I went to the alt/os/linux/slackware group, and asked them what my next step was. I had an extremely knowledgeable answer back from Jurgen within minutes, and a few other helpful ones a few more minutes later. Jurgen gave me all the info I needed.
When you boot from a kernel on the install cdrom, the kernel grabs a file called initrd.img in the /isolinux directory. This is a gzipped file containing the filesystem used during the installation process. This file is unzipped by the kernel or the boot process, and I think it's loaded into a RAM drive, and then it's mounted. So I had to get my data into that file. This is what I did:
I made mistakes along the way, and created 6 dud cds. One thing I learnt was that even if you have made all your disk changes in the mount, if you kept it mounted in one xterm, and gzipped it and renamed it and burnt it to cdrom in another window, all your changes do not get into the new file or the cdrom. You have to umount it, which triggers the sync and then your changes get written. I made a few mistakes in the pcmcia script too, but eventually I got it all right. The seventh cdrom was perfect. It worked.
I booted from the cdrom, logged in as root, typed pcmcia, and I heard the cdrom turn over as it was recognised. I checked in /var/log/messages and all was well. I started setup and this time it found the cdrom and that was all I needed. I leaped up, did the noisy, obscene, whooping Dance of Technical Success until Anne yelled at me to stop. I finished the installation. I used lilo on the MBR, and that worked fine right from the start. Sometimes, lilo won't install, but this time it did and all was well. Now my laptop has Slackware on it.
I learnt a lot of things from this exercise. I have often wanted to create custom install cdroms of Slackware. I have 3 desktop Slackware boxes, and 6 server Slackware boxes. It's a pain to do the "choose each package" method of installation for each one. Now I know how to create the custom tagfiles and then do a quick and easy installation. I also now know how to include extra installation software and automatically install it. This will make my job easier in feature.
Apart from that, I now have my tiny laptop ready for work. Here's a couple of photos showing two of my favourite themes for fvwm2. I've used fvwm2 since 1994. It's extremely functional. Earlier this year I experimented with BlackBox as my window manager. Oh wow. That window manager is awesome. It's lightning fast, it's lean and mean and it's got some great features. It's also got great themes. However, my fvwm2 setup has been optimised after 10 years of use so that I can get more done. I went back to fvwm2, but I sure lusted after the Blackbox themes. So I did some research, rejected the new fvwm2 theme setup, and created my own theme setup. Then I created themes based on some of the nicest Blackbox themes. These are two of my favourites. I plan on doing a documentation page showing how I do my themes and where I got my ideas from.
I found an XF86Config file on the web and I used it to set up X. It worked brilliantly. I didn't use all of it, but I used a lot of it. It's supposed to allow you to share the screen with the external display, but I don't have the manual and I don't understand that yet. I will work it out later.
What I can do is use the external screen attachment, hook up a monitor, and then use Fn-F7 to switch from laptop screen only, laptop and external screen showing same thing, and external screen only. When the laptop and external screen are showing the same thing, the aspect ratio on the external screen is off, and the screen looks extended vertically. But at least I can use it to switch between the laptop screen and a projector.
The laptop's sound system is a Yamaha YMF-744B. I thought sound was going to be a problem, as other documentation on the web indicated that you need to purchase OSS modules or get into ALSA. I took a rough stab at it when I compiled the kernel, and then left it to investigate later. I started KDE to check something and was quite surprised to hear the KDE startup music. I did an NFS mount to my Intranet radio station, fired up XMMS and lo, there was music. The little speakers are tinny, but good headphones made the sound very pleasant. When I compiled the kernel, I had used these settings
There's a built-in modem, a Conexant HCF V90 56K Data Fax RTAD. Early reports indicate that it is a Winmodem and therefore useless. However I did spot a recent report that indicated I might be able to use it under Linux. More experimentation needed.
The battery I got was pretty stuffed, but I knew it would be. I did some timing, and the battery would last 4 minutes after a full charge. I bought another battery, a reconditioned one from Sony. Different colour - a dark gray colour, not the original purple. According to the literature from Sony, the standard batteries keep the laptop going for 4 hours. You can get double size batteries that last 8 hours, and quad size batteries that last 16 hours. When battery life is discussed, you should take the information with a grain of salt. I have found that the 4 hour battery will last 1.5 hours if you do nothing, and about 1 hour if you are working the laptop. One guy on the Web said that the 16 hour battery will realistically provide about 5.5 hours. So you get about a quarter of the rated time.
I wanted some sort of indication what the battery charge was and maybe temperature. I had to do some research. Kevin Boone's web site gave me lots of general background on the issue, as well as some specifics about ACPI control on a later model Sony Vaio laptop. There are two types of monitoring and control of battery, temperature and suspend of laptops. There's the older APM (Advanced Power Management), which works with the BIOS' control of battery and temperature and suspend. It's been superseded by ACPI (Advanced Configuration and Power Interface) where most of the functionality is in software and not in the BIOS. So I had to use one of these two methods to get access to the information I wanted.
When I first compiled my kernel for the laptop, I didn't know anything about this stuff. I left APM turned on. After doing research, I noticed the fan. If I was working the CPU, like compiling, the CPU fan would come on and a blast of hot air would come out of the slots at the front left. When compilation stopped, the fan would stop. This was comforting. Even through the laptop got hot, I had hopes the CPU would not melt down.
I read that ACPI was a better thing to try. So I went to compile it into the kernel, and couldn't find it. Eventually, I discovered that if I turned on "Prompt for development and/or incomplete code/drivers" under "Code maturity level options" (first option when you do "make menuconfig", then I got access to ACPI. Under General Support, I made sure Power Management Support was on, then I turned off APM and turned on ACPI. I compiled and installed the kernel, and rebooted. I went to /proc and expected to find /proc/acpi with battery and temperature details there. No /proc/acpi. I checked dmesg and /var/log/mesages and /var/log/syslog, and it indicated that acpi support was available. Acpid won't start unless /proc/acpi has been created (see /etc/rc.d/rc.acpid) so I took that to mean that ACPI was not available on this laptop. It's not an up-to-the-minute machine. So I went back to the kernel, turned off ACPI, turned on APM, and recompiled and installed and rebooted. I checked /proc and there's a file called apm which gets regularly updated with laptop status. So yes, it looks to me like my machine can do APM but not ACPI.
So having established that I did APM, I went looking for battery monitors. For a start, there's a command line utility called apm. It just displays the power status (from battery, from power, charging, etc) and what percentage of battery power remains. Simple, informative, comforting, but not pretty. I also wanted a graphical monitor that I could display under X and show battery status. There was a primitive tool already included in Slackware called xbattery. It mightn't have any fancy features, but it sure worked perfectly. It showed me graphically the status of the battery and the remaining charge. I could even swallow it into my FvwmButton module and have it on my screen. But I wanted more. I hunted down a little WindowManager dockable applet called wmapm. This loads into my FvwmButtons just as easily and does pretty much the same as xbattery, but prettier. I stuck with it.
One thing I did notice after going through the APM/ACPI exercise was that now when I choose Shutdown from kdm, it turns the laptop off. I don't think it did that when I first got started with the laptop. But it does it now. So I tried a few other things. I use kdm as my graphical logon tool, and when I select Shutdown from that, it does shutdown the laptop. That's good.
I did manage to get the camera working (see below), and was happily pressing the capture button, when I missed the capture button and hit the power button. Oh bother. However I noticed that the power indicator was blinking, something I hadn't seen before. I looked up the PDF manual I downloaded from the Sony web site, and it seemed to indicate that I had put the laptop into suspend mode. I pressed the power on again, and the laptop sprang to life again at exactly the same point as when I had accidentally suspended it. That was good to know. I could suspend. Fn-Esc also suspends it. The dockable applet has provision for doing a suspend to memory and suspend to disk, but I haven't got either of these to work yet.
The manual talks about a hard suspend to hard disk, but I suspect that this is a partition thing, or a Windows thing, and I won't be able to make it work. I'm happy enough with the level of suspend that I do have.
One thing I am worried about is heat. The laptop gets hot and starts pumping major heat out through the vents. I wasn't sure about heat management, or fan control. I have read that laptops that need fan control by software will die if they don't get it.
After my experiments with APM, I was a lot happier because I could hear the fan turning on and off and the heat being pumped out. And now that I think back on when the laptop had Windows XP running when I first got it, it was probably generating just as much heat as when Windows XP was installed when I first got it. So I'm not as worried about heat as when I started, but I am still wary of it.
I plan on using the laptop primarily with wireless networking. I knew nothing about that at the start of this access. I am currently getting a crash course in it. Non-wireless networking was easy. Wireless is not so easy. Also, I'm not very familiar with PCMCIA cards and I'm going through a learning experience with them.
Wired networking success with Linksys 10/100 PCMCIA card
I have two Linksys 10/100 PCMCIA network cards. One came with the laptop when I bought it, and one I had bought several years ago to use with an ancient Toshiba laptop. Both these work fine. I can put them in, the PCMCIA card manager recognises them and starts up the network. I didn't have to do anything at all to get these working. Perfect.
Wireless networking failure with Linksys WPC11
I bought a Linksys WPC11 PCMCIA wireless network card and a Linksys WAP11 Wireless Access Point. They look good, great colours, but you have to have some sort of Windows to set them up the first time. That really sucks. The Linux documentation on the CDROMs doesn't exist, the Linux documentation on the Linksys web site is for other devices, and there doesn't appear to be any for these wireless devices. I've been using Linksys products exclusively for the last few years and they've been good. But with no Linux support in evidence, I'll reconsider this. I've heard talk of other devices that are more Linux friendly, so I might take these two back and exchange them for something that might work easily.
I managed to get the Linksys Wireless Access point working by booting to Windows and doing the install. That sucked. After the Windows part of the install, you got in and completed the configuration through the web server on the card. I don't know why the entire installation couldn't be web-based.
But that was easy compared to the PCMCIA card. That really sucked. I did the research, downloaded the wlan-ng software, compiled and installed it, got the whole thing set up and configured, and then it kept telling me it couldn't initialise the card. I did more research and found that I had the WPC11 version 4. Up till version 4, the WPC11 cards had been Prism based. Version 4 is a disguised Realtek card, and wlan-ng doesn't handle it. I read that Realtek had driver code on the web for it, but I read that a lot of people had problems with it. I gave up in disgust. I kept the Wireless Access Point as I already had that working. I have taken the PCMCIA card back and got my refund. Looks like I won't be going with Linksys any more. That's a pity. I've got their cable router and three switches and they all work fine. I've also got 2 PCMCIA 10/100 network cards and they work fine under Linux. The boxes even said "works with Linux". So maybe their purchase by Cisco changed things. If they aren't Linux friendly any more, I'll take my money elsewhere.
Wireless networking success with Dell TrueMobile 1150 card
I bought a Dell TrueMobile 1150 series PCMCIA card locally. Johnathan, the seller, said that it worked fine with his other laptops and it should work in the Vaio. So I bought it and took it home and tried it. When I plugged it in, the card manager recognised it and tried to load the orinoco_cs.o module. I didn't have that module. I did my research with Google and found that I could get the module in two ways. I could download the entire pcmcia package and install that, or I could go to here and download just the orinoco drivers. I did that. I downloaded orinico-0.13e.tar.gz, untarred it in /usr/src, then did make and make install. I checked and yes, I had the orinoco drivers that were previously missing. I restarted the laptop and this time it found and recognised the card. Doing "ifconfig" showed that the card was set up and configured and ready for action.
However, I had the Wireless Access Point right close by and it didn't show any activity and the card didn't show any access. I discovered the "iwconfig" command and it showed that the card had not connected to the access point. I fiddled with iwconfig, setting the SSID and the channel and the encryption key, but I couldn't make it connect to the access point. To start small and see what I could do, I turned off WEP in the accesspoint and then tried again. Perfect. The card could connect with the Access Point, I could establish a network connection, ssh to my usual box and edit this file. So I've got it working without WEP. That's a good start.
I took the laptop on the Geek Cruise, and the wireless connectivity worked fine. There was only one problem with it, and that was WAP on the ship reported back an incorrect DNS server. Much more knowledgeable geeks than me worked this out and then distributed the correct DNS address. So I would boot and connect to the WAP, then edit /etc/resolv.conf and put in the correct DNS server. Once that was done, the wireless system worked beautifully.
My next step is to learn more of the Slackware wireless configuration options, and learn to control the wireless connectivity. I need to learn how to set the WEP, set different SSIDs, set different configs for different networks, and learn how to shut it down and restart with a different configuration without having to reboot it. So I am reading the documents, and I am experimenting. I also bought the O'Reilly book Wireless Hacks, and that's proving very interesting for background knowledge.
I have discovered a problem that I can't solve yet. I can't switch between different types of USB devices without a reboot in between. To switch between mouse, floppy, PNY Attache, PNY Card Reader, Sony Camera, requires a reboot. There must be a way around this, like unloading the USB modules, but I haven't found it yet.
Getting the USB mouse working in conjunction with the pointing device on the keyboard was pretty easy after I read this guy's web site.
I edited my XF86Config file and changed the ServerLayout Section to have a second mouse input device. It now looks like this:
Section "ServerLayout" Identifier "Simple Layout" Screen "Screen1" InputDevice "Mouse1" "CorePointer" InputDevice "Mouse2" InputDevice "Keyboard1" "CoreKeyboard" EndSection
and then set up a second mouse section that looks like this:
Section "InputDevice" Identifier "Mouse2" Driver "mouse" Option "Protocol" "IMPS/2" Option "Device" "/dev/input/mice" Option "SendCoreEvents" "on" EndSection
When I plugged the USB Mouse in, it showed this in /var/log/messages:
Aug 18 09:45:44 elrod kernel: mice: PS/2 mouse device common for all mice
When I checked /dev, I found there was already a directory /dev/input, and there was a device there already called mice. So I didn't need to do anything with /dev, all I had to do was set up the two sections in XF86Config, restart the X server and it all worked. Dual mice.
I plugged the USB floppy disk in, and watched /var/log/messages. Hmm. Usb modules leapt into action, usbstorage kicked in, and it was recognised as sda. SCSI emulation. So I edited /etc/fstab and changed the floppy line to be this:
/dev/sda /mnt/floppy auto noauto,users 0 0
I inserted a floppy disk, typed "mount /mnt/floppy" and there it was. Working perfectly. Easy.
USB PNY Devices
I plugged in my PNY card reader to see how it would work with USB. Perfect. I watched /var/log/messages, and it recognised it and assigned it to /dev/sda, and I created a mount point (/mnt/pny) and added this line to /etc/fstab:
/dev/sda1 /mnt/pny auto noauto,users 0 0
Then I mounted it. Copied files to and from, and it worked perfectly. That's good because it lets me transfer photos off the Sony memory sticks. I also tested my PNY Attache solid-state device and it also worked perfectly. USB works fine.
Further Note: there seems to be confusion with the PNY devices after I've used the USB Floppy. If I boot up and just use the PNY devices, they work fine. If I boot up, use the USB floppy and then try the PNY devices, I get "No medium found" errors in /var/log/messages. I'll experiment wiht this, but I suspect that I might just have to unload the USB modules first, using rmmod. If that doesn't work, I will have to reboot in between devices. As I won't be using the floppy much, but will be using the PNY devices, then that won't be a hardship.
I bought the laptop with the understanding that the camera didn't work. Just in case, I downloaded Andrew Tridgell's capture program from samba.org/picturebook, compiled and installed it and then tried it out. Good news. The camera does work. I haven't worked out all the settings for the capture program yet, but the best results come from "capture -s" for snapshots. I start with "capture -s" and a small window appears with the current image through the camera in real time. Turning the jogdial changes the mode. Pressing the capture button saves snapshots of the action. Pressing the jogdial in stops capture. Now I've found a use for the jogdial. There's a dial on the camera itself, but I'm not sure what that is for yet. And it does save moving image sin .avi format, but I haven't investigated that much yet.
Apart from using the jogdial with the camera, I don't really have a need for it. The jogdial is a wheel on right side of the lpatop, down near the back. It's a dial wheel so you can move it around, and you can press it for click action. There are utilities that let you use it with X and other things. Go to Freshmeat and search on "Vaio" and look through the applications. I've downloaded a couple of them but haven't done anything with them yet.
I haven't tried the FireWire, nor the Infra Red. I don't have much use for these two things.
Addendum: [19th January 2004] I finally managed to upgrade the laptop to Slackware 9.1 and put a 2.6 kernel on it. It was very difficult, but I managed it.