You are currently browsing the libretto tag archives.

Linux and the Libretto, Redux

Posted 2007.06.01 0.00 in Computers/Internet/Technology by Stephanie

Several months ago I wrote a bunch of little posts about how I was breathing new life into an old laptop. My wee little portable mini laptop, the Libretto 100CT, and a variant of Linux based on Damn Small Linux, which is based on Debian.

Well, it’s been about 6 months since I made the last post, which was about installing a solid-state hard drive. Unfortunately, the followup is not happy…

A few nights ago my Libretto stopped working, it wouldn’t respond. I tried to reboot it, and it wouldn’t boot. Grub error. That’s bad.

So, tonight I rooted around and found my stack of laptop hard drives. I had to try them all until I found the one that would boot. It’s the one I was using before switching to the CF card / hard drive. It was last used in November 2006.

Once I had the Libretto booted, I mounted the CF card in a PCMCIA slot. Or, I tried to mount it. It wouldn’t mount. Sigh.

After a bunch of messing around with e2fsck, I managed to get it to the point that I could mount it. Oh, joy. My /home partition is gone. All data lost. Yippee. And look, my root partition is mangled. I was able to get a few files out of /etc that I could use to get my old harddrive based install back up to where my solid state one was, but not my data files.

Then, I remembered! I had a backup!

After rooting around a bit, I found my backup. Another CF card, yes, but it hasn’t been used much so it should be ok. Shouldn’t it?

Aw, crap.

Well, my backup of the root partition was gone, and my home partition was from the end of November. So, about 6 months old. I really ought to have backed up more often. Shit.

Anyhow, long story short, my Libretto is up and running again, using my home-made linux that’s based on Damn Small Linux that’s based on Debian. But I’ve lost about 6 months of data. And I will not use cheap CF cards as a hard drive again, at least not without a regular backup plan.

So, let that be a lesson to me!

She Who Laughs Last, Probably Made A Backup!

Toshiba Libretto 100CT in surgery

Linux on the Libretto, Part VI

Posted 2006.11.03 1.00 in Computers/Internet/Technology by Stephanie

The story so far: The Libretto is a teeny tiny portable computer, about 8 years old now, with limited resources, small memory and small screen, but it is wonderfully conveniently small. I found a linux distro that worked relatively well in the available resources, customized it, broke it, fixed it, customized it some more, and finaly ended up with something that worked about as well as could be expected, and looked nice too.

So far, all I’ve been doing is in the realm of soft ware: Operating system, GUI, customizations, tweaking. It has all been software. Today, finaly, I got out the screwdriver and soldering iron.

There is actually not much one can do with a Libretto 100. The small size dictates what the options are, and the options are few. The stock Lib100 has only 32MB of RAM, there is a memory expansion unit that will double this to 64MB but it’s a custom proprietary part. You can’t build it yourself or use an off-the-shelf part, so RAM is not really an option – you either find the special part, or you don’t. And I already have it, so nothing I can do there.

That leaves only the hard drive. Now, the Libretto 100 came with a 3GB hard drive, and the BIOS can recognize drives up to 8GB in size. Physically it will take any 2.5″ drive that is about 9mm or less in thickness. Nowadays, you can get drives that will fit, that are 80 or 100GB. This is cool and all, and if you’re running linux the 8GB limit doesn’t affect you (just make a small /boot partition and put it up front under the 8GB limit, then the rest is yours to play with). But this is not where I want to go. My whole linux installation is currently about 400MB. I don’t need a lot of space here, the Libretto is going to be used for surfing, connecting to the office with SSH, and perhaps some email. 256MB is about enough /home for my limited use.

So, rather than going big, I want to go small. Take the minimalist Libretto philosophy another step further. See, nowadays, you can get solid state flash memory in sizes up to 4GB. And it’s relatively cheap. I got a 1GB compact flash card for about $20. See where I’m going with this yet? Hard drives have moving parts, they create noise, they are slow, and turning those disks and moving those heads takes power. Solid state memory has no moving parts, is very fast, and has very low demands on power. And all you need, to use a CF card instead of a hard drive, is one of these CF to IDE converter cards:
IDE to CF card

For size comparison, here’s a side-by-side image of the CF to IDE card with a compact flash card installed (not the card I’m actually using, a 64MB one I had laying around) sitting next to the actual hard drive I took out of my Libretto:
CF versus HDD

