Linux on the Libretto 100CT
This is a quick account of how I got RedHat Linux up and running on a Toshiba Libretto 100CT. I hope it might save time for someone out there!
The big problem with Librettos (Libretti ?) is that they use a PCMCIA-based floppy which depends on the Toshiba BIOS. Once Linux is up and running it doesn't use the BIOS and hence can't use the drive. On RedHat 5.2, this was a big problem, because most of the installation methods required a second, supplemental, floppy to be inserted part-way through the installation, and by that point the Libretto couldn't see the floppy drive.
More recently, I've been using RedHat 6.1. This is much simpler, because the distribution comes with a 'PCMCIA boot image' which you can use to create the initial floppy. This has support for quite a range of PCMCIA devices, so you can install from the network, a PCMCIA CDROM, etc without the need for a second floppy. This is definitely the easiest way to get started, so if you can borrow or buy a suitable PCMCIA device, you should be OK. I've therefore moved my original 5.2-specific details to another page, but it may be worth consulting if you get stuck.
There are various other ways to get going, and the best place to start looking for them is the splendid 'Linux on Laptops' page at http://www.cs.utexas.edu/users/kharker/linux-laptop/. This has a vast amount of laptop-related information, including some sections on the other Libretto models, much of which is also relevant to the 100. These pages talk about installation methods such as using Zip drives, using PCMCIA hard drives, or removing the Libretto's disk and doing the install with it in another machine. Other methods that people have suggested:
- Ian Wilson copied RedHat 6.0 onto his Windows partition and did the installation from there. If you have enough free disk space, this works quite well. You can read about his experiences here.
-
John Dow reports that RedHat 5.0, 5.1 & 5.2 all install easily using a BackPack CDROM connected via the parallel port - it's directly supported by the install process. So if you don't mind buying extra hardware, this may be the easiest way. John also reports:
In order to install RedHat 6.0, you have to use the bootdisk from 5.x. This is because parallel IDE support has come a long way between kernel 2.0.x and 2.2.x. Before, a simple modprobe bpcd would load the driver, but with the 6.0 boot floppy, this doesn't seem to be implemented correctly.
Once the system is installed, the driver can be loaded by loading (in order) paride.o, bpck.o, pcd.o and referring to the drive as pcd0. On earlier systems, the single module bpcd.o did the whole thing.
Making room
If you want to keep your Windows partition so that you can choose whether to boot Linux or Windows, I recommend getting a copy of PowerQuest's 'Partition Magic'. This is a Windows-based commercial program, but I haven't found anything else which makes resizing disk partitions so easy. It knows about Linux partitions, so if, like me, you want to make your Linux partition bigger and your Windows partition smaller as time goes on, you can do this without losing anything.
You may well be able to do this with FIPS, or some other free utility, but Partition Magic is much easier to use. You might also want to consider upgrading your hard disk. The ones supplied with the Libretto seem fairly small nowadays. You can find information about compatible drives at the 'Adorable Toshiba Libretto' page (links below). Mine now has a 12Gbyte disk...
The installation
Unless you have a monitor attached to your machine, I suggest doing the installation in text mode. Otherwise the Redhat graphical installer will display dialog boxes which don't, alas, fit on the Libretto's 800x480 screen.
Custom settings
- The more recent XFree86 SVGA servers included with RedHat 6.x support the NeoMagic graphics controller used on the Libretto. I make my /etc/X11/XF86Config be a symbolic link to this XF86Config.lcd or this XF86Config.crt, depending whether I'm using the built-in screen or an external one (see below for how I switch between them). The CRT one will, of course, be rather dependant on your monitor, so don't assume mine will just work.
If you're using an older version of X, you may have more trouble. Redhat used to distribute a special NeoMagic-compatible X server called XFCom, but it's no longer on their FTP site. I suggest you upgrade to a more recent XFree86; I'm using 3.3.5.
- For audio I used the commercial version of OSS (available from www.opensound.com). The free versions included with Linux should work just fine, but the commercial version seems to be good at auto-detecting and configuring cards. On several machines, I've been glad I paid the $20 or whatever it cost. On the 100CT, though, it doesn't autodetect the card, so I had to set it by hand. You need the "Generic Yamaha OPL3-SAx (YMF715/YMF719) non-PnP" driver, and you need to tell it use IRQ 5 instead of the default IRQ 10.
Actually, the IRQ number can be something different, though this is the default. You can check the value in the CMOS setup. Of course, it's not immediately obvious how to get into the CMOS screen on a Libretto. Hit Esc a few times while it's booting, then it will prompt you to press F1.
- If your kernel doesn't include APM (power management), I suggest you recompile it to do so. Since the Libretto doesn't have a physical power switch, you need the APM so that the software can switch it off when you shut down. This works fine, but you need to add a '-p' option to the halt command (command="halt -p") in /etc/rc.d/init.d/halt. For a more detailed explanation see Henrik Grove's useful page at http://www.diku.dk/students/grove/poweroff.html
- I built and installed the PCMCIA card services which can be found at ftp://sourceforge.org/pcmcia/. More recent distributions will probably include this. I had a few problems until I remembered to tell the package not to use IRQ 5 because the sound system was using it. Exclude it by editing /etc/pcmcia/config.opts .
- I wanted to be able to start X on the LCD at 800x480 when I was travelling, and on an attached monitor at a 1024x768 when at home. The easiest way to do this, I think, is to use LILO. Any unrecognised options passed to the kernel by LILO are available as environment variables during the startup process. So:
- I modified my /etc/lilo.conf to include two versions of the same boot section. Here are the relevant bits as an example. Don't forget to run lilo after making any changes to lilo.conf.
-
boot=/dev/hda
root=/dev/hda5
map=/boot/map
install=/boot/boot.b
prompt
timeout=200
default=lcd
read-only
image=/boot/vmlinuz-2.2.5
label=crt
append="monitor=crt"
image=/boot/vmlinuz-2.2.5
label=lcd
append="monitor=lcd"
|
- I then created a script /etc/rc.d/init.d/monsel to select the appropriate monitor:
-
#! /bin/sh
#
# If a 'monitor' variable has been set at boot, eg.
# monitor=crt or monitor=lcd, then make the appropriate changes
#
# chkconfig: 2345 92 34
#
# description: Set XF86Config based on monitor value passed to kernel
#
# lcd is the default
echo -n Setting up X for monitor:
MON=${monitor:=lcd}
XF=/etc/X11/XF86Config
mv -f $XF $XF.bak
cp -f $XF.$MON $XF
echo $MON
|
- Create XF86Config.lcd and XF86Config.crt in /etc/X11 with appropriate contents. The copies mentioned above would do as a guide. Put links to monsel in the appropriate /etc/rc.d/rc*.d directories, or use chkconfig to do it for you.
- On booting, you can type either 'lcd' or 'crt' at the LILO prompt when you would normally type 'linux'. You could use a similar scheme to choose between network configurations. An alternative for networking, on recent RedHat distributions, is to use linuxconf profiles, but they never seem to work quite as I would hope them to.
- There's a driver for the floppy at ftp://ftp.rp.csiro.au/pub/people/dbateman/flash/. I haven't tried it.
-
Infrared - here's (roughly) what I did:
- Compile and install a kernel with IRDA support, if yours doesn't already have it. I also got the latest IRDA patches for my (2.2) kernel from the snapshot directory at http://www.cs.uit.no/linux-irda/. You need to make sure you have support for the Toshiba IR chip, which is given by the 'toshoboe' kernel module.
- Get a recent version of the irda-utils. My linux distribution came with an RPM package, but I got a more recent one from www.rpmfind.net.
- Edit /etc/irda/drivers, which should load the appropriate drivers when asked to by irmanager. The line you need under 'start' is 'modprobe toshoboe'.
- You should be able to do the rest from the IR-HOWTO. You need something similar to the following in /etc/conf.modules:
alias tty-ldisc-11 irtty
alias char-major-60 ircomm
alias char-major-161 ircomm-tty
Then run 'depmod -a' to update the dependencies. You also need to do:
mknod /dev/irnine c 60 64
mknod /dev/ircomm c 161 0
The HOWTO is a bit confused about this. In both of the above, I suspect that you don't need both device 60 and 161 - 161 is probably the right one.
- Arrange for /etc/rc.d/init.d/irda to be started as normal, or call it explicitly with the 'start' argument.
- This should get you going. I managed, after this, to use the modem on my Nokia 7110 via infrared by setting minicom or pppd to use /dev/ircomm.
- If you want to run SVGAlib stuff such as the really rather good 'zgv', I recommend the 'VESA' chipset driver. It works fine for me, at least with svgalib-1.3.1. You can copy the 800x480 modeline from the XF86Config mentioned above, and specify a PS/2 mouse. (These are set in /etc/vga/libvga.config). Do a slideshow of your photos without all that messing about in X...
- Lastly, when you have your Libretto plugged into your network, you might find the small screen and keyboard limiting, so why not control it from another machine using VNC? (Shameless advertisement!)
- Oh, and one last thing: if you're using the Libretto much as a desktop machine, I recommend getting the enhanced port replicator (if you can still find one). It doesn't cost too much, and it gives you 2 more PCMCIA slots, USB, and the ability to plug in both a keyboard and a mouse at the same time.
- Have fun!
Other useful pages:
Quentin Stafford-Fraser
6 April 1999, updated 1 May 2000