Debian Linux on the Toshiba Libretto 100ct – Part 1 Installing the Operating System
I got this little Toshiba Libretto for myself for Christmas as a tinkering project, as I’ve mentioned previously. I like to tinker with computers, and I wanted a machine that I could use to experiment with a full installation of Linux. I also wanted to restrict myself to a command line interface only to internalize the use on the console.
With all this in mind, I bought my Libretto 100ct on ebay and proceeded to install Linux. I tried a number of different things, and referred to a bunch of different websites before I got things working. I am not going to go into all of the things I tried that failed. But once I got things working, I started over again to fix a few mistakes and documented the process.
The one applications that I was not able to accurately document was ‘wppost’. wppost is a perl application for posting to WordPress blogs from the command line. Technically, I have gotten this to work (I am posting this from wppost now), but I have not accurately captured the steps to get it working. It is, in my experience, a total pain to install.
I am planning to go into some of my other software installations at a later time, but for now I wanted to at least outline the process I went through to get Debian GNU/Linux on my Libretto. There are a lot of other ways to do this, but I used what I had available. The Libretto has a lot of limitations – no bootable floppy, no CD-ROM, no USB. I ended up having to take the hard drive out and putting it into another computer to get the initial files on the machine. Currently, my only way to get files on or off is through the internet. I bought a Netgear MA401 PCMCIA wireless card to go with it, and this worked without issue luckily.
Here is the quick list of what I did to install Debian GNU/Linux on the Libretto:
- Pre-reqs: This machine had 64MB ram, I’m not sure if you can install Debian with the standard 32 that came with the system. I know you can install Damn Small Linux with 32 MB of RAM, so that might be an option if you have a 32MB Libretto. I also used a larger HD than what came with the Libretto. I went with a 20GB because it was the smallest new HD I could find. But I think anything over 2GB should be OK as long as you don’t have a ton of documents.
- Hard Drive Switch: I used another old machine to install the initial Linux OS. I removed the hard drive from the Libretto and installed it in the other machine. It was actually one of the easiest hard drive installs I have done – the Libretto HD comes with a little handle you can use to pull it out of it’s holding bay. I used a Compaq Presario 1640 with 32MB ram because that’s what I have available. Installing the HD was pretty easy, but YMMV.
- Install Damn Small LinuxThe next step is to startup the other machine with a light Linux distro live CD. I used DSL-N because DSL is the first distro I got to work on this Compaq. I am using DSL-N rather than DSL mainly because the boot loader (GRUB) is a later version, and I had issues with Debian 3.1 (Sarge) and the older boot loader. I have not verified if the same issues would occur with the latest stable Debian (Lenny), but I did not want to risk it.
- Partition the HD: Once the live CD starts up, I partitioned the HD using cfdisk in a terminal window. Here is the partition scheme I used on my 20GB drive:
Partition Start End Size Size FS Device Type Cylinder Cylinder (MB apx) (MB actual) ID ==================================================================================================== /dev/hda1 Primary 1 254 2088 2089.23 83 /dev/hda2 Primary 255 508 2088 2089.23 83 /dev/hda5 Logical 509 1014 4160 4162.00 83 /dev/hda6 Logical 1015 1030 132 131.61 a0 /dev/hda7 Logical 1031 1536 4160 4162.00 83 /dev/hda8 Logical 1537 2416 7235 7238.25 83 /dev/hda4 Primary 2417 2432 132 131.61 82
I marked the hda1 partition as the bootable partition. The “MB apx” column is what I entered in cfdisk as the partition sizes – the actual size is listed next to it. ID is what I used as the filesystem type in cfdisk for each of the partitions. The hda6 partition is my best guess at getting the Libretto Hibernate stuff to work. Philip Nienhuis has a nice analysis of the partitioning requirements for Libretto Hibernation that helped out quite a bit. Apparently the Libretto writes the contents of RAM to this portion of HD when it hibernates. I have been using the hibernation recently and haven’t seen any data loss issues, but I can’t be certain it’s right. However, I do know that hibernation is working. I will detail libretto hibernation in a later post.
- Restart: After partitioning, I always restart the machine. I had issues one time trying to install to HD without restarting after partitioning.
- Install OS to HD: Do a HD install of the initial operating system (DSL-N in my case) on the bootable partition (/dev/hda1). Once this is done, you need to get a copy of the latest Debian CD image onto the largest partition. As of this writing, the latest iso is available here. Download CD 1. I did this after putting the HD back in the Libretto and using a 1GB PCMCIA data card to store the data, but you could download it from the internet on the other machine and store it on the large drive. I put it on the large drive because I this is the only partition that I did not use as a mount point for the Debian system, so every other partition is going to get erased.
- Prepare HD for Debian installation: See the Debian Install Guide for details on prepping the HD. Points of interest are Chapter 4 and Chapter 5. First, Copy vmlinuz and initrd.gz to /boot directory of installed OS:
- The first thing I had to do was get Internet access on the other laptop. In DSL-N, click DSLPanel and then Iwconfig.
- For my WEP wireless, I filled in ‘sid’ with my wireless network name, and ‘wep’ with my wep key
- Then I downloaded the vmlinuz and initrd.gz files with wget:
- Then I copied these to /boot/newinstall.
Then I added the following lines to /boot/grub/menu.lst:
title New Install root (hd0,0) kernel /boot/newinstall/vmlinuz vga=808 initrd /boot/newinstall/initrd.gz
This will allow you to boot the Debian installer from an iso image on the Libretto.
- Install HD into Libretto: At this point I shut down the other machine, removed the hard drive and installed the hard drive in the Libretto. When you start up, you should see the grub bootloader menu. Choose “New Install”, and the Debian installer should start up and guide you through the installation.
- Perform Debian HD install: At this point you should be in the Debian installer. If you just follow the installation steps, it should be pretty self explanatory. Here are the high level steps:
- Choose your language. I chose English.
- Choose your Country.
- Choose Keyboard Layout
- Choose a hostname for your network. I chose Libretto
- Partition Disks: This is the fun part. You have to use Manual partitioning to keep the Libretto hibernation partition, but most of the partitioning should be done already. You need to format the partitions, though – except for the partition that contains the Debian iso image. If you format the drive that contains the iso (I used hda8), the installation will fail and you’ll have to start all over again. You should leave that partition set as “do not use”. For the other partitions, I set them all to ext2 file system format, since that’s recommended on older computers. The exceptions are the two small partitions (hda6 and hda4), which I left as-is (hibernation and swap respectively). I also set up the following mount points:
/dev/hda1 / /dev/hda2 /var /dev/hda4 none /dev/hda5 /usr /dev/hda7 /home
Once the partitions are set, the installer will begin installing the base system
- Set up Users and Passwords. I only used one non-root user.
- Choose Packages: At this point the Debian Installer will give you some options to choose software to install. When I first installed Debian on the Libretto, I installed the file server, web server, mail server, etc. but this really slowed down the machine (especially at startup) so I uninstalled all server tasks. Also, it should be noted that ‘Desktop environment’ will install Gnome, which will not usably run on the Libretto. However DSL-N set up their windowing environment worked great, though – I will have to try to figure out how they configured that. Anyway, I only installed the software packages ‘Laptop’ and ‘Standard system’.
- Install Grub: I chose yes here and installed grub.
At this point, you should be prompted to restart the machine. Once you restart, Debian GNU/Linux should be completely installed on the Libretto. I will follow up with another post on how I configured Debian to make the most from my command line only environment. I would also like to put together a third post on the weird Libretto hibernation feature – I have not seen any article that really details how to get this working. I have it working now and it really is a great feature, so I’ll share my own experiences with it.
I have a 110Ct with 32MB. I use the floppy-based OpenBSD install. I have 4.6 installed and X working, and I just use a full screen VNC session from another box. The VNC server is running at 800×600 (it wouldn’t do 800×48), but I leave Firefox sized just right for my screen – I can surf just about any site. If I don’t want to use VNC, I just run links -g for lightweight surfing.
I hope to eventually find a 32MB memory module to upgrade to 64MB, but for now I’m not really missing it.
I really like OpenBSD for older laptops. I especially like that they still have a floppy-based network install.
Please contribute to the InstallingDebianOn documentation:
http://wiki.debian.org/InstallingDebianOn