To get in and do the switch over, I had to take the Libretto apart. No problem, just pull the battery, remove seven screws, and you’re in:
libretto inside with hard drive
Click to enlarge. Hard drive in upper right, PCMCIA slots in upper left, motherboard beneath PCMCIA and hard drive, battery area across the bottom.

Then all I had to do was remove the hard drive and slide in the IDE/CF card.

Hahaha, if only it were that easy. No, this was one of those 5 minute projects that ended up taking 3 1/2 hours. Oh yeah. Love when that happens.

When I put the IDE/CF card in the Libretto…it refused to boot! Just asked for a disk. I swapped the hard drive back in, and put the IDE/CF card in an external drive case. Verified that it was properly partitioned, verified my linux was on it, verified that GRUB was installed. Check, check, check. Also — this proved that the IDE/CF card was working right, since the external hard drive case was working properly and it mounted and worked right. So I knew the IDE/CF card was OK. And I knew my Libretto was OK too – it worked fine with a normal hard drive.

This is one of those little puzzlers, right? The Libretto works with a normal hard drive, but not the CF hard drive. The CF hard drive works in a hard drive case. The normal hard drive also works in the external case. So everything works, just not the combination of Libretto + IDE/CF card.

Then, I remembered something. I had read, somewhere, sometime, in the last 2 or 3 weeks. Something about somebody having a problem with a Libretto and some particular hard drive. Something about grounding a pin. One quick Google later, and I found it. Well not “it”, but something close enough. Some hard drives go into CSEL mode in some instances, when pin 28 is left ‘floating’. In those cases it has to be tied low. Here’s the details I found. Nothing to do with CF cards, but sounded plausible so I tried it, and hey! It worked! Of course, it took me THREE HOURS of screwing around with external hard drives, floppy drives, boot images, and extra wear and tear on the Libretto of taking it apart a DOZEN times more than I planned. But at last, it worked! My Libretto, with the IDE/CF card installed:
libretto inside with hard drive
Click to enlarge. IDE/CF card in upper right instead of hard drive.

So, how does it work? Well, it works amazingly better than I had hoped! It is fast! It is at least twice as fast as the traditional hard drive. Booting from a cold start, I get to a log on prompt in less than 1/2 the time I did from the hard drive. And from there, to a fully rendered X GUI also in about half the time. It lasts forever! The solid state “hard disk” just sips power. From a more-or-less full battery, I have had it on for two hours now, and the ACPI is still reporting 2.5 hours remaining. At one point it reported over 6 hours remaining, although it stabilized to about 4.5 hours after a few minutes. Still – 4.5 hours on a charge! That’s incredible, considering what it can do! And finally… It is Scary Silent. I mean, it is unnerving. It does not make any noise. The most intensive thing I do with it typically is launch Firefox. When I do, I’ve become conditioned to hear lots of whirring and clicking as the hard drive does whatever it needs to do. Now? Nothing. Just utter silence. The hdd light still flickers, so I know it’s doing something, but it does it fast, and silently.

What more can I say? This thing is now frigging awesome. Sure, it’s still only a Pentium MMX 166MHz, it’s only 64MB of RAM, and it’s only got 1 GB of “hard drive”. But it will fit in an overcoat pocket or cargo-pants pocket, it weighs less than 2 pounds (did I mention the CF card weighs nothing, compared to the hard drive?) and it goes for 4 frigging hours! Damn!

Smiley Face
I have a happy.

Linux on the Libretto, Part V

Posted 2006.11.01 1.00 in Computers/Internet/Technology by Stephanie

So the other night I was trying to do some more customizations to Fluxbox, and stuff just wasn’t working the way the documentation said it should. I tried variations, tried all sorts of things, but nothing, it just refused to do what I wanted it to. Finally I realized that it was because the version of Fluxbox that came with Damn Small Linux was a) not the most recent, and b) probably stripped of a bunch of features, to trim down its size.

So I went poking around and (of course) managed to completely break Fluxbox on the Libretto.

I’m sick with cold or flu or something so I was laying in bed when this happened. Now, I could have just gotten up and gone to where I had my backup hard drive, to try and restore Fluxbox off of that. But that would have meant getting up. And besides, that version of Fluxbox didn’t do what I wanted in the first place.

