Installing Debian Linux 3.1 Sarge on Toshiba Libretto 50

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:

Step 1

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.

Step 2

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.

Two Screws on the back of Libretto Hard Disk of Libretto

Step 3

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.

Step 4

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)

Step 5

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.

Step 6

Finish all the essential setup.

Step 7

Take the hard disk drive out of the laptop computer, and insert it to Libretto.

Step 8

Power on Libretto. Login as root.

Step 9

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=

Step 10

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.

Step 11

Save the file, and exit your text editor.

Step 12

Type "shutdown -h now" at the shell command prompt in order to power off.

Step 13

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.

Step 14

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

References

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 -0500

Hi,
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


Links