Date: August 2005
Reviewed and edited in January 2012
This is my report on how I installed Debian GNU/Linux 3.1 r0a Sarge for i386 on Toshiba Libretto 50.
My goal of the installation is to make my Libretto a server connected to intranet LAN that runs a private web server, which cannot be accessed from the Internet. So, I do not need desktop environments such as GNOME or KDE. I know some people have already reported on how to enable 16bit sound on Libretto 50 under Linux, but I do not need it because my Libretto will run basically as a server.
Libretto 50/60/70 have almost identical hardware except for CPU speed, dimensions and capacities of hard disks, and other few stuffs.
For that reason, the general principles should apply equally to the following models:
When I tried installation, I had a serious trouble in activating the ISA-to-PCMCIA Bridge controller. Until I finally found a way to activate ISA-to-PCMCIA Bridge controller, PCMCIA did not work. I needed to modify /etc/default/pcmcia to get the ISA-to-PCMCIA Bridge controller to work.
There are many strategies suggested by others to install Linux on Libretto.
I had a laptop computer with floppy drive, CD-ROM drive, and built-in ethernet LAN.
So, I used the following strategy:
Take out the hard disk from Libretto, and install OS on the hard disk by using another laptop computer, and then place the hard disk back to Libretto.
I took the following steps to install Debian GNU/Linux 3.1 Sarge for i386 on Toshiba Libretto 50:
Prepare installation media. Obtain or create CD-ROMs or other media of Debian GNU/Linux 3.1 Sarge for i386. If you need to boot from floppy disks, create the floppy disks before you proceed.
Take the hard disk drive out of Toshiba Libretto 50. To do that, unscrew the two screws on the back as you can see in the following photo. You can pull the handle that attaches the hard disk.
Insert the hard disk drive to another laptop computer, on which you know you can install GNU/Linux 3.1 Sarge for i386 without any problems. If you have an adapter which connects 2.5 inch hard disks to 3.5 inch hard disk connector, then you can use desktop computer instead of a laptop computer.
Make partitions on the hard disk by using that laptop computer.
When you make partitions on the hard disk by using a computer other than Libretto 50/60/70, do not make a partion that spans the last 32MB at the end of the hard disk. Leave the last 32MB space free and unused. If Libretto entered hibernation mode, Libretto's system BIOS would write physical RAM's data on the last 32MB free space of the hard disk, independently of the type of the OS. I am not sure if the Libretto's BIOS would write the same data size as physical RAM's size on hard disk when hibernation. I think you would better spare the last 32MB at the end of the hard disk, even if your Libretto has less than 32MB of RAM.
I did not use MS Windows' fdisk.exe for Linux partition, but if you made FAT partitions on a hard disk inside Libretto 50/60/70 by using MS Windows' fdisk.exe, then the Libretto's system BIOS would hide the last 32MB free space of the hard disk.
In my installation, I simply made one Linux native partition and one swap partition on TOSHIBA MK0803MAT 810MB HDD.
If you upgraded your Libretto's hard disk, the location of the last free space would be different from the following table:
The partition /dev/hda1 has 738.0MB, and its file system is ext3, which will be mounted as /.
The partition /dev/hda2 has 40.3MB, which will be used as swap partiton.
remaining free space has 37.2MB.
# fdisk /dev/sda Command (m for help): p Disk /dev/hda: 815 MB, 815431680 bytes 32 heads, 63 sectors/track, 790 cylinders Units = cylinders of 2016 * 512 = 1032192 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 715 720688+ 83 Linux /dev/hda2 716 754 39312 82 Linux swap / Solaris
In my partitioning, the last free space of 37.2MB had 72576 sectors,
starting at Cylinder 754 (when the first cylinder numbered zero), Head 0, Sector 0, and
ending at Cylinder 789, Head 31, Sector 62.
Actually, the beginning of the last free space can be at Cylinder 755 (when the first cylinder is numbered as 0), Head 0, Sector 1 to minimize the last unused space.
The following calculation would explain the numbers in the output of fdisk command (and cfdisk command).
Each sector has 512 bytes. That is 512 bytes/sector.
(64 sectors - 1 sector) * 32 heads = 2016 sectors per cylinder.
(64 sectors - 1 sector) * 32 heads * 512 bytes/sector = 2016 sectors * 512 bytes/sector = 1032192 bytes per cylinder.
/dev/hda (the whole hard disk drive) has 790 cylinders.
1032192 bytes per cylinder * 790 cylinders = 815431680 bytes in the whole hard disk drive.
The first partition /dev/hda1 has 715 cylinders.
2016 sectors per cylinder * 715 cylinders = 1441440 sectors.
1441440 sectors - 63 sectors of offset = 1441377 sectors.
1441377 sectors * 512 bytes/sector = 737985024 bytes.
737985024 bytes / 1024 = 720688.5 KiB. (See "720688+" in the Blocks number column in the fdisk output)
Install Debian Linux by using the laptop computer. You do not need to do anything specific to Libretto at this stage. I installed kernel 2.6.8. Make sure that you install pcmcia-cs package and hotplug package.
Note: The hotplug package became obsolete in Linux distributions which include udev package.
udev is the device manager for the Linux kernel.
Primarily, udev manages device nodes in /dev.
udev is the successor of devfs and hotplug, which means that it handles the /dev directory and all user space actions when adding or removing devices.
The Linux kernel version 2.6.13 introduced a new version of the uevent interface.
Debian version 4.0 etch, released on 2007-04-08, had kernel 2.6.18.
The hotplug package conflicts with udev package.
Finish all the essential setup.
Take the hard disk drive out of the laptop computer, and insert it to Libretto.
Power on Libretto. Login as root.
Open and edit the following file with your favorite text editor: /etc/default/pcmcia
The content of /etc/default/pcmcia would look like this:
# Defaults for pcmcia (sourced by /etc/init.d/pcmcia)
PCMCIA=yes
PCIC=yenta_socket
PCIC_OPTS=
CORE_OPTS=
CARDMGR_OPTS=
Change the line "PCIC=yenta_socket" to "PCIC=i82365". You change it in this way because yenta_socket will work for PCI-to-PCMCIA but not for ISA-to-PCMCIA.
Save the file, and exit your text editor.
Type "shutdown -h now" at the shell command prompt in order to power off.
After you see "Power down." on the screen, push the power button for a second. That will cause Libretto to make a beep sound twice and to power off.
Power on Libretto. If you see the following messages, ISA-to-PCMCIA Bridge controller is working:
Linux Kernel Card Services options: [pci] [cardbus] [pm] Intel ISA PCIC probe: Intel i82365sl B step ISA-to-PCMCIA at port 0x3e0 ofs 0x00, 2 sockets host opts [0]: none host opts [1]: none ISA irqs (scanned) = 3,9,10,11,15 status change on irq 15
If ISA-to-PCMCIA Bridge controller is working, you would see the following output of "cardctl status" command when no PCMCIA card is inserted:
# cardctl status Socket 0: no card Socket 1: no card
Thanks to Manoj Srivastava for providing your report on enabling ISA-to-PCMCIA bridge.
http://lists.debian.org/debian-user/2001/08/msg04842.html
Excerpt:
Subject: Success: migrating ISA PCMCIA bridge and wavelan NIC to kernel2.4.7
From: Manoj Srivastava
Date: Sun, 26 Aug 2001 23:43:10 -0500Hi,
I finally managed to get my old ISA PCMCIA bridge working with the 2.4.X kernels (running 2.4.9 right now). I went from the stand alone pcmcia modules package to using the built in drivers in the 2.4.X kernels. I had to change two files; as shown below....
Toshiba Libretto 50CT
http://lists.debian.org/debian-laptop/2004/09/msg00150.html
Excerpt:
I have install Libranet 2.8 (mostly Sarge) on a drive which I then installed in my (new to me) Libretto. Everything except pcmcia went smoothly.
...
Debian Reference
Chapter 10 - Network configuration
10.10.5 Network configuration and PCMCIA
http://www.debian.org/doc/manuals/reference/ch-gateway.en.html#s-trigger-pcmcia
This report is listed at TuxMobil - Linux on laptops, notebooks, PDAs, mobile phones.
Installing Debian "Woody" Linux on the Libretto 50CT (I found the page around 2005. The page is unavailable now.)
Libretto 100 Experiences (I found the page in August, 2005. The page is unavailable now.)
Excerpt:
... The Libretto 100 has a few oddities about it. It is mostly PCI based, it's Graphics Chip, Infrared controller, and CardBus controllers are all PCI. However, the only device on the PCI bus that has an IRQ line is the Infrared controller. This means the CardBus controller must be polled for card insertion/removal. This is poor designing for a laptop, as PIO is much harder on the battery and heat generation than interrupt driven IO. The PIO nature of the CardBus controller will cause problems with alternative operating systems. Notably, I havn't gotten PCMCIA working at all on the *BSD's, because they apparently don't do PIO on the CardBus controller. Windows and Linux both work fine, though read the PCMCIA under Linux section if you're interested in running Linux on the L100.
...
Strangely, the IDE controller is not PCI based on the L100. This is probably because it is based on the Libretto 50/70 design, and Toshiba kept most parts the same. The sound card, IDE controller, PS/2 controller and many other devices are the same components as on the L50/L70.
...
PCMCIA CardServices Under Linux
The Lib100 uses a ToPIC97 PCI->CardBus bridge. The ToPIC97 does not have an IRQ line to it, and this causes some problems with newer versions of PCMCIA card services. I've had no problems with the 2.2 kernel series and the 3.1.xx pcmcia card services, the cardmgr just runs in a polling mode. However, I've not gotten it working with the 2.3.99preX series with the builtin kernel PCMCIA services. Hope it gets fixed for 2.4 kernels.
...
Journal de Debian sur le Toshiba Libretto 50CT (Report in French. I found the page in August, 2005. The page is still available in January 2012.)
Linux and the Toshiba Libretto 100CT (I found the page around 2005. The page is still available in January 2012.)
Excerpt:
Installing Zipslack
...
Installing Zipslack is a breeze, you just unzip it in the root directory of your drive under Win95 and then reboot the machine into MS-DOS by hitting the "F8" key on reboot and selecting "7" or "Safe mode command prompt only". Once you are in MS-DOS, change into the "linux" directory and edit the linux.bat file and find the right boot commands to boot off of your paticular drive (put examples here). Of course you can edit this under Windows. For the Libretto I used the line:
\linux\loadlin \linux\vmlinuz root=/dev/hda1 rw
...
PCMCIA Problems
I found three problems. One that I had some bogus multifunction card that was not supported by the PCMCIA drivers. It would work with the modem but not the ethernet. The solution there was to purchase a "Xircom CreditCard Ethernet 10/100+ / Modem 56" card.
The second was that Zipslack does not start up the pcmcia services. You need to change the line in /etc/rc.c/rc.M and rc.S to run /etc/rc.d/rc.pcmcia and not /etc/rc.d/rc.pcmcia.N. I would have make the file name "rc.pcmcia.N" and not have the rc.* files run the wrong file name for the default. This way if the pcmcia moudules are recompiled and installed it will come up running the pcmcia package.
The third problem took me on a bit of a wild goose chase. It seems I didn't have all of the different card support I needed so downloaded the pcmcia module package by David Hinds. A recompile and install later I was seeing my ethernet and modem card.
...
Installing RedHat Linux on a Toshiba Libretto 100CT - RedGrittyBrick (I found the page around 2005. The page is still available in January 2012.)
Excerpt:
Issues
Some areas that caused me difficulties were ...
- The "hibernation" disk partition used for hibernation mode. My first install of RH6 trampled over it. My subsequent
apm -S
probably trashed swap. Anyway, I ended up reinstalling.- The PCMCIA floppy disk drive is only good for booting the initial Linux boot disk. Since Linux doesnt have a driver for Libretto's oddball floppy drive, I couldn't load supplemental disks (for PCMCIA or Net support). The RedHat CD has separate boot-disk images that include pcmcia and networking but not as a single image?
- The NeoMagic video chipset was recognised but the video driver couldn't be set up properly by the installer. That was not too bad, I deferred X until I had the initial installation completed. (no longer an issue with recent RedHat releases
- Shrinking Windows partitions
I never have any luck shrinking Windows 9.x partitions with FIPS 1.5. I have tried this on several PCs. I suspect its because Windows' disk-defragmenter regards some files as unmovable and hence leaves them at the far end of the partition. I always end up using Partition Magic.- The Keyboard
At first it seems there is no way to key Ctrl+Alt+KeyPad-Plus or Ctrl+Alt+KeyPad-Minus because there is no obvious KeyPad-Plus key. These keys are used by XFree86 to switch video modes.
Libretto 70 CT and Linux : additional information (I found the page in August, 2005. The page is still available in January 2012.)
Excerpt:
...
1) Get the PCMCIA floppy drive
To make the external flopppy work you have to obtain the kernel patch by David Bateman (which I have slightly modified to make it work on more recent kernels). You can find this "patched patch" here : floppy_cs-1.02-fix2213.tar.bz2
Also obtain the source for the pcmcia package (I used 3.1.26) and the kernel source (I used 2.2.19).
...
3) Get the hibernation mode working on the larger harddisk
The only thing that caused me a real headache was the hibernation mode that uses a part on the harddisk to store the memory while the Libretto was switched off. If this part lays somewhere in the middle of a Linux partition the latter will be partly or wholly destroyed after one hibernation ....
In the original disk simply the last 18 cylinders were reserved for hibernation :
raw size of 1.6 GB disk :788/64/63 (C/H/S), Linux usable size :770/64/63 (C/H/S)
However, with this new disk things were much more complicated as the Libretto BIOS - just like many older PCs - can't recognize disks larger than 8.4 GB. After some disasters (a trashed second partition and a trashed swap space !) I found out that hibernation takes place in the first sectors AFTER the 8.4 GB.
To put things absolutely clear: it is NOT at the end of the 10 GB and it is also NOT just BEFORE the end of the 8.4 GB.
After finding this out I decided upon the following partitioning scheme that already works flawlessly for some time without causing any damage to the Linux partitions after several hibernations and fscks / memory checks :
Layout of the 10 GB disk : 1222 cylinders, 255 heads, 63 sectors
My partitioning scheme :
Linux partition : 1 - 192 (1.5 GB)
Work partition : 193 - 1015 (6.5 GB)
Swap partition : 1016 - 1023 ( 64 MB)
Hibernation : 1024 - 1929 ( 48 MB) (can be smaller : only need 32 MB)
Third partition : 1030 - 1222 (1.5 GB)Fdisk reports the following :
Disk /dev/hda: 255 heads, 63 sectors, 1222 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 192 1542208+ 83 Linux native
/dev/hda2 193 1015 6610747+ 83 Linux native
/dev/hda3 1016 1023 64260 83 Linux native
/dev/hda4 1024 1222 1598467+ 5 Extended
/dev/hda5 1024 1029 48163+ 70 DiskSecure Multi-Boot
/dev/hda6 1030 1222 1550241 83 Linux native4) Get Sound to work in 16 bit mode
...
/sbin/rmmod sb
/sbin/modprobe opl3sa2 io=0x220 mss_io=0x530 mpu_io=0x330 irq=5 dma=1 dma2=0...
Installing Debian 2.0 on a Libretto 100CT (I found the page around 2005. The page is unavailable now.)
Since the page is unavailable now, I include longer excerpt here.
Excerpt:
Installing Debian 2.x on a Libretto 100CT
INTRODUCTION
...
Since Linux does not support the Libretto's PCMCIA floppy drive, you need to somehow install the operating system without using floppies. This is somewhat tricky. There are numerous strategies I have seen suggested:
- Install from a parallel ZIP drive
- Install over the network using PLIP
- Install over the network using a PCMCIA Ethernet card.
I used the last method and it seemed to work quite well.
I started with the following hardware and software:
- Libretto 100CT running the pre-installed Windows 95 setup, with a D-Link DE660 PCMCIA ethernet card.
- Desktop PC dual booting Windows NT and Linux. 3Com 3c509 ethernet card.
PREPARING THE DESKTOP PC
- Make sure that Windows 95/NT can speak NetBEUI (to avoid having to configure TCP/IP on the Libretto '95 setup).
- Enable sharing of the machine's CD-ROM drive.
PREPARING THE LIBRETTO
- De-fragment drive C.
- Use FIPS to split the C drive into smaller partitions. You may need to download a new version of FIPS if your libretto is using FAT32 on its C drive. Read the FIPS manual for instructions on how to do this. Make sure your C drive is still large enough to hold the 600 MB of the Debian Binary CD.
- Make sure the NetBEUI protocol and appropriate driver for your PCMCIA ethernet card are installed.
- Open the desktop machine's CD-ROM share, and check you can read it across the network.
- Copy the contents of the binary CD-ROM to a directory C:\DEBIAN on your Libretto.
- Make a Windows 95 boot disk with a copy of FDISK.EXE and FORMAT.COM on it in case of disaster.
THE BASE DEBIAN INSTALLATION
- Reboot your Libretto. When it says 'Staring Windows 95' press F8 to get the boot menu.
- Choose Command Prompt Only.
- CD \DEBIAN\INSTALL
- Run BOOT.BAT. This should result in the Debian Installation running as 'normal'. Go through the normal Debian installation procedure. Take care of the following points:
- Be careful with repartitioning. There is a small unpartitioned area of the disk at the end which you must not touch, since the Libretto uses it for Suspend/Resume functionality. FIPS will have left it alone, since it was fooled by the BIOS, but Linux disk partitioning programs are not so gullible. Tread with care!
- When you are prompted where to get data from, choose local filesystem, and tell it /dev/hda1 Do the same when it asks you for a location for the base installation images.
- When you are installing modules, make sure you include VFAT and NFS support.
- When asked whether this machine will be on a network say NO. I find this to be safer than making the machine assume it will always have the same IP address.
- Don't make either a boot disk or activate LILO. I have not managed to get LILO to work, so I always use loadlin to boot Linux on my Libretto.
REMAINDER OF THE INSTALL
- Reboot, and use F8 to get to a command prompt again.
If you accidentally installed a LILO boot sector, you won't be able to get back into Windows, so you'll need to use your boot floppy and run FDISK /MBR to restore the Windows 95 boot sector.
- CD \DEBIAN\INSTALL
LOADLIN LINUX ROOT=/dev/hda2
If you used a different partitioning scheme from me you should substitute your appropriate root partition in the above command
- Set your root and ordinary account passwords.
- When dselect starts, quit from it. You can't do anything with it yet anyway.
- mount -t vfat /dev/hda1 /mnt
- Locate the PCMCIA support packages under /mnt/debian, and use dpkg to install them (pcmcia-modules and pcmcia-cs). When prompted, start the PCMCIA subsystem. With luck, your Libretto should beep twice to tell you it has detected your ethernet card, which will appear as kernel symbol eth0. You may have to do this by hand by running /etc/init.d/pcmcia start
- Edit /etc/pcmcia/network.opts with a sensible IP address, and other network configuration stuff. Now configure everything with:
cardctl scheme 1- umount /dev/hda1
- On the desktop machine reboot into Linux, mount the Debian Binary CD-ROM, and NFS export it so the Libretto will be able to see it.
- Test that you can successfully mount your desktop machine's CD-ROM drive:
mount -t nfs nnn.nnn.nnn.nnn:/cdrom /mntNote I used dotted quad notation throughout here - there's no DNS to set up yet, and my Desktop Linux box doesn't run a DNS server anyway. You could always put stuff in /etc/hosts if you can't stand the numbers.
- If this worked, umount /mnt, and run dselect.
- From this point on you can install the rest of the Debian 2.0 system as normal, selecting NFS as your source. Take the following notes, though:
- Only install the VGA16 X server for now. We will obtain a better one later.
- Don't set xdm to start an X session automatically.
...