I had, only a few hours earlier, installed the gcc and additional libraries, so I had (I hoped) a complete development environment. I downloaded the source files for the latest version of Fluxbox and figured hey, I’ll just compile the latest greatest, with the features I want.

Well, try doing this on a computer the size of a VHS cassette, with a 166MHz cpu and only 64MB of RAM.

Two hours(!) into the compile, it hit a fatal error. It was looking for a shared object in the X tree that wasn’t there. Two hours! Well, I had a search and found an older version was there. It wanted 1.2.2 and I had 1.1.something so I just made a link from the version it wanted to the version I had and let it pick up where it left off. Didn’t seem to hurt, since after another 30 minutes it finished the compile. I installed the new Fluxbox and voilla! It worked, more or less.

There was enough difference between the Damn Small Linux version of Fluxbox and the new version that it didn’t run right away, I had to do more tweaks to .xinitrc and then found that my Fluxbox init and style files needed more work, so add another half hour for that.

In the end, it took me about 3 hours to get things back where they were before I broke it in the first place. But as usual, it was a good learning experience, and now that I know what’s possible, I can go back and reconfigure Fluxbox all I want then recompile it again to get things just perfect.

So finaly I think I have X, Fluxbox, and Linux more or less the way I want them. As I posted at the Damn Small Linux Forums, my install isn’t really Damn Small Linux any more. It’s not damn small, being about 400MB now, and it’s not compatible with the various My-DSL stuff any more as I pulled most of that out and rewrote a lot of the init functions.

Basically, it’s loosely based on debian and DSL, with a 2.4 kernel and bits and pieces of DSL applications. Although it’s not technically DSL any more, I’m still glad I started there – It was a good base to start with and I’ve learned a lot!

Coming up next time – a small hardware ‘hack’ that makes the Libretto amazing!

Why Waste Time on the Libretto Anyways?

Posted 2006.10.30 1.00 in Computers/Internet/Technology by Stephanie

The question comes up now and then. I’ve been spending a lot of time and energy on my Libretto. Even spent a bit of money, on some new hardware. Mostly though, a lot of time has gone into it, to find the right Linux, get it installed, configured, get things working just the way I like them.

But why?

I have a perfectly good laptop already. I have an Apple Powerbook G4, with a big 15″ screen, 60GB hard drive, dvd drive, a gig of RAM, and a fast, beautiful operating system. So why spend so much effort on an eight year old laptop with a tiny screen and limited functionality?

Because to me, the single most important feature of a portable computer is…portability!

The 15″ Powerbook is a beautiful, powerful computer. But it weighs over 5 pounds, and 15″ is huge! If I want a big powerful computer, I sit at my desk. My dual-head iMac system is the best most powerful system I’ve ever used, hands down, bar none. It’s impossible to reproduce that kind of functionality in a laptop, so why try? These laptops with the 15″ screens, the 17″ widescreens, I can’t understand. Ok I could understand if you used the laptop as your desktop system.

When I switched to Macintosh, I tried linux on the Libretto for a while, but in those days, Linux wasn’t as advanced as it is now, and there were too many sacrifices. When I first retired the Libretto, I switched to an iBook with a 12″ screen (the curvy green plastic clamshell one.) Then I sold that and got a G4 iBook, another 12″ because that’s the smallest they had. Then when I sold that and upgraded to the Powerbook, the smallest one that had the features I wanted, was the 15″.

I’ve had it for less than a year…Bought it in February or March I think. And it’s just too big and too heavy. When the Libretto got freed of its lame little DOS task at the office a couple weeks ago, I brought it home, stared at it for a few minutes, and then got to work at it. It’s still not 100% where I want it, but it’s doing the job. In another week or two, when some hardware I ordered comes in, I think the Libretto will be my ‘new’ laptop all over again.

In the meantime, I haven’t turned on the Powerbook in over a week. And at this rate, the next time I turn it on, it will only be to transfer some files off of it, before shelving it – or preparing it for resale.

Why, oh why, won’t Apple make a sub-mini Macbook? Sure it’s niche, but for those of us who value portability, it would fill a definite void in the Macintosh line.

Libretto sitting on 15-inch Powerbook
Libretto sitting on 15-inch Powerbook

Linux on my Toshiba Libretto 100CT – iv

Posted 2006.10.29 0.00 in Computers/Internet/Technology by Stephanie

In part iii, I learned about the fluxbox window manager, and got partway through customizing my GUI. This time, I’ll finish customizing the GUI and share some of the various files.

