Linux on the Toshiba Libretto 70 George B. Moody, george@hstbme.mit.edu v1.5a, 20 June 1998 The Toshiba Libretto, slightly larger than a VHS video cassette, is the _s_e_c_o_n_d-smallest computer I know of that can run Linux. Here is a description of how I installed Red Hat Linux 5.0 on a Libretto 70, with details of setting up XFree86, PCMCIA services, networking, sound, and APM. I bootstrapped the installation using a parallel-port Zip drive; other approaches are discussed. ______________________________________________________________________ Table of Contents 1. What's new? 2. Introduction 2.1 Libretto links 2.2 About this document 3. Hardware description 4. Installing Red Hat Linux 5.0 4.1 Installation strategies 4.2 Preparation using another Linux PC 4.2.1 Begin collecting files 4.2.2 Using kernel and module binaries 4.2.3 Creating kernel and module binaries from sources (optional) 4.2.4 Creating boot diskettes 4.2.5 Creating a root Zip disk 4.3 Partitioning the Libretto's hard drive 4.3.1 Shrinking the Windows partition 4.4 Booting Linux on the Libretto 4.5 Creating partitions for Linux 4.6 Installing Linux on the hard drive 4.6.1 Transferring the Zip disk contents to the hard drive 4.6.2 Booting from the stage 2 diskette 4.6.3 Installing LILO (optional) 4.6.4 Uninstalling LILO 4.7 Access to other file systems under Linux 4.7.1 The Windows partition 4.7.2 Diskettes 4.7.3 Zip disks 4.7.4 CD-ROMs 4.8 Completing the RHL 5.0 installation 4.8.1 If you don't have a PCMCIA CD-ROM drive 5. Installing updates and other packages 6. X11R6 on the Libretto 6.1 Open Windows and XView 7. User accounts and passwords 8. Networking 8.1 Netscape 8.2 SSH 9. Advanced Power Management (APM) 10. Sound support 11. Wish list 12. Top ten reasons to run Linux on a Libretto 13. Disclaimer ______________________________________________________________________ 11.. WWhhaatt''ss nneeww?? Many others who have installed Linux on their Librettos have generously contributed suggestions and experiences. Where I've been able to try out these suggestions, I've incorporated them (with acknowledgement, of course) into the main text of this mini-HOWTO. In this section, I've summarized and quoted many of the ideas that I have not had a chance to try personally yet (my apologies if I've left anyone out inadvertently). The contributors of each suggestion are probably the best resources if you have questions. Please send a copy of your correspondence to me so that I can update the information here as appropriate. _P_a_u_l _C_o_u_d_e_r_c, Paul.Couderc@irisa.fr, successfully installed Linux via the parallel port. He writes: ``By compiling a kernel with NFS-Root and PLIP support, I thought it would be possible to "loadlin" the kernel from the Win95 partition and then to NFS-mount a root filesystem over PLIP from a desktop PC. ``Unfortunately, when I tried this idea the boot process ended up with a "Root-NFS: unable to open at least one network interface" despite the fact that PLIP was correctly initialized. The problem comes from NFS-Root, which does not allow point-to-point IP interfaces to be used. `` To fix this (nfsroot v2.3), edit nfsroot.c (in /usr/src/linux/fs/nfs) and change the following lines: /* First up the interface */ old_flags = dev->flags; dev->flags = IFF_UP | IFF_BROADCAST | IFF_RUNNING; To: /* First up the interface */ old_flags = dev->flags; if (old_flags & IFF_POINTOPOINT) dev->flags = IFF_UP | IFF_POINTOPOINT | IFF_RUNNING | IFF_NOARP; else dev->flags = IFF_UP | IFF_BROADCAST | IFF_RUNNING; And recompile the kernel. This fix is not very clean because no route is added to the destination point-to-point address, but the subnet route seems to work (I wrote a more complete patch with the the correct route added but I don't know if it is very useful). ``The rest of the installation is quite standard: repartition the disk with Windows's fdisk or FIPS to make room for Linux. Export a root filesystem from the desktop PC (like the Slackware root floppy). Copy the kernel image to the Lib's Win95 partition and boot it with LOADLIN, and don't forget to use the no_squash_root parameter to be able to mount the root read-write. Create Linux partitions with Linux's fdisk, and install the system with your favorite method (Personally I NFS-exported the CD-ROM distribution from my desktop PC and mounted it on the Libretto, but FTP would work as well). ``I sent the patch to the NFS-Root author, but as it address a specific problem I'm not sure that it will be included in future versions.'' _D_a_v_i_d _B_a_t_e_m_a_n, David.Bateman@tip.csiro.au, is writing a Linux driver for the Libretto's PCMCIA diskette drive. An alpha version of the driver, in binary format, is available from David, who expects to be able to supply a source version once the code is stable. (David explains that ``Due to the non-disclosure agreement I signed with Y-E Data to get the necessary programming documentation, during the testing phase I can only give out binaries of the floppy driver. Eventually there will be a source release, but the code will need to be shown to Y-E Data first for Intellectual property reason. Therefore passing the source by the Y-E Data legal department should be kept to a single pass. So I'd like to iron out as many bugs as possible before moving to a full source code release.'') _K_e_v_i_n _T_o_m_l_i_n_s_o_n, tomlikp@cat.com, has constructed a set of diskette images that can be used to install Red Hat Linux 5.0 on a Libretto without requiring any other hardware. Read Kevin's instructions ( ) for downloading and using these diskette images. Thanks, Kevin! _A_l_e_x _D_e_W_o_l_f, dewa1@aerial1.com, reports success using PPP with a Viking 56K modem. He also reports that the Xinside X server does not appear to recover from hibernation properly, but that he was able to solve this problem by switching to XFree86. _D_e_l_b_e_r_t _T_. _W_a_l_s_h, delwalsh@mindspring.com, writes about his UMSDOS installation: ``The reasons for a native partition are obvious but I installed Linux on a pc at work using umsdos so I would not have to repartition a system that I do not own. Umsdos works and performs quite well. No bench marks were run but I was not after stellar performance on the Libretto, I just wanted Linux running giving me a very portable workstation. Using this approach I got the parallel port BackPack cd-rom and copied the install files to the Libretto (using dos) and installed it. Quite simple and a cd-rom drive is an asset to the Libretto. I now use loadlin exclusively on my desktop at home and my Libretto. No more lilo, loadlin is quick, easy and fool proof. If you ever messed up a lilo config and ended up reformatting your hard disk and all that entails you know what I mean. This approach is perfect if the Libretto is the only system one has. ``An alternative is if you also own a desktop or other system with a cd-rom. For the price of the BackPack you can buy a pcmcia card, nic card for the pc, a hub and cables. With this setup you can use MS file sharing to copy the distribution to the Libretto and continue from there. Once up and running you can network both systems using linux, mount the cd-rom nfs and still have access to a cd-rom from the Libretto and also have the fun of running a Linux network at home. What a deal! Of cource I thought of this after buying the BackPack but the portable cd-rom drive is great for traveling. At home I just network the two systems and lay in bed with the Libretto and connect to work or the net and have a lot of fun.'' _D_a_v_i_d _L_u_y_e_r, luyer@ucs.uwa.edu.au, reports success in installing Debian Linux off of a boot diskette after transferring the files to the Windows partition. He writes, ``Debian Linux only needs the first disk in the actual floppy drive and can then mount the second disk via a ramdisk to something to get the files off it if it's found on the local hard disk or network.'' _T_h_o_m_a_s _T_o_n_i_n_o, ttonino@bio.vu.nl, writes ``I installed both Red Hat 4.2 and Red Hat 5.0 on my Libretto 50 using only a second Linux machine and a laplink cable. It worked perfectly. The installation works with the standard Red Hat boot floppy. Installation took about 1 hour from the 2 speed CD drive in my desktop, so I suppose this could get a little but not much faster. The trick is to do an NFS install - this does not need the second boot floppy.'' My thanks to everyone who has written! 22.. IInnttrroodduuccttiioonn The Libretto is a marvel of miniaturization. It's a little too big (210x114x35 mm) to be called a palmtop -- at least, it won't fit in the palm of anyone who would also want to type on it! Everything one needs in a real computer is there, and there are surprisingly few compromises. Naturally, the first thing I wanted to do when I saw one was to get Linux running on it. (Why waste such an engineering gem on Windows 95?) 22..11.. LLiibbrreettttoo lliinnkkss I've used Linux since 1.0.9, and UNIX since version 6, so I considered myself reasonably experienced, having installed Linux around twenty times. Getting Linux to run on the Libretto was one of the trickier installations I've done. It certainly helped to know that it was possible; for this reason, I would like to thank the authors of the following web pages, found using an AltaVista search for ``+libretto +linux'': IInnssttaallll LLiinnuuxx ttoo LLiibbrreettttoo This relates how to install Slackware 3.x on a Libretto 50 via NFS. LLiinnuuxx oonn tthhee LLiibbrreettttoo This describes how to install Red Hat Linux (but presumably any Linux) by removing the Libretto's hard drive, attaching it to the spare IDE connector of a ``real'' PC, doing the installation there, then reinstalling the drive in the Libretto. I had also read (well, looked at with interest and a renewed desire to learn Japanese) the web pages and news posts of many Japanese Linuxers who have been installing Linux on their Libretto 20s, 30s, etc., for some time now. I also searched Kenneth Harker's _L_i_n_u_x _o_n _L_a_p_t_o_p_s page, , which is where you should be looking if you haven't already made up your mind to try Linux on a Libretto. This page has pointers to dozens of documents like this one, each of which describes how Linux can be installed and used on one or more types of portable PCs. One of those, _A_l_a_n_'_s _P_C_1_1_0 _P_a_g_e, , contains an inspiring account of Linux on what has got to be the smallest full-featured PC on earth. The Libretto is a close second (about 20 mm longer, other dimensions about the same; it weighs about 150 g more than the PC110). Kenneth Harker also maintains the _L_i_n_u_x _L_a_p_t_o_p _V_o_l_u_n_t_e_e_r _S_u_p_p_o_r_t _D_a_t_a_b_a_s_e, , a searchable list of folks who are willing to give advice to those seeking to install Linux on portable computers. On that list, I found Keith Packard, keithp@ncd.com, who offered encouragement and an excellent suggestion which I ignored initially (more on this below). For general information on the Libretto in English, visit Toshiba USA's Libretto pages, . The parent company maintains a larger Libretto Web site in Japanese, , with photos of a variety of add-ons that apparently are not available outside of Japan so far. A good unofficial source of information on all Libretto models, including those unavailable in the US, is _A_d_o_r_a_b_l_e_'_s _L_i_b_r_e_t_t_o _P_a_g_e, , which also includes information about do-it-yourself upgrades, a commented list of world- wide mail-order suppliers of Librettos, and a short but useful list of Libretto links. After I had finished the adventure recounted below, I tried another AltaVista search, and found Grant Taylor's _P_o_r_t_a_b_l_e _C_o_m_p_u_t_i_n_g _w_i_t_h _L_i_n_u_x pages, , in which the author describes his own experiences installing Red Hat Linux on a Libretto 30, using the method described in _L_i_n_u_x _o_n _t_h_e _L_i_b_r_e_t_t_o, . Grant's pages contain a great deal more of interest, including details of getting a wireless Internet connection using a CDPD modem, and a pointer to Matt Cowles's Libretto page, . Matt's page describes another installation using the same approach, with details of how to remove the Libretto's internal drive and connect it to another PC. 22..22.. AAbboouutt tthhiiss ddooccuummeenntt The most recent HTML version of this document can be found at . SGML, Plain text, PostScript, and LaTeX versions are also available; links to these may be found in the HTML version. If this document is useful to you, please send me a postcard from your part of the world (my son collects stamps, and I would appreciate hearing about your experiences with Linux on the Libretto). My snailmail address is: George Moody MIT Room E25-506A Cambridge, MA 02139 USA 33.. HHaarrddwwaarree ddeessccrriippttiioonn There are three models of the Libretto currently available outside of Japan. The Libretto 50 (a.k.a. 50CT) has a 75 MHz Pentium and an 800 Mb disk; this model is still widely available although its production has been discontinued. The Libretto 70 (70CT) has a 120 MHz Pentium MMX and a 1.6 Gb disk. Both weigh about 850 grams with their standard batteries, which provide around two hours of use (an optional double- capacity battery, which adds about 100 grams and a 15 mm ``lip'' at the front of the keyboard, powers either model for about four hours). Shortly after I wrote the first version of this document, Toshiba introduced the Libretto 100 (100CT), which has a 166 MHz Pentium MMX and a 2.1 Gb disk; it's a bit larger (1 mm thicker, 17 mm more from front to back) and 100 grams heavier than previous models, and is said to run for 3 hours on its standard battery, or 5 hours with an optional high-capacity battery. The Libretto 50 and 70 are sold with 16 Mb of EDO RAM (you can and should add another 16 Mb -- currently available at around US$90). The side-lit active matrix screen is about 120x95 mm (the specification is ``6.1 inches diagonally''), with a resolution of 640x480 pixels. The video chip set is a C&T 65550 with 1 Mb of video RAM; using either the port replicator that comes with the Libretto, or the separately available dock, you can drive an external monitor at 1024x768 in 8-bit (256) color mode, or at 800x600 in 16-bit color mode. These Librettos, and earlier models that were distributed only in Japan, come with a single type II PCMCIA slot; the optional dock includes a type III PCMCIA slot that can accommodate a second type I, II, or III card (it's not possible to load the type III slot with 2 type II cards, however). The 16-bit PCMCIA interface does not support CardBus cards. The port replicator and the dock both supply a standard DB-25 parallel port and a DB-9 serial port as well as an HD-15 video port; the dock adds connectors for a PS/2 keyboard and mouse. Librettos have an IrDA 1.0 compliant serial infrared port usable with or without the port replicator or dock. These machines also have built-in 8-bit Sound Blaster Pro-compatible and 16-bit Microsoft Sound System- compatible audio, an internal (monaural) speaker and an odd little stereo headphone jack (an adapter for a standard stereo mini-jack is supplied). There is no sound input, although the necessary pins are accessible on the sound chip if you are willing to void your warranty. The Libretto 100 comes with 32 Mb of EDO RAM, to which an additional 32 Mb may be added, and an 800x480 active matrix screen driven by a NeoMagic NM-2160 video chip set with 2 Mb of video RAM. The Libretto 100 can accommodate one type III or two type I or II PCMCIA cards internally, and it supports CardBus cards. The optional Libretto 100 dock provides an additional type III slot and an additional type I or II slot, as well as a USB port. I don't have any information about the sound support in the Libretto 100, but it is apparently different from that in earlier models. The pointing device is a nice bit of engineering, IMHO. It's basically the same pointing-stick device Toshiba has used in its laptops, but mounted on the right side of the screen, with the buttons (two of them) mounted behind the pointer (i.e., on the outside of the case). The pointing stick is covered with a felted rubber bumper about 1 cm in diameter, and you operate it with your right thumb while the other fingers of your right hand fall naturally on the buttons. (It took me only a game of Windows solitaire on a demo model to get used to it, and I'm left-handed -- so no whining, OK? We all hate these things, but the alternatives are worse.) I noticed that the well-used bumper on the demo unit showed signs of wear; Toshiba enclosed six spares with my Libretto, and I imagine that I'll be using them if I don't lose them first. The external floppy drive (included with US and European models, but reportedly an extra-cost option in Japan) is a proprietary design with a permanently attached PCMCIA card. This turns out to be problematic for installing Linux (more on this subject later). The drive itself is admirably small, but the captive cable makes it a bit awkward to pack up. The floppy drive is _n_o_t currently accessible from Linux (but see _W_h_a_t_'_s _n_e_w_? above for information about an alpha version of a Linux driver). Spare or replacement floppy drives are available for around US$140. The forerunners of the current models (the 20, which had a 75 MHz AMD 486 CPU, up to 20 Mb of RAM, and a 270 Mb hard drive; and the 30, which had a 100 MHz AMD 5x86 (486-class) CPU, up to 20 Mb of RAM, and a 500 Mb hard drive), and an intermediate model (the 60, which is a 50 with a 100 MHz Pentium) were available only in Japan. These models have apparently been discontinued, although it may still be possible to purchase one via mail order. A significant advantage of models 60, 70, and 100 over the earlier models is that it is possible to charge the batteries while the computer is in use. Toshiba supplies a very compact universal (100-240V, 50-60Hz) AC adapter/charger. A less compact but still reasonably small auto adapter/charger, also usable in airplanes equipped with Empower in-seat power supplies, is available from Xtend Micro Products, ; for the Libretto 50 or 70, get model E407 (15 V, 2 A). Toshiba has recently introduced a similar product (model PWCF302). Libretto 100 owners should check compatibility with both vendors. At introduction in the US, the 50 sold for about US$2000 (rather expensive compared to other notebooks of similar capabilities); it is now available for less than US$650. The 70 was also introduced at about US$2000, and has dropped to less than US$1600 since the advent of the 100 (currently about US$ 2200). For about US$2550, the Libretto 100CT/NT comes with Windows NT preinstalled; it is otherwise identical to the 100. All other models of the Libretto come with Windows 95 preinstalled. After reviewing my choices, I took a deep breath, pulled out my charge card, and ordered my Libretto on the web. At the same time, I ordered a Sony PRD-650WN CD-ROM drive, which is packaged by Sony with an Adaptec SlimSCSI PCMCIA adapter. They arrived via FedEx about 18 hours later (really! -- but YMMV). I unpacked the Libretto, set up its AC adapter, started charging its battery, turned it on, answered the few questions needed to finish the Windows 95 setup, and played solitaire. (I lost. I wish Windows 95 came with reversi, like 3.0 did -- now _t_h_a_t was a reason to run Windows. Can anyone think of any other reasons?) I chose the 70 because I expected to keep a Windows 95 partition on my Libretto, and the 810 Mb disk available on the 50 seemed unlikely to be big enough. As it turns out, it's not particularly difficult to replace the disk drive (see, for example, _A_d_o_r_a_b_l_e_'_s _L_i_b_r_e_t_t_o _P_a_g_e, , for information about replacement drives with capacities up to 3.2 Gb). The choice is now a bit less clear. The Libretto 50 is an amazing bargain at current prices. Even after replacing the original disk with a 3.2 Gb drive for about another US$240, the total cost is less than half of what it was a few months ago, and for many applications, the speed difference would not be noticeable. At the other end of the lineup, the larger screen and longer battery life of the 100 are attractive features (the speed difference and the support for 64 Mb of RAM are also minor advantages), which IMHO are offset by the greater size and weight of the 100 (OK, there's not much difference, but the Libretto is attractive in the first place because of its size). These notes about installing Linux on the Libretto 70 should be applicable to the Libretto 50, except for the details about partition sizes. Much of this material should also apply to the Libretto 100, but the details of setting up the X server will be different because the NeoMagic chip set is not supported by XFree86 (but see _N_e_o_M_a_g_i_c _X _S_e_r_v_e_r _f_o_r _L_i_n_u_x _o_n _L_a_p_t_o_p_s, , for a free but unaccelerated X server that has been reported to work on the 100). Sound support on the 100 may also require different settings. 44.. IInnssttaalllliinngg RReedd HHaatt LLiinnuuxx 55..00 The tricky part of the installation, based on my reading, was expected to be at the beginning. The Libretto comes with an external PCMCIA floppy drive, which is bootable, but Red Hat Linux (RHL) needs to read a second floppy after booting if the installation requires PCMCIA services, and _t_h_i_s isn't possible (because the kernel on the boot floppy can't read another floppy). 44..11.. IInnssttaallllaattiioonn ssttrraatteeggiieess So, you say, why not copy the files needed from the CD-ROM to the Windows partition (while still running Windows, that is), defragment and repartition the drive, and then do a hard-drive installation? This sounds plausible, and I was ready to try it, until I noticed that I would still need the second floppy in order to do a hard-drive installation. At this point I seriously considered building a Linux boot floppy with MSDOS file system support so that I could continue with this approach. It might have worked -- and I would be pleased to hear from anyone who does this successfully. It's the only reasonable way I can think of to bootstrap Linux on the Libretto without the use of a second PC (except to compile the kernel for the boot floppy -- but if a suitable kernel were available for downloading, it would be possible to transfer it to a floppy using the rawrite utility under DOS or Windows). I might have been tempted to remove the Libretto's hard drive, install it in another PC, and do the installation there, using the method described in _L_i_n_u_x _o_n _t_h_e _L_i_b_r_e_t_t_o, , except that the necessary 2.5-inch to 3.5-inch adapters are extraordinarily hard to find. (Grant Taylor notes that these are available from Dexis Computer in Minneapolis, +1 612 944 7670.) The downside of this approach, even given the adapter and an attitude of reckless abandon towards Toshiba's warranty, is that upgrades may be equally difficult. On the other hand, if you've decided to replace your drive with a larger one -- why not? Keith Packard's advice -- to build a minimal root partition using a parallel-port Zip drive attached to another PC -- seemed much the better course. I didn't have a Zip drive, so I bought a Zip Plus (this is the new model, with both parallel and SCSI interfaces) at the local computer megaoutlet. An hour later, I realized this was a mistake: the Zip Plus is not compatible with the original Zip, which is the only one supported by the Linux ppa module. (This may be changing: if you are considering buying a Zip drive, you may want to take a look at David Campbell's PPA page, , for more recent information. As of June 1998, an alpha release of a Zip Plus driver is available for testing.) Fortunately, exchanging drives was no problem. After writing this HOWTO, I received several suggestions for other installation strategies. Jay Soffian, jay@cimedia.com wrote that he had successfully used a Backpack (parallel-port) CD-ROM drive to install RHL 5.0, first defragmenting and repartitioning using FIPS (see below), then running autoboot.bat (on the RHL CD-ROM) from DOS mode. If you have one of these CD-ROM drives, this sounds like a significantly easier approach than what I describe below. Another possibility I haven't had a chance to try yet is to make a custom initrd.gz, as Victor Gvirtsman has done (see ). Victor's idea is to copy loadlin.exe and vmlinuz from the RHL CD, and Victor's initrd.gz, to the DOS/Windows partition of the Libretto, and then to use loadlin to bootstrap Linux for an installation using a PCMCIA CD- ROM, hard drive, or network card. This didn't work for me; the problem I encountered was that at least one shared library appears to be missing, so that cardmgr (the PCMCIA card services daemon) could not be started. This looks like a problem that should be fairly easy to fix. The process of creating a custom RHL boot floppy, which doesn't appear to be documented by Red Hat anywhere, is described clearly and in detail by Rod Smith (see ). 44..22.. PPrreeppaarraattiioonn uussiinngg aannootthheerr LLiinnuuxx PPCC If you decide to take this route, as I did, you will need not only a parallel-port Zip drive, but also root (superuser) access to another PC that is running Linux. I refer to this as ``the desktop PC'' below. In outline, we will: +o download or compile two versions of the Linux kernel and modules +o on the desktop PC, create two boot diskettes and a small but usable Linux installation on a Zip disk +o repartition the Libretto's internal disk +o move the Zip drive to the Libretto, and boot Linux using the first diskette and the Zip disk +o transfer Linux from the Zip disk to the Libretto's internal disk +o boot Linux using the second diskette and the internal disk +o (optionally) install LILO so that we can boot Linux or Windows 95 without needing a boot diskette +o install additional Linux packages to complete the installation, either via a CD-ROM drive connected via a PCMCIA SCSI controller, or from Zip disks. 44..22..11.. BBeeggiinn ccoolllleeccttiinngg ffiilleess Make a directory for miscellaneous files to be transferred to the Libretto, and make several subdirectories within it: mkdir /tmp/libretto cd /tmp/libretto mkdir -p boot lib/modules stage2/boot stage2/lib/modules usr/src Obtain the latest kernel source RPM from Red Hat's FTP server (in ) or one of its mirrors if possible. Otherwise, you can use the copy from the SRPMS directory on RHL 5.0 CD-ROM 2. The file you need has a name of the form kernel-_v_e_r_s_i_o_n.src.rpm; do not confuse this with kernel-source- _v_e_r_s_i_o_n.i386.rpm, which does not contain the pcmcia-cs sources. Save a copy of this file in the /tmp/libretto/usr/src directory if you would like to be able to build new kernels on the Libretto itself later on. Next, we need kernel and module binaries. You can download the necessary binaries from my web site, or you may create them from the Linux sources. 44..22..22.. UUssiinngg kkeerrnneell aanndd mmoodduullee bbiinnaarriieess If you wish to use the precompiled binaries: 1. Download the Libretto Linux binary archive and save it as /tmp/llbin.tar.gz (the HTML version of this document, , contains a link to the archive here). 2. Unpack the archive by cd /tmp tar xfvz llbin.tar.gz (The contents of the archive will be unpacked into /tmp/libretto and its subdirectories. Once you have unpacked the archive, you can delete /tmp/llbin.tar.gz.) 44..22..33.. CCrreeaattiinngg kkeerrnneell aanndd mmoodduullee bbiinnaarriieess ffrroomm ssoouurrcceess ((ooppttiioonnaall)) If you wish to create the binaries from sources: 1. If you have previously created a custom kernel for your desktop PC, make a backup copy of your kernel configuration file (/usr/src/linux/.config) in another directory. 2. If you have not already done so, install the sources from the SRPM by rpm -i /tmp/libretto/usr/src/kernel-2.0.32-2.src.rpm (Your SRPM may have a later version number.) The sources will be unpacked into directories named /usr/src/linux-_l_i_n_u_x_v_e_r_s_i_o_n and /usr/src/pcmcia-cs-_p_c_m_c_i_a_v_e_r_s_i_o_n. Make symbolic links to these direc- tories, named /usr/src/linux and /usr/src/pcmcia-cs respectively. 3. Download the stage 1 kernel configuration file (see the HTML version of this file for a link), and install it as /usr/src/linux/.config. If you make changes in .config, be sure to include support for kernel modules (since PCMCIA support is available only as modules). Since the stage 1 kernel will be using the Zip drive for the root file system, include ppa support directly in the kernel (not as a module). Note that it is not possible to include parallel printer or plip support in the stage 1 kernel, since either would interfere with use of the root file system in this case. 4. Build the stage 1 kernel by: make clean make dep make zImage cp /usr/src/linux/arch/i386/boot/zImage /tmp/libretto/boot/vmlinuz cp /usr/src/linux/System.map /tmp/libretto/boot/System.map rdev /tmp/libretto/boot/vmlinuz /dev/sda1 rdev -s /tmp/libretto/boot/vmlinuz /dev/sda2 Depending on the speed of your desktop PC, the make commands may take anywhere from a few minutes to an hour or more. The rdev commands set the root and swap partitions to be used by the stage 1 kernel; these correspond to the partitions on the Zip drive. 5. Make a set of modules (excluding the PCMCIA modules), and install them in /tmp/libretto: make modules make PREFIX=/tmp/libretto modules_install 6. (Optional) You may wish to obtain the XForms library, so that you can compile cardinfo (an X11-based utility that displays information about whatever is in the PCMCIA slot of the Libretto (and of its port replicator, if connected). This utility is compiled automatically while building the PCMCIA kernel modules, provided that the XForms library has been installed. This library is available from Red Hat's FTP server and its mirrors, but (because of distribution restrictions) is not included on the RHL CD-ROMs. If you want it, download and install . If you skip this step, you can always compile cardinfo later if you want it -- see the PCMCIA HOWTO for details. 7. Configure the pcmcia-cs package: cd /usr/src/pcmcia-cs make config The configuration process is interactive. Accept the default responses, except that you should specify /tmp/libretto as the alter- nate target install directory, and you should enter 2 (read from the Linux source tree) when asked to set kernel-specific options. Here is a sample of the output of make config, including my responses to prompts: Linux PCMCIA Configuration Script The default responses for each question are correct for most users. Consult the PCMCIA-HOWTO for additional info about each option. Linux source directory [/usr/src/linux]: Alternate target install directory []: /tmp/libretto C compiler name [gcc]: Linker name [ld]: Compiler flags for debugging []: Build 'trusting' versions of card utilities (y/n) [n]: The PCMCIA drivers need to be compiled to match the kernel they will be used with, or some or all of the modules may fail to load. If you are not sure what to do, please consult the PCMCIA-HOWTO. How would you like to set kernel-specific options? 1 - Read from the currently running kernel 2 - Read from the Linux source tree 3 - Set each option by hand (experts only!) Enter option (1-3) [1]: 2 Kernel configuration options: Symmetric multiprocessing support is disabled. PCI BIOS support is disabled. Advanced Power Management (APM) support is enabled. SCSI support is enabled. Networking support is enabled. IPv6 support is disabled. Radio network interface support is disabled. Token Ring device support is disabled. Module version checking is enabled. PCMCIA IDE device support is enabled. DEC Alpha UDB target platform is disabled. The kernel source tree is version 2.0.32. The current kernel build date is Fri Feb 13 06:56:32 EST 1998. WARNING: the source tree has a build date of Wed Feb 18 17:45:16 EST 1998. Did you forget to install your new kernel?!? Your module utilities are version 2.1.55. It looks like you have a System V init file setup. X Windows include files found. /usr/X11/lib/libforms.a found. 8. Now compile the PCMCIA modules and install them in /tmp/libretto: make all make install This completes the compilation of the stage 1 kernel and modules. The stage 2 kernel and modules are compiled using a similar procedure: 1. Download the stage 2 kernel configuration file (see the HTML version of this file for a link), and install it as /usr/src/linux/.config. Once again, if you make changes in .config, be sure to include support for kernel modules (since PCMCIA support is available only as modules). Since the stage 2 kernel will be using the internal drive for the root file system, ppa support may be included as a module rather than being compiled directly into the kernel. By selecting modular ppa, plip, and parallel printer support, as is the default for the stage 2 kernel, the parallel port can be shared between these devices, which is not possible if any of them is compiled as part of the kernel itself. 2. Save a copy of the stage 2 kernel configuration file in /tmp/libretto/stage2/config. (This will eventually be installed in /usr/src/linux/.config on the Libretto, so that you can use it as a base for building a new kernel there if you need to do so in the future.) 3. Build the stage 2 kernel by: make clean make dep make zImage cp /usr/src/linux/arch/i386/boot/zImage /tmp/libretto/stage2/boot/vmlinuz cp /usr/src/linux/System.map /tmp/libretto/stage2/boot/System.map rdev /tmp/libretto/stage2/boot/vmlinuz /dev/hda2 rdev -s /tmp/libretto/stage2/boot/vmlinuz /dev/hda3 Again, the make commands may take anywhere from a few minutes to an hour or more. The rdev commands set the root and swap partitions to be used by the stage 2 kernel; these correspond to the Linux parti- tions to be created on the Libretto's internal drive. (If your desk- top PC does not have any IDE drives, these rdev commands will fail unless you first create /dev/hda2 and /dev/hda3; use /dev/MAKEDEV to do so if necessary.) 4. Make a set of modules (excluding the PCMCIA modules), and install them in /tmp/libretto/stage2: make modules make PREFIX=/tmp/libretto/stage2 modules_install 5. Configure the pcmcia-cs package: cd /usr/src/pcmcia-cs make config This time, specify /tmp/libretto/stage2 as the alternate target install directory; the other questions should be answered as for stage 1. 6. Now compile the PCMCIA modules and install them in /tmp/libretto/stage2: make all make install 44..22..44.. CCrreeaattiinngg bboooott ddiisskkeetttteess Insert a blank diskette in your desktop PC's diskette drive, and type: cp /tmp/libretto/boot/vmlinuz /dev/fd0 Label this diskette ``Libretto stage 1 boot''. Insert a second blank floppy in your diskette drive, and type: cp /tmp/libretto/stage2/boot/vmlinuz /dev/fd0 Label this diskette ``Libretto stage 2 boot''. 44..22..55.. CCrreeaattiinngg aa rroooott ZZiipp ddiisskk The Zip drive should be installed on your desktop PC for this step. If the kernel running on your desktop PC doesn't include ppa support, you may need to make a new kernel for your desktop PC as well. In this case, ppa support can be added as a module (since you won't need to use the Zip drive to mount the root partition there). If you use a parallel printer or PLIP on your desktop PC, support for these should be disabled or compiled as modules, since either will otherwise interfere with access to the Zip drive. My desktop PC has a regular SCSI disk (sda) and a SCSI Jaz drive (sdb), so the Zip drive is recognized as sdc. Note the name that your Linux kernel associates with your Zip drive when your desktop PC is rebooting. Prepare the Zip disk by creating root and swap partitions using fdisk: fdisk /dev/sdc (replacing /dev/sdc with the device name for the Zip drive on your system) to obtain the following partition table: Disk /dev/sdc: 64 heads, 32 sectors, 96 cylinders Units = cylinders of 2048 * 512 bytes Device Boot Begin Start End Blocks Id System /dev/sdc1 1 1 81 82928 83 Linux native /dev/sdc2 82 82 96 15360 82 Linux swap Be very careful to partition the Zip disk and not your system disk! Check the partition table carefully (using fdisk's p command) before writing it to the disk and exiting. Next, format these partitions: mke2fs -c /dev/sdc1 mkswap -c /dev/sdc2 15360 The mke2fs shows its progress as it runs, taking about half an hour on my system (this might be significantly faster on a machine that supports one of the faster ppa modes, but my desktop PC's parallel port was restricted to 4-bit mode). The mkswap command took around 10 minutes, I think, and gave no evidence of activity until it finished. Be patient! Next, make a mount point for the Zip disk's root partition and mount it: mkdir /zip mount /dev/sdc1 /zip -t ext2 John Wiggins, jwiggins@comp.uark.edu, has written an excellent guide for the next steps, _I_n_s_t_a_l_l_i_n_g _L_i_n_u_x _o_n _Z_I_P _d_i_s_k _u_s_i_n_g _p_p_a _Z_I_P _D_r_i_v_e _M_i_n_i_-_H_o_w_t_o, . I wrote a script, , that automates much of the task of building a Linux root partition on a Zip disk. The script installs the RHL ``base'' set of RPMs on the Zip disk, creates an initial etc/ld.so.cache and an initial etc/fstab, copies the files in /tmp/libretto (created above) into the appropriate places in the Zip disk's file system, creates a PCMCIA configuration file (etc/sysconfig/pcmcia), and makes a link for the Libretto's pointing device from dev/psaux to dev/mouse. Mount the first CD-ROM from the Red Hat Linux 5.0 set, and go into its RedHat/RPMS directory (or make a directory on your hard drive and fill it with the RPMs from Red Hat's FTP site). Run install-to-zip from within this directory. On my desktop PC, install-to-zip takes about 45 minutes to run, because the Zip drive is slo-o-o-o-ow, at least in nibble mode. While waiting for this to finish on the desktop PC, you can go ahead to the next step on the Libretto. 44..33.. PPaarrttiittiioonniinngg tthhee LLiibbrreettttoo''ss hhaarrdd ddrriivvee Although it is possible (indeed, if you use this approach, necessary) to run Linux from an external Zip disk attached to the Libretto, this is only a preparatory step on the way to running Linux from the Libretto's internal disk. As in most Linux installations, we will need to create partitions on this disk for Linux. An important point to remember is that the Libretto uses the last few cylinders of its hard drive to store its state when it goes into ``hibernation'' (suspend) mode. On the Libretto 50 and 70, with a maximum of 32 Mb of RAM, this region covers the last 18 cylinders. (The Libretto 20 and 30 can have at most 20 Mb RAM, and their hibernation region is reported to be proportionately smaller; presumably the 100CT, with a maximum of 64 Mb RAM, will have a larger suspend area.) The BIOS of the Libretto 50 and 70 (and presumably later models) hides these from software such as fdisk, and reports only the number of cylinders available for file systems. (Thus fdisk on the Libretto 70 reports that the total disk space is 1516 Mb.) If your Libretto is a different model, it would be a good idea to use DOS/Windows fdisk to check the partition size before changing anything, and then to avoid using any cylinders other than those already allocated. If you move your hard drive to another machine to install Linux, be aware that these ``hidden'' cylinders will appear, but _t_h_e_y _m_u_s_t _n_o_t _b_e _u_s_e_d. It's also important to be sure that LBA (logical block addressing) is enabled on your second machine (as on the Libretto) if you use this approach. The IBM DDLA-21620 disk used in the Libretto 70 has 3152 cylinders, 16 heads, and 63 sectors. LBA remaps each set of 4 physical cylinders into 1 logical cylinder, so that (if removed and installed in another machine with LBA enabled) the disk appears to have 788 cylinders, 64 heads, and 63 sectors. Within the Libretto 70, the BIOS hides the last 18 logical cylinders, so that the disk appears to have 770 cylinders, 64 heads, and 63 sectors. 44..33..11.. SShhrriinnkkiinngg tthhee WWiinnddoowwss ppaarrttiittiioonn Before you do anything to your Libretto's hard drive, you should prepare a Windows 95 emergency boot diskette in case of problems, and back up the system software and any of your own files. There is very little chance that you will need these diskettes as a result of installing Linux on your Libretto, but (paraphrasing Jerry Pournelle) if you ever do need them, you will need them badly. To repartition the Libretto's disk, you can use either FIPS (a DOS utility included with RHL, or available by FTP from any of the Linux archive sites), or a commercial application such as Partition Magic. Of course, if you don't need to play reversi occasionally, you can simply delete the Windows partition :-). (In fact, it is probably a good idea to retain a small Windows partition so that you can read and write floppy disks, and tune up the power-saving features of the Libretto to your liking.) The disk of the Libretto 70 is large enough that the notorious Windows FAT32 file system might be an issue. Mine was delivered with a FAT16 file system, which FIPS can handle without difficulty. If you have succumbed to the temptation to convert yours to FAT32 format (a possibility offered to you by Windows fdisk), you will probably need to use Partition Magic rather than FIPS (but look at _L_i_n_u_x _F_A_T_3_2 _S_u_p_p_o_r_t, , for the latest news on a revised FIPS and on adding FAT32 support to the Linux kernel). Read the documentation for your chosen repartitioning utility and follow its instructions to the letter. I squeezed my Windows 95 FAT16 partition down to an even 500 Mb. (This should leave enough room to install reversi from my old Windows 3.0 disks ....) 44..44.. BBoooottiinngg LLiinnuuxx oonn tthhee LLiibbrreettttoo Once install-to-zip has finished on the desktop PC, we're ready to boot Linux on the Libretto for the first time. Shut down the desktop PC and the Libretto. Move the Zip drive, with the disk created by install-to-zip, from the desktop PC to the Libretto's port replicator, attach the port replicator and the floppy drive to the Libretto, load the ``Libretto stage 1 boot'' diskette you made earlier, and turn on the Libretto. If all goes as it should, the Libretto should boot Linux from the diskette, and continue running from the Zip drive. If Linux boots, but stops with a kernel panic when attempting to mount the root partition, this is probably the result of not properly setting the root device on the diskette using rdev (see above). Other error messages while booting may be ignored for now. Once you see the localhost login: prompt, you are ready to proceed. Log in as root (at this point, there is no password). 44..55.. CCrreeaattiinngg ppaarrttiittiioonnss ffoorr LLiinnuuxx Now we can create Linux root and swap partitions on the Libretto's hard drive. Type: fdisk /dev/hda On my Libretto, after having reduced the size of the Windows partition, fdisk reported that the partition table looked like this: Disk /dev/hda: 64 heads, 63 sectors, 770 cylinders Units = cylinders of 4032 * 512 bytes Device Boot Begin Start End Blocks Id System /dev/hda1 * 1 1 254 512032+ 6 DOS 16-bit >=32M I created a single large partition for Linux, and a (slightly under) 32 Mb Linux swap partition: /dev/hda2 255 255 754 1008000 83 Linux native /dev/hda3 755 755 770 32256 82 Linux swap You may wish to make a smaller root partition, and then create additional partitions for /home, /tmp, and possibly others as well. This strategy has definite advantages, particularly for a multi-user machine; the drawback is that you must know at the outset how much space each partition will require, and this is not always easy to estimate. Check your partition table carefully using fdisk's p command before committing it to disk and exiting from fdisk. Now format the partitions you have created. In my case, I did this: mke2fs -c /dev/hda2 mkswap -c /dev/hda3 32256 (The number at the end of the mkswap command should match the size of the swap partition you have created, as reported by fdisk. If you created additional partitions, format them using mke2fs as above.) 44..66.. IInnssttaalllliinngg LLiinnuuxx oonn tthhee hhaarrdd ddrriivvee Now we are ready to begin the main installation process. At this point it should be possible to mount the newly created ext2fs file system: mount /linux (Read /etc/fstab to see why this works.) 44..66..11.. TTrraannssffeerrrriinngg tthhee ZZiipp ddiisskk ccoonntteennttss ttoo tthhee hhaarrdd ddrriivvee The install-to-zip script created a small install-from-zip script that will replicate the contents of the Zip disk on the Libretto's hard drive, so this step is easy: sh /tmp/install-from-zip This script will take about 20 minutes or so to complete; when it does, log out. 44..66..22.. BBoooottiinngg ffrroomm tthhee ssttaaggee 22 ddiisskkeettttee At this point, it should be possible to boot from the ``Libretto stage 2 boot'' diskette. Use the halt command to shut down Linux gracefully. If your BIOS is suitably configured, this command will power down the Libretto after halting; otherwise, power it down manually. Unload the Zip disk, insert the ``Libretto stage 2 boot'' diskette, and reboot. If this doesn't work, the rdev commands may not have been correct; you can run the correct commands on your desktop PC if necessary. It is also possible that the install-from-zip script may not have completed successfully. _I_n _a_n_y _c_a_s_e_, _d_o _n_o_t _c_o_n_t_i_n_u_e _u_n_t_i_l _y_o_u _a_r_e _a_b_l_e _t_o _b_o_o_t _s_u_c_c_e_s_s_f_u_l_l_y _f_r_o_m _t_h_e _s_t_a_g_e _2 _d_i_s_k_e_t_t_e. 44..66..33.. IInnssttaalllliinngg LLIILLOO ((ooppttiioonnaall)) If all has gone well so far, you may install LILO so that it will be possible to boot directly from the hard drive without needing a boot diskette. First, examine /etc/lilo.conf, which should look like this: boot=/dev/hda2 map=/boot/map install=/boot/boot.b prompt timeout=50 image=/boot/vmlinuz label=linux root=/dev/hda2 read-only other=/dev/hda1 label=win95 loader=/boot/chain.b table=/dev/hda This configuration will cause LILO to boot Linux by default (i.e., if you do not type ``win95'' within 5 seconds after the LILO boot: prompt appears). If you prefer to boot Windows 95 by default, for whatever reason, edit /etc/lilo.conf, rearranging the stanzas like this: boot=/dev/hda2 map=/boot/map install=/boot/boot.b prompt timeout=50 other=/dev/hda1 label=win95 loader=/boot/chain.b table=/dev/hda image=/boot/vmlinuz label=linux root=/dev/hda2 read-only If any of this is unfamiliar, review the LILO documentation before continuing, or skip the rest of this section and continue booting using the stage 2 diskette for now. If you are satisfied with /etc/lilo.conf and wish to install LILO, type: /sbin/lilo This command installs LILO at the beginning of the Linux partition (it does not modify the master boot record, so if you have second thoughts, you should still be able to boot Windows 95 by removing the Linux boot diskette and rebooting in the usual way). To allow LILO to control the boot process, use fdisk's a command to make /dev/hda2 (the Linux root partition) bootable, and mark /dev/hda1 (the Windows 95 partition) as non-bootable. My partition table looks like this, viewed using fdisk's p command: Disk /dev/hda: 64 heads, 63 sectors, 770 cylinders Units = cylinders of 4032 * 512 bytes Device Boot Begin Start End Blocks Id System /dev/hda1 1 1 254 512032+ 6 DOS 16-bit >=32M /dev/hda2 * 255 255 754 1008000 83 Linux native /dev/hda3 755 755 770 32256 82 Linux swap 44..66..44.. UUnniinnssttaalllliinngg LLIILLOO If for any reason you wish to return to the status quo ante (booting Windows 95 unless a Linux boot floppy is loaded), boot Linux and use fdisk to mark the Windows 95 partition as bootable once again. 44..77.. AAcccceessss ttoo ootthheerr ffiillee ssyysstteemmss uunnddeerr LLiinnuuxx 44..77..11.. TThhee WWiinnddoowwss ppaarrttiittiioonn The install-from-zip script makes the Windows partition accessible in the /dos directory. Windows 95 long filenames appear correctly. All users can read files in the /dos directory; root permissions are needed in order to create, modify, or delete files there. 44..77..22.. DDiisskkeetttteess It does not appear to be possible to read diskettes under Linux, since Linux does not use the BIOS to access diskettes and the only access appears to be via the BIOS (Toshiba has not released information about the interface). Of course, you can always copy files between the diskette drive and the Windows partition while running Windows, and read or write files on the Windows partition while running Linux, as noted above. I have not yet investigated the possibility of access to diskettes via dosemu under Linux. 44..77..33.. ZZiipp ddiisskkss If you have formatted partition 1 of a Zip disk as a Linux ext2 file system, you may mount it using the command mount /zip If you have a DOS- or Windows-formatted Zip disk, you can mount it using the command mount /dev/sda4 /zip -t vfat (Root permissions are required in this case.) Always unmount a Zip disk using umount /zip before removing it from the drive or turning the drive off. All users can mount and unmount Zip disks, and read files in the /zip directory; root permissions are needed to create, modify, or delete files in the /zip directory. 44..77..44.. CCDD--RROOMMss If you have a supported PCMCIA SCSI adapter and a compatible CD-ROM drive, it is easy to read CD-ROMs under Linux. Attach the CD-ROM drive to the adapter, turn on the drive, and load a CD-ROM into the drive. Boot Linux and log in as root, then insert the SCSI adapter into the PCMCIA slot of the Libretto. You should hear two beeps at the same pitch (the first signals that a PCMCIA device has been inserted, and the second indicates that it has been successfully configured). If the second beep is at a lower pitch than the first, the device was not configured successfully. If you have logged into the first virtual console, you will also see detailed status messages; on my Libretto, this report appears when I plug in my Adaptec SCSI adapter and Sony PRD-650 CD-ROM drive: aha152x: processing commandline: ok aha152x: BIOS test: passed, detected 1 controller(s) aha152x0: vital data: PORTBASE=0x340, IRQ=9, SCSI ID=7, reconnect=enabled, parity=enabled, synchronous=disabled, delay=100, extended translation=disabled aha152x: trying software interrupt, ok. scsi1 : Adaptec 152x SCSI driver; $Revision: 1.18 $ scsi : 2 hosts. Vendor: SONY Model: Discman PRD-650 Rev: 1.00 Type: CD-ROM ANSI SCSI revision: 02 Detected scsi CD-ROM sr0 at scsi1, channel 0, id 3, lun 0 Disc change detected. Once the hardware has been recognized, type mount /cdrom and the CD-ROM contents should be readable within the /cdrom directory. Before changing CD-ROMs, type umount /cdrom Always unmount the CD-ROM in this way before removing the SCSI adapter or turning the CD-ROM drive off. 44..88.. CCoommpplleettiinngg tthhee RRHHLL 55..00 iinnssttaallllaattiioonn At this point, you should have a Libretto that runs either Linux or Windows 95 from its internal disk (possibly requiring a Linux boot floppy to run Linux, if you skipped the last section above). We have only a bare-bones Linux installation so far, however. Unfortunately, Red Hat does not support any easy way to bootstrap a more complete Linux installation on a running (minimal) Linux PC. (The usual way requires booting from a floppy, which, as we have seen, doesn't work for the Libretto.) There is, however, an easy way to install nearly everything in RHL 5.0 on a Libretto 70 with very little effort, provided that you have a supported PCMCIA SCSI adapter with an attached CD-ROM drive as described above: simply mount the RHL 5.0 CD- ROM 1 on /cdrom as above, then type: cd /cdrom/RedHat/RPMS rpm -i -h -v --nodeps * Depending on the speed of your CD-ROM drive, this command will require between 20 minutes and an hour to complete. When it is finished, update the RPM dependency database using the command: rpm --rebuilddb On a Libretto 50, you will need to be selective in determining which RPMs to install, since there will not be enough room for all of them unless you have reduced the size of the Windows 95 partition severely. 44..88..11.. IIff yyoouu ddoonn''tt hhaavvee aa PPCCMMCCIIAA CCDD--RROOMM ddrriivvee There are many alternatives to the procedure described above. A simple (though somewhat time-consuming) solution is to copy the RPMs from the RHL CD-ROM to Zip disks and then to install them using the same procedure as above. Use your desktop PC to repartition and reformat additional Zip disks as needed (you do not need to create a swap partition as we did for the root disk, but you should format partition 1 as an ext2 file system before using a new Zip disk). Copy up to 100 Mb of RPMs onto each Zip disk, and use ``mount /zip'' on the Libretto to make a Zip disk accessible. 55.. IInnssttaalllliinngg uuppddaatteess aanndd ootthheerr ppaacckkaaggeess A few packages from the RHL 5.0 CD-ROM 1 do not get installed properly using the methods described above. These packages, which include manpages, moontool, zsh, and Xmetro, can be identified using the package management tool available as part of the control_panel X application, which can be used to install these if desired. Read about the package management tool in the RHL 5.0 manual. Red Hat's web site, , offers a large and growing collection of security-related and other updated RPMs. It is a good idea to collect these on a Zip disk, and then to install them on the Libretto as for the RPMs on the CD-ROM. 66.. XX1111RR66 oonn tthhee LLiibbrreettttoo Once you have installed the RPMs, setting up the X Window System is easy. Don't bother with Xmetro -- it won't work. Run Xconfigurator, specifying the video card as a Chips & Technologies 65550, with 1 Mb of video RAM, and a ``custom'' monitor, with 640x480 resolution @ 60 Hz (the first choice on the menu). The mouse is a PS/2 mouse, and you should enable 3-button emulation. The XF86_SVGA server runs flawlessly in either 8-bit (256-color), 16-bit (64K color), or 24-bit (16M color) mode. (Xconfigurator does not configure the 24-bit mode; you must do this manually.) See my ; install it in /etc/X11 and use the startx command to try it out. Fujiwara Teruyoshi, fjwr@mtj.biglobe.ne.jp, points out that the Libretto's LCD displays at most 4096 colors, so that there may be little use for 24-bit mode unless you are using an external monitor. 66..11.. OOppeenn WWiinnddoowwss aanndd XXVViieeww Now a brief digression: I did most of my work on Sun workstations for about 10 years, until I started using Linux heavily around 1994. One of the special attractions of Linux for me was its support of Sun's freely available (but unfortunately not widely used) XView toolkit, because this offered the chance to tell all of my colleagues that, yes, they could run my software on their PCs, if only they got a _r_e_a_l operating system (Linux, of course). Since then, I've continued to develop my XView-based software under Linux. Sadly, XView has been left out of Red Hat 5.0, so I went back to my RHL 4.2 CD-ROM and installed xview (and 3 related packages: xview-clients, xview-devel, and xview-devel-examples) using the package manager. (These packages are also still available from Red Hat's FTP server, in .) These work without problems, provided that the ld.so update available from Red Hat's FTP site has been installed. To use olvwm, the Open Look Virtual Window Manager, be sure that /usr/openwin/bin is in your PATH, then start X and olvwm using the openwin command. 77.. UUsseerr aaccccoouunnttss aanndd ppaasssswwoorrddss After completing the Linux installation, set a password for root using the passwd command. Even if you are the only user, make a separate account for yourself (using the User/Group tool included in the control_panel application; see the RHL 5.0 manual for information about setting up accounts). 88.. NNeettwwoorrkkiinngg Before you even consider attaching your Libretto to a network, install all of Red Hat's security-related updates, protect all accounts with good passwords, turn on shadow passwords (run /usr/sbin/pwconv to do this), and deny access to your Libretto from outside by editing /etc/hosts.deny so that it contains the single line ALL: ALL You can then allow local access by editing /etc/hosts.access so that it contains the single line ALL: LOCAL With files set up in this way, your Libretto should be reasonably secure while you decide what security policies you may wish to adopt in the long run. TCP/IP networking using a PCMCIA Ethernet card is straightforward. Insert your Ethernet card, physically connect it to your network, then use Red Hat's X11-based netcfg utility (also available from the control-panel application) to set up networking. If you prefer not to use netcfg, see the NET-3-HOWTO for details on setting up your configuration files. 88..11.. NNeettssccaappee You can download Netscape's Navigator web browser (or the entire Netscape Communicator suite) for Linux from Red Hat's or Netscape's web sites. Netscape 4.04 installs and runs well under RHL 5.0, although you should avoid transferring Netscape configuration files from another system, since doing so may make it difficult to configure Netscape properly for the Libretto's 640x480 screen. 88..22.. SSSSHH If you use your Libretto for remote access to other computers, ssh is a much better choice than the traditional telnet, for security reasons. Visit the _S_s_h _(_S_e_c_u_r_e _S_h_e_l_l_) _H_o_m_e _P_a_g_e, , for information and links to sites from which ssh may be downloaded freely. The current version, ssh-1.2.25, compiles and works without problems on the Libretto. 99.. AAddvvaanncceedd PPoowweerr MMaannaaggeemmeenntt ((AAPPMM)) The Libretto 70 has BIOS support for APM 1.1, but you must enable it in the BIOS setup (accessible by pressing and holding the Esc key while booting, then pressing F1 when prompted to do so), or within Toshiba's Power Saver application (accessible from the Windows 95 Control Panel). APM support is included in the kernel if you have followed the instructions above. The relevant settings in /usr/src/linux/.config are: CONFIG_APM=y # CONFIG_APM_IGNORE_USER_SUSPEND is not set CONFIG_APM_DO_ENABLE=y CONFIG_APM_CPU_IDLE=y # CONFIG_APM_DISPLAY_BLANK is not set CONFIG_APM_POWER_OFF=y The Libretto has a particularly nice feature referred to by Toshiba as ``hibernation mode'', which (if properly configured) allows you to suspend the Libretto simply by folding the display panel down over the keyboard. I used Toshiba's Power Saver application to set my Libretto to suspend when the panel is closed, and to shut off after 10 minutes in hibernation if the system is running on battery power. When the Libretto enters hibernation mode, it saves its state (the contents of RAM) in the hidden portion of its internal disk, and then shuts off the disk drive. If the display is reopened within 10 minutes, the contents of RAM are unchanged and the system can be used immediately. After 10 minutes, or if the battery has been changed, the contents of RAM are restored from disk, an operation that takes about 20 seconds. When resuming operation after the Libretto has been suspended while an X session is in progress, I have occasionally found that the mouse pointer will be frozen for as much as 30 seconds. This seems to occur only if I attempt to move the mouse pointer while RAM is being restored from disk, or within a second or two afterwards. It appears that this problem can be completely avoided simply by not touching the mouse for a few seconds after resuming operation. Another harmless effect occurs when running X in 24-bit color mode: the mouse pointer becomes black (not invisible, just black) after return from hibernation. The state of the battery can be determined by examining /proc/apm, for example, like this: cat /proc/apm 1.2 1.1 0x02 0x00 0x01 0x02 47% -1 ? (In this case, the output, shown on the second line above, indicates that the battery charge is at 47% of capacity.) The estimated time remaining, available from some APM implementations, is apparently not provided by the Libretto. The flag bits indicate if the Libretto is running on battery or external power (experiment to see how this works). The kernel is configured to attempt to reduce power consumption while idle, and it also supports turning off the Libretto upon a system halt. It is thus possible to use the command shutdown -h now to shut down Linux cleanly and turn the system power off. In combination with wakeup mode (accessible from the Windows 95 Power Saver application, or from the BIOS setup), the Libretto can thus be made to turn itself on at a scheduled time, perform some task, and then turn itself off again. (To access the BIOS setup, hold down Esc while the Libretto is booting, then press F1 when prompted to do so.) You may wish to obtain the Linux APM utilities, ; these include xapm, a tiny X11-based application that displays a battery status indicator in an X-window. Also check out the _B_a_t_t_e_r_y _P_o_w_e_r_e_d _L_i_n_u_x _M_i_n_i_-_H_O_W_T_O, . 1100.. SSoouunndd ssuuppppoorrtt Sound support is also included in the kernel if you have followed the instructions above. The relevant settings in /usr/src/linux/.config are: CONFIG_SOUND=y CONFIG_AUDIO=y CONFIG_MIDI=y CONFIG_YM3812=y # CONFIG_PAS is not set CONFIG_SB=y CONFIG_ADLIB=y # CONFIG_GUS is not set # CONFIG_PSS is not set # CONFIG_MPU401 is not set # CONFIG_UART6850 is not set CONFIG_UART401=y CONFIG_MSS=y # CONFIG_SSCAPE is not set # CONFIG_TRIX is not set # CONFIG_MAD16 is not set # CONFIG_MAUI is not set SBC_BASE=220 SBC_IRQ=5 SBC_DMA=0 SB_DMA2=1 SB_MPU_BASE=330 SB_MPU_IRQ=5 MSS_BASE=530 MSS_IRQ=5 MSS_DMA=1 DSP_BUFFSIZE=65536 The Libretto is not capable of accepting sound input, and the output through the tiny speaker next to the display panel is fair at best. Using the stereo output jack to drive headphones or external speakers, however, much better sound can be obtained. To test the sound driver, try cp "/dos/windows/media/The Microsoft Sound.wav" /tmp/tms.wav play /tmp/tms.wav If you have a MIDI file, such as the ``canyon.mid'' demonstration included with most Windows distributions (though not on the Libretto), try playing it using playmidi (or, under X, xplaymidi). Use an application such as xmixer to adjust output volume and balance. Fujiwara Teruyoshi, fjwr@mtj.biglobe.ne.jp, reports that the Libretto's audio output may be corrupted after resuming from hibernation, and that this can be fixed either by playing a very short audio file, or by compiling the sound driver as a module and loading it via kerneld. This problem may be specific to the Libretto 50; I haven't encountered it on the 70. 1111.. WWiisshh lliisstt A few things I haven't yet done: +o As noted earlier, I haven't set up dosemu yet, but I would like to find out if this might offer a way to use the diskette drive indirectly while Linux is running. +o I haven't figured out how to get the IrDA port working under Linux yet. The only other IrDA-equipped device I have is an HP Laserjet 5MP, which seems totally uninterested in whatever the Libretto might be transmitting from the IrDA port. As an aside, getting this to work under Windows 95 is not documented and is fairly tricky. Following Toshiba technical support's recommendation, I moved the IrDa port from (COM2, IRQ3) to (COM3, IRQ4), changing the other serial port from (COM1, IRQ4) to (COM2, IRQ3) to avoid a conflict. Using the Windows Add New Hardware wizard with automatic searching turned off, I added support for a generic IR device, which (under Windows) is implemented as a pair of virtual ports (COM4 and LPT3). Having done this, I installed my printer driver, specifying that the printer is attached to LPT3. This works, but interferes with hibernation mode under Windows 95 for unknown reasons (although hibernation mode under Linux continues to work properly). The Linux/IR Project is working on an IrDA-compliant protocol stack for Linux, which when completed will support networking between IrDA-equipped computers as well as printing. Visit their web site, , for further information. +o Modems and PPP or SLIP networking on the Libretto remain unexplored so far. Both the stage 1 and the stage 2 kernels support PPP and SLIP (via modules), so it should be possible to configure either service in the same way as on any other Linux PC if you have the hardware. Under Windows 95, the Libretto can be configured to turn off a PCMCIA modem when it is not in use, which is highly desirable if you usually leave a modem in the PCMCIA slot. These cards typically drain the battery rapidly and may cause overheating if powered on for long periods. (The Libretto protects itself from damage with a thermal sensor that shuts it down if it gets too hot.) For another alternative to Ethernet networking, see Grant Taylor's _P_o_r_t_a_b_l_e _C_o_m_p_u_t_i_n_g _w_i_t_h _L_i_n_u_x pages, . 1122.. TToopp tteenn rreeaassoonnss ttoo rruunn LLiinnuuxx oonn aa LLiibbrreettttoo 1100.. Impress your friends. 99.. Develop and maintain your fine motor skills. 88.. Your CPU has only a finite number of cycles before it becomes senile. Don't waste them running Windows 95. 77.. Librettos are the environmentally conscious choice for running X11 -- they conserve endangered pixels. 66.. Unlike other notebooks, a Libretto will fit in your pocket -- if you have large enough pockets. (Joking aside, mine gets a lot of use because it goes everywhere; unlike other laptops, there isn't a major ``threshold of need'' that must be exceeded to outweigh the inconvenience of dragging it along.) 55.. With xephem (see ), a Libretto running Linux is smaller and more useful than a set of star charts for amateur astronomers. If you aren't an amateur astronomer yet, get xephem and look up at the sky tonight. 44.. Do anything your workstation could do two years ago, anywhere. 33.. Compile new kernels while commuting. (Demonstration performed on closed roads by professional drivers. Always use safety belts. Kids, don't try this.) 22.. If the One True Editor was meant to run under Windows, it would have a menu bar instead of key bindings like Esc+Meta+Alt+Ctrl+Shift. (What's that? It has a menu bar, too? Never mind, then....) 11.. Who needs floppy disks anyway? 1133.. DDiissccllaaiimmeerr I hope that the information contained in this document helps you to do something useful. If it's incorrect or misleading, please tell me so I can fix it! Anything you do with a computer has the potential to cause RSI, financial hardship, plagues of locusts, and other unanticipated consequences. This is no exception, so please take responsibility to be informed about what you are doing.