The torsmo thing seemed quite interesting and has some good possibilities. I gave the .torsmorc file a thorough read, and then proceeded to edit the default file to give me exactly what I wanted: Clock on top, then battery and temperature info, then CPU load and number of processes, then memory usage and swap usage, then file system usage. The swap and filesystem stuff isn’t too important, but the time, cpu load, and memory status is good to know. And if running on batteries, the time remaining is also pretty important.

After getting rid of the extraneous junk that was cluttering up my screen, I wanted to customize the rest of it to give it a look and feel that I could really enjoy. The default fluxbox style Hat was ok, but I didn’t like the big graphic of Tux cluttering up the screen. The graduated screen effect was nice, but brown isn’t really my colour. So I copied the file /usr/share/fluxbox/styles/Hat over to ~/.fluxbox/styles/Steph and started editing. I changed things up, changed brown into blue, replaced Tux with another background image, and got the taskbar thing at the bottom to auto-hide. This left me with a desktop that I think is relatively clean, uncluttered, and with a colour scheme that I enjoy.

Here’s a screenshot of my Libretto desktop:
My Screenshot
Click for full-size view

You can see in the upper left corner, the five icons for fast access to my five most-used applications. Terminal and Firefox being the top two by a long, long margin. And in the upper right corner, there’s the torsmo output of system information. The image in the lower left corner is based on an Xubuntu wallpaper image at the XFCE-Look site; it was created by xxxatarixxx. I clipped it and resized it to fit the smaller screen of the Libretto, changed the colours slightly, and then changed its background to transparent so it would fit onto the fluxbox graduated background. If you’re interested, you can download a tar of these various init and config files, by clicking here: my-configs.tar

Next time, we’ll look into some exciting hardware stuff that’s ideal for small size, small overhead, small linux applications.

Linux on my Toshiba Libretto 100CT – iii

Posted 2006.10.26 0.00 in Computers/Internet/Technology by Stephanie

Last time, I got Damn Small Linux installed, broke a bunch of it, repaired the damage my own way, and got linux working almost exactly the way I wanted it.

My Damn Small Linux installation is no longer Damn Small. It’s pretty small though. My / filesystem is 500MB in size, of which 215MB are currently in use. That’s a fair bit bigger than the 50MB limit to Damn Small Linux’s live CD size. Most of those increases came after I installed the dpkg and apt-get functionality, and then installed the complete perl and perl-modules system. My /home filesystem is still almost empty – 11.3MB used out of 96MB – and almost all of that is junk stored in my Firefox web browser’s history / cache.

The important thing though is, my Libretto 100CT is running about as fast as can be expected, for a 166MHz Pentium with 64MB of RAM. Not just fast – but looking good, too!

Damn Small Linux defaults to the fluxbox window manager. I’d never heard of it before, but then my favorite application is terminal so I don’t think much about GUIs as long as they work. Anyhow, I started learning about fluxbox and finding out how to make it work better. By better, I mean, how to make it work the way I wanted it to.

Here’s a primer on fluxbox – I just found it now, after making all my changes, but it looks good so I’ll give it a read later and see what else I can learn about it: Using the Fluxbox Window Manager

An important note about the Toshiba Libretto: It is tiny, and has a tiny screen. 7 inches diagonal. SVGA, but a non-standard layout. 800 pixels wide, 480 pixels high. What I’m saying is, there’s very little screen real-estate. So what little there is, I don’t want it covered with crap floating around that I can’t get rid of. This was my first mission: Clean up the GUI and get rid of the crap I didn’t need or want.

First two things to go, were the workspace boxes in the lower left, and the whatever the heck thing was floating in the lower right. I’m sorry I can’t describe it, I don’t know what it was or what it did. Anyhow, here’s what I did: In your home directory, there’s a file called .xinitrc and in that file, are three lines I deleted:
dillo /usr/share/doc/dsl/getting_started.html & > /dev/null &
fluxter & > /dev/null &
wmswallow -geometery 70×80 docked docked lua &

The first line got rid of the ‘getting started’ thing that kept popping up. The second and third lines got rid of the workspace boxes and the thing in the right-hand corner. I don’t even know which was which.

Next was cleaning up all the icons in the upper-left corner. I only kept five of them: Aterminal, Emelfm, Firefox, Sylpheed, and Xzgv. To delete the others, from the home directory, go into .xtdesktop and in there, delete all the *.lnk and *.png or *.gif files you don’t need. When you restart X, whatever isn’t deleted will be in the upper left corner.

Finally, I really liked the system information in the upper right corner, but there was way too much and the font was too big. This stuff is all controlled by the .torsmorc file in your home directory. I changed mine to be smaller, focus only on what I wanted, and with a smaller font.

Check back again for part iv, for continued info on customizing the GUI. I’ll try and get a screenshot, as well as upload some of the key files and my style / wallpaper.

Linux on my Toshiba Libretto 100CT – ii

Posted 2006.10.24 0.00 in Computers/Internet/Technology by Stephanie

Last time, I introduced my Toshiba Libretto, and got as far as trying out the Damn Small Linux distribution.

Damn Small Linux is designed to fit a full Linux GUI Desktop onto a 50MB CD – or even a USB thumbdrive, or a PCMCIA card. It is designed in fact as a Live CD – meaning, you boot from the CD (or USB drive or PCMCIA card) and can use Linux without having to lose your normal operating system, and without having to make changes to your hard drive. This is all well and good, but useless for me. The Libretto doesn’t have a CD drive, or a USB port, and can’t boot from PCMCIA cards. And anyways, I wanted linux on the hard drive as my primary / only operating system, not as a sampler CD.

I had a spare laptop hard drive that was ready to go – an 800MB Toshiba drive that came with another old Toshiba. I partitioned it as /dev/hda1 with 500MB, /dev/hda2 with 100MB, and /dev/hda3 with 128MB. The first partition would be mounted as /, the second partition would be mounted as /home, and the third partition would be the swap space. This left almost 100MB of unused space on the hard drive. This is one of those little things about the Toshiba Librettos – they have a hardware / bios Hibernate function. If it ever goes into Hibernate, it will copy the contents of RAM onto the hard drive, starting at the end. So for 64MB of RAM, you need to leave at least the last 64MB of hard drive unused. If you don’t… the BIOS will still copy the RAM into the last 64MB of hard drive, happily overwriting whatever you have in there. It’s a “feature”, not a “bug” ;-). Anyhow, just something to keep in mind: always leave at least 64MB unused at the end of your hard drive, on a Libretto 100.

Anyhow, Damn Small Linux of course comes with tools to allow you to install it off the Live CD and onto a partition of your hard drive. Naturally, I didn’t read all the instructions and details. I got as far as finding the name of the tool, and that’s as far as I read.

Installing to a hard drive was easy enough, and before long my Xubuntu distro was archived and removed to an external drive, and Damn Small Linux was my only OS. That’s when I ran into trouble.

As near as I can tell (I still haven’t read all the documentation) the hard drive install uses the same methodology as the Live-CD, to save settings and files and configurations. In other words, any changes made during a session are rounded up and archived somewhere, then when rebooting, the archive is copied back onto your home directory etc and things pick up where you left off. This is the only way to do it with a live CD — you can’t make changes to a burned disk on-the-fly like you do to a hard drive filesystem. But on a hard drive, it’s really not necessary IMHO. It also confused the heck out of me. See, I saw all these files and things that I didn’t want or need, didn’t think they were important, so I deleted them all….

And every time I rebooted, all my settings were gone, networking didn’t work, it just kept reverting to the defaults. GRRRRR! Well, I’m no Linux guru, but I’ve been using it for 8 years now, and I do know my way around some of it. I found the scripts in /etc/rc#.d were my problem. I deleted them, and deleted the stuff in /opt and the other files that did the archiving game with the settings. Then I added my own bootlocal script, to ensure that when the booting was finished, everything was set up the way I wanted it. And, voilla! It’s a Damn Small Linux distribution, but it’s not quite Damn Small Linux any more.

Along the way, I found more documentation and got a few more things working right, like apt-get and all the perl modules. I’ve got my /home directory on its own partition (always good for easy backups and to keep /home safe if you need to re-install the OS or whatever). My wireless lan card works great. My SSH daemon starts automatically. Next, I will look into getting a build environment working, with gcc and make and all those goodies.

Another great resource are the Damn Small Linux Forums – a bulletin board where thousands of other DSL users post questions and answeres to various problems, tips, and tricks.

In the next installment, I’ll cover some customizations to the GUI, tweaks that I’ve done to make it just exactly the way I like it.