Linux on the Toshiba T1910
Author: Michael Minn (see www.michaelminn.com for contact info)
June 22, 2006
Instructions for installing Slackware 7.1 on a Toshiba Satellite T1910 computer
The following document describes the installation and operation of Linux on a Toshiba Satellite T1910 computer, an entry-level laptop built in late 1994:
- 33MHz Intel 80486 SX processor
- Monochrome VGA LCD display (6-bit depth)
- 4MB RAM (expandable to 20MB)
- 200MB hard drive
- Internal 3.25" 1.44MB floppy
- One type-1 PCMCIA slot
- Detachable trackball mouse
- Two PS-2 mouse/keyboard ports
- Serial and Parallel ports
- External monitor port
- No USB, modem, ethernet, or CD-ROM
- Originally listed for around $1,600
The limitations in memory, processor speed and hard disk size make this machine unusable with contemporary Windoze releases and Linux distributions, but it can be used with older Linux distributions. The fact that there are a number of these machines still extant and functional over a decade after manufacture is a testimony to the quality of Toshiba's mid-'90s workmanship.
This document assumes familiarity with UNIX and/or Linux. Some of the steps seem strange and I would suggest you read through this document before attempting an installation.
I provide no guarantees for anything in this document and, therefore, assume no responsibility if it gets you in any trouble. However, I would welcome any suggestions or corrections.
For further information:
- Jay Karolyi has an excellent page on the Toshiba 486 laptops.
- Stefan Bertels also has a page in German.
- I have an additional (and not recommended) page describing installation of MuLinux
- The definitive source for Linux laptop information is the Linux on Laptops Page.
2. Hardware Upgrades
Memory: The 4MB memory that this machine comes equipped with is inadequate for anything except DOS. There are versions of Linux that will run in 4MB, but they are too old or limited to be useful. Memory expansion for this machine comes in the form of 88-pin JEIDA DRAM Cards (non-parity, 3.3v). There is a single expansion slot right above the single PCMCIA slot. There is inconsistency among websites whether this machine has a 20MB limit (16MB expansion) or 36MB limit (32MB expansion). As of spring 2005 I was unable to locate a 32MB card and had to settle for a $80 16MB card from 4AllMemory.com.
External Hard Drive Enclosure: Because there is no CD-ROM or network card in this machine, I chose to copy the installation files to a new hard drive that I connected to my main PC using a CompUSA 2.5" USB 2.0 One Button Back-Up HDD Enclosure. There are numerous models on the market and most seem to be supported with the usb-storage driver that comes with most contemporary Linux distributions. Details on disk formatting are given later.
Hard Drive Replacement: The 200MB hard drive that shipped with this machine is also too small for any serious OS. This machine uses standard 2.5" ATA/IDE drives common to all contemporary laptops, although there is supposedly a hardware limitation of 6GB. You can purchase drive upgrades from a number of sources. In my case, I upgraded the drive on my old Toshiba 335CDS and transplanted that machine's 4GB drive into the T1910.
The hard drive is located under the keyboard in the center of the machine and requires some effort to access.
- Unplug the power supply and remove the battery
- Remove the top panel screw located behind a snap-on cover just above the F9 key
- Remove the top four case screws on the back of the machine
- Remove the top cover. The cover is held in place with snap-in tabs which can be released by twisting a flat-head screwdriver along the slot that runs around the top outside of the case. The cover is held in place tightly and you should exercise caution not to break the edges of the cover, although you will almost certainly do some damage to the cover
- Push the LCD monitor back
- Lift the cover off the machine
- Lift the keyboard and rest it on the upper half of the chassis
- Remove the five screws holding down the aluminum shield
- Remove the screw holding the hard drive carrier
- Slide the carrier back to release the drive from the connector pins and lift the carrier out of the machine
- Unscrew the old drive from the carrier and remove the old drive.
- The screw layout of the new drive may not match the carrier. In my case, the bottom of the new drive was an unprotected circuit board that would have been destroyed by the metal carrier. I chose to not use the carrier and instead placed the drive directly into place and wedged it down with paper shims. Not the most elegant or secure solution, but eminently practical.
- Make sure the drive pins are securely inserted all the way in.
- Replace everything, making sure that you use the correct screws in the correct holes.
BIOS Upgrade: You will need BIOS version 2.40 (circa 1994). Some machines may have an older version although mine was up to date. You can verify your BIOS version by entering the BIOS setup program. While booting, hold down the ESC key. The BIOS version is listed in the upper right hand corner of the setup screen.
A BIOS upgrade to 2.40 was available from Toshiba HERE (b1910.exe) until mid-2005 (referenced HERE) but has since been removed from their servers. Contact me if you can't find another copy somewhere. There is not a more "modern" BIOS that provides large hard drive support, so this document contains numerous workarounds.
- Download the b1910.exe file. Be sure you get this exact file (not b1910cs.exe or something else), or the appropriate file if you have a different machine. Flashing your BIOS with the wrong data can be a fatal mistake.
- Create a bootable DOS floppy. If you do not have a Windoze machine, DOS 6.2 floppy disk images are available from BootDisk.com.
- The b1910.exe file is a self-extracting zip file under Windoze. Under Linux, you can "unzip" the file and copy the extracted contents to your bootable DOS floppy. Instructions for using the floppy are also included in a README file in the zip file.
- Insert the floppy in the T1910 and reboot. The CHGBIOS utility will start automatically and verify the existing BIOS version before flashing.
Why Slackware?: I chose to use Slackware 7.1 for this machine because it's a reliable old distribution that works. It dates from 2000 and includes a 2.2.16 kernel with a nice set of standard applications.
Although the newer versions of Slackware claim to be able to run on a 486, the boot floppies for Slackware 8.0 and later fail with the message "Boot Failed". I attempted to install Slackware 10.1 on the hard drive before putting it in the machine, but got the quaintly anachronistic BIOS message on boot:
Disk read error This BASIC was aborted because this machine has no ROM BASIC Use Toshiba's BASIC
Ahh..the '80s. Good times.
I had a similar problem with Damn Small Linux. Slack it is.
Download Slackware: Download Slackware 7.1 from one of the download sites specified on Slackware.com. Because there are no CD images for versions below 8.0, it is easiest if you use one of the FTP servers and use a good FTP client (such as NCFTP) to download all the package directories recursively. You will need the contents of the bootdsks.144, rootdsks and slakware directories. You may also want to copy the .TXT information files as well.
Installation Media: Since the T1910 has no CD-ROM drive or network interface, all installation media options are unpleasant. I chose to use an external USB hard drive enclosure to format a new hard drive and copy files to the hard drive. I then installed the the hard drive in the T1910 and performed the installation from the hard drive. The remainder of this document assumes this technique, although there are other options:
- Install Linux on another laptop with a CD-ROM and then transfer the hard drive to the T1910.
- Boot the T1910 with a floppy Linux distribution (like TOMSRTBT) that supports a PCMCIA network card and access install files with NFS. This is problematic because of the difficulty in finding supported network cards and setting them up under a floppy distro.
- Use floppies. Only do this if you have alot of free time and the patience of Job.
Installation Floppies: Regardless of installation media, you will need two floppy disks to boot a minimal version of Linux that will then be used to run the setup program. The bare.i image for the first boot floppy is located in the Slackware bootdsks.144 directory. The root disk image is color.gz, located in the rootdsks directory. Copy the images to floppy with:
dd if=bootdsks.144/bare.i of=/dev/fd0 (change floppies) dd if=rootdsks/color.gz of=/dev/fd0
If you do not have an existing Linux system, the RAWWRITE.EXE DOS utility (in the BOOTDSKS.144 directory) can also be used.
4. Hard Drive Partition and Format
Regardless of your installation media, you will need to partition and format your hard drive. You will need a relatively large swap partition and because of BIOS limitations, you will need two specifically sized Linux partitions.
Dual Boot?: With a large enough hard drive, it is quite possible to have a system that can boot into two or more operating systems (i.e. Linux/DOS, Linux/CPM, Linux/Windoze). However, BIOS limitations mandate that the main bootable partition for each OS be within the first 512MB of the hard drive. The configuration below leaves a small 50MB partition that I have used for DOS and CP/M. Splitting partitions is a pain, so you should give some thought to whether you might want to boot another OS later.
Find Disk Geometry: Before formatting the hard drive, you should find the disk geometry: heads, sectors and cylinders. This is usually printed on the hard drive.
fdisk: fdisk is an interactive but cryptic disk partitioning program that is available when you boot Slackware from the installation floppy.
Confirm Geometry: Use the "p" command to verify that the geometry values in the partition table match the values printed on the hard drive. The number of heads is especially problematic since fdisk defaults to 128 and most hard drives only have 16. If heads, sectors or cylinders does not match, you should enter expert mode with the "x" command and change the setting to the correct value. Failure to do this may cause problems with LILO (the boot loader).
Delete: Delete any existing partitions with the "d" command.
/dev/hda1: Create a modestly sized partition (50MB = 100 cylinders or less) at the beginning of the drive starting with cylinder 1. This can be used for DOS. This partition is optional, but even if you're not planning on installing DOS it is difficult to split a partition later if you want to install DOS later. new partition using the remainder of the lower 512MB (i.e. what's left of the first 1024 cylinders) of the hard drive. This is a small partition I use for DOS and is optional.
/dev/hda2Create a new partition with the "n" command that DOES NOT GO PAST CYLINDER 1023. This size limitation is crucial for booting due to restrictions in this ancient BIOS. In my case, /dev/hda2 is around 400MB (900 cylinders), which leaves plenty of space for the Linux root directory.
/dev/hda3: Create a new partition using all except the last 256MB of the disk space.
/dev/hda4: Create a new partition using the remainder of space on the drive as a swap partition. Mine is around 256MB.
Swap: Use the "t" command to change the type of partition 4 (/dev/hda4) to type 82 (Linux swap) and partition 1 (/dev/hda1) to type 4 (DOS).
Boot: Make partition 1 bootable with the "a" command.
Verify: To make sure you have no errors, list the partitions with the "p" command. My partitions on a 4MB hard drive are:
Disk /dev/hda 16 heads 63 sectors 7944 cylinders Units = cylinders of 1008 * 512 bytes Device Start End Blocks ID System /dev/hda1 1 99 49864 04 DOS /dev/hda2 100 1023 465696 83 Linux native /dev/hda3 1024 7500 3264408 83 Linux native /dev/hda4 7501 7944 223776 82 Linux swap
Write: Write the partition table with the "w" command.
Format: Format the Linux partitions:
mkfs.msdos /dev/hda1 mke2fs /dev/hda2 mke2fs /dev/hda3
Copy the Installation Files: If you are planning on installing from the hard drive, you should copy your installation files to /dev/hda3. /dev/hda2 should be left free for the actual installation.
Slackware is a seriously old-school distro with an old-school installer. If you do everything right the first time, you're golden. If you make a mistake, recovery is challenging.
If you installed Linux on the hard drive with another machine and were able to boot, you should be able to boot up Linux and be ready to go. These instructions assume you have copied the installation files to the hard drive but have not yet run the install program.
BIOS Boot Order: Hold down the ESC key while rebooting to bring up the tsetup BIOS configuration program. At the bottom right hand corner is the boot order. It should be changed to FDD->HDD so the floppy overrides the hard drive.
Boot From Floppy: Insert the boot disk in the machine and reboot. When prompted, insert the root disk. A minimal version of Linux will load. When prompted, log in as "root".
Verify the Hard Drive Works: Try mounting one of the hard drive partitions and listing the contents.
mount /dev/hda2 /mnt ls /mnt umount /mnt
Partition Your Hard Drive: See the instructions above for using fdisk.
Installer Program: Type "setup" to start the installer program.
AddSwap: Choose the "addswap" option, select /dev/hda4 as your swap partion and allow the installer to format it. This will take a few minutes.
Target: Select /dev/hda2 as the target drive. If you have copied the install files to this partition, you should, obviously, not format it. If you do have to format the partition and check for bad blocks, this will take a very long time.
Select Other Partitions: Add /dev/hda3 with a mount point of /usr.
Source Media Selection: In my case, I had the installer files on partition /dev/hda3 in the /t1910/slakware directory. This will depend on your installation media choice.
Package series selection: Select everything unless you really want to save space.
Select prompting mode: Choose full unless you need to deselect packages to save space. The install will start and take around two hours to complete.
Install Linux Kernel: After the install copies the packages, you will get a prompt for a kernel. Use the bootdisk kernel. You will need to insert your boot floppy (not the root floppy).
Make Bootdisk: You can probably skip this unless you're really paranoid. Floppies are more fragile than hard drives.
Modem Configuration: Use the serial port (/dev/ttyS0)
Configure CD-ROM Drive: Skip this, obviously.
Screen Font Configuration: You can explore this if you've got time to kill with cryptically named fonts. I use grcourier.gz
Install LILO: Choose simple mode
Configure LILO: Use the standard Linux console
Select LILO target: Put LILO on the MBR (master boot record), not the superblock.
Configure Network: No, since there's no network card
Mouse configuration: ps2
GPM program: Don't load on boot - boot is slow enough without having to load something you don't need.
Sendmail Configuration: SMTP
Hardware clock to UTC: No
Timezone configuration: Wherever you go, there you are
Window manager: I use fvmw2
Root password: Your choice
Reboot and log in
Move /home: /usr is used for user software and /home is used for user files. Both can quickly outgrow the 500MB root partition. The third partition /dev/hda3 is set up as /usr, but /home can be linked there so the extra space on the second partition can be used for user files. This is unorthodox from the perspective of the standard UNIX file structure, but desperate times call for desperate measures.
cp -rfpv /home /usr mv /home /home.hold ln -s /usr/home /home
Confirm Virtual Memory is On: For some reason, my installation did not place the swap file /dev/hda4 in /etc/fstab. The limited amount of memory in this machine makes swapping essential. There should be a line in /etc/fstab like this:
/dev/hda4 swap swap defaults 0 0
The initialization scripts should see this entry and start virtual memory. The "free" command can be used to display the amount of swap space (it should not be zero) and the "swapon /dev/hda4" command can be used to start virtual memory if it is not started automatically.
X, the Linux windowing system, will run on with this distribution, although most X applications will run very slowly. However, it is nice to have windowing for multiple consoles and the occasional graphic program.
VGA Server: If you haven't already, use pgktool to install xvg16, the 16-color VGA server, from the X1 package set. The xmono server didn't seem to work with this LCD display.
Window Manager: I use the Motif Window Manager (mwm), an extremely spartan window manager with no desktop (i.e. KDE, Gnome) that is small enough to run efficiently on this machine. The choice of window manager is dictated by the file /etc/X11/xinit/xinitrc file, although it can be overriden with a .xinitrc file in your /home directory. Mine starts a couple of console terminals and a clock before starting the Motif Window Manager.
xterm -geometry +25+25& xterm -geometry +50+50& xclock -d -update 1 -geometry +440+440& exec mwm
/etc/XF86Config: Copy the file below into your /etc/XF86Config file. Do not use xf86config - it will give you an unnecessarily verbose file that is difficult to debug. X error messages are often very cryptic. Thanks to dueze for his XF86Config file from his T1910 page
# /etc/XF86Config for the Toshiba T1910 # Michael Minn 7/3/2005 Section "Files" RgbPath "/usr/X11R6/lib/X11/rgb" FontPath "/usr/X11R6/lib/X11/fonts/misc/" FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled" FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled" FontPath "/usr/X11R6/lib/X11/fonts/Type1/" FontPath "/usr/X11R6/lib/X11/fonts/Speedo/" FontPath "/usr/X11R6/lib/X11/fonts/75dpi/" FontPath "/usr/X11R6/lib/X11/fonts/100dpi/" EndSection Section "ServerFlags" EndSection Section "Keyboard" Protocol "Standard" XkbKeymap "xfree86(us)" EndSection Section "Pointer" Protocol "PS/2" Device "/dev/psaux" Emulate3Buttons Emulate3Timeout 50 EndSection Section "Monitor" Identifier "Notebook Display" VendorName "Toshiba" ModelName "" HorizSync 31.5-48.5 VertRefresh 40-86.81 Modeline "640x480" 28.31 640 664 760 800 480 491 493 525 EndSection Section "Device" Identifier "Generic VGA" VendorName "Toshiba" BoardName "Unknown" VideoRam 1024 Clocks 28.31 EndSection Section "Screen" Driver "vga16" Device "Generic VGA" Monitor "Notebook Display" Subsection "Display" Modes "640x480" EndSubsection EndSection
Starting X: X is started with the command "startx" from the console. It may be possible to configure the system to start X on boot (i.e. runlevel 5), but that will slow down the boot process and hide error messages you may want to see.
I have an old Linksys PCM100 EtherFast 10/100 Integrated PC Card that is supported by the pcnet_cs and 8390 modules. Older cards are probably more likely to be supported than newer cards. The interface will be available as eth0 when you plug the card in. The interface can be started with:
ifconfig eth0 126.96.36.199 up
The Slackware interface configuration script is /etc/rc.d/rc.inet1. It can be run at any time to start an interface.
The Slackware network services initialization script is /etc/rc.d/rc.inet2. It can be run to start Samba, NFS, printing services, ftp, telnet, etc.
NFS allows you to access directories on your T1910 hard drive from a network. This also allows you to transfer files to another PC without having to use floppies. NFS configuration is a bit cumbersome and fraught with mysterious points of failure.
/etc/exports is the file that tells NFS what directories can be mounted remotely. If you are doing a simple connection on a home network (such as a computer-to-computer connection with a crossover cable) you can add one line to /etc/exports to export your home directory to everyone for access as the anonymous user.
/home/xxx should be replaced with the home directory you wish to export. all_squash indicates that everyone who mounts this directory should be treated as the anonymous user. The anonuid and anongid options set the anonymous user/group ID to the user/group ID that Slackware assigned as my primary userid on my system. You may want to check /etc/passwd to verify the user/group ID on the T1910.
Restart the NFS Daemon: Issue the following commands to kill and restart:
killall rpc.nfsd /usr/sbin/rpc.nfsd
You can verify that the NFS daemon started with a "ps -ef"
Mount on the Remote Machine: You need to create a mount point on your remote machine and then mount the T1910 drive on that mount point:
mkdir /mnt/1910 mount -o nfsvers=2 192.168.1.1:/home/xxx /mnt/1910
The IP address (192.168.1.1) should be replaced with whatever IP address you set on the T1910. The nfsvers=2 option must be given because of the age of the NFS implementation in Slackware. There are numerous problems that can make the mount command fail, and you should first check network connectivity (ping) and verify that rpc.nfsd is running on the T1910 (ps -ef).
At this point you should be able to view the contents of your T1910 directory by ls /mnt/1910. If you get a permission denied error, you should double check the user/group IDs you set up in /etc/exports. Depending on conflicts between user IDs on the local and remote machine, you may also need to do your file copies as root.
7. LILO and BIOS and Other Problems
Although the hardware can happily support up to 6GB hard drives, BIOSs created in the early and mid '90s were limited to 1024 cylinders (usually 500MB). This is not a problem for Linux since it has its own IDE drivers and does not use the BIOS. However, LILO, the boot loader, has to be small enough to fit in the first sector of the drive - the master boot record (MBR). Therefore, it cannot have its own drivers and must use the BIOS. This requires old BIOS machines to have bootable partitions that fit within the first 1024 cylinders on a hard drive - a hard 500MB limitation.
This problem does not exist for contemporary distributions on contemporary machines. A variety of nasty kludges started apperaring in the early '90s and by the late '90s most BIOSs supported an extended INT13 command for accessing large drives. Linux distributions started placing boot files in a separate /boot partition and the advent of the more robust Grand Unified Boot Loader (GRUB) consigned LILO to the technological dust bin. You can read more nasty details in the Large Disk HOWTO.
Partitions over 512MB: Unfortunately, LILO in Slackware 7.1 assumes the new BIOSs (using the lba32 option) and does not warn about BIOS limitations. If your root partition starts and/or ends outside of the 1024 cylinder limit, LILO will start, then give an infinite series of error codes.
L 04 04 04 04 04 04...
The 04 means that LILO has a sector seek problem since the BIOS cannot access a boot image outside of it's 1024 cylinder limit. There is no solution other than to repartition and reinstall. Neither of the boot loaders GRUB or NUNI can be used as a workaround. Suggestions about using the "linear" command in /etc/lilo.conf or rewriting the DOS MBR with FDISK /MBR will not solve the problem.
Bad FDISK Sector Size: Apparently, by default fdisk will write the partition table with an erroneous head count of 128. Most 2.5" hard drives have 16. This can be easily fixed with fdisk in expert mode, but it can cause problems with LILO if not caught during disk partitioning.
LILO Error Checking: If you try to configure LILO to write a master boot record pointing to an invalid partition, you will get an error message. Unfortunately, you will get it at the end of a lengthy install process. You will have to repartition and start the installation from scratch.
Fatal: geo_comp_addr Cylinder number is too big (1047 > 1023)
Killing Setup: The setup script does not handle ctrl-c well when you want to stop an installation. If loading packages from a disk partition, the partition is mounted on /var/log/mount and killing the script will cause a dirty unmount. Attempts to restart the setup script will give a message "Mount Table Corrupt". The workaround is to simply mv /var/log/mount to /var/log/mount.hold
I have set up my system to be able to dual-boot into Linux or DOS 6.22. Although it's nasty, it's simple, small, tight and still available. There is a wide variety of DOS software available and DOS partitions can be read from Linux if you need to share files between the two OSs.
DOS Image: Although The Beast no longer supports DOS, you can download DOS boot floppy images from BootDisk.com.
Hard Drive Partition: The partitioning instructions given above include a 50MB partition for DOS. Regardless of the size you choose, it is vital that this partition fall entirely within the first 1024 cylinders (usually 512MB) of the hard drive. Although the IDE controller is quite capable of handling larger drives, the ancient BIOS in this machine (which is used by DOS) cannot access beyond the first 1024 cylinders.
Splitting a Partition: If you neglected to leave space for DOS and used up the entire first 512MB of your drive with Linux, it is possible, but unpleasant, to split the Linux partition. You can skip these steps if you have a DOS partition.
- Boot using the Slackware boot disks.
- Mount the large partition: mount /dev/hda2 /mnt
- Use dd to create an image of /dev/hda1 to a file on another partition: dd of=/mnt/hda1.img if=/dev/hda1
- umount /mnt
- Use fdisk to delete the existing partitions and repartition with the space formerly used by hda1 split into a Linux partition and a DOS (i.e. FAT) partition.
- mke2fs /dev/hda1
- mkdosfs hda2
- Mount the large partition: mount /dev/hda3 /mnt
- Make a mountpoint for the reduced partition: mkdir /hda1 /old
- Mount the reduced partition: mount /dev/hda1 /hda1
- Create a loop device: mknod /dev/loop b 7 0
- Mount the disk image: mount -o loop=/dev/loop0 /mnt/hda1.img
- Copy the files from the image to the new partition. The -a is critical for copying over the device special files: cp -a /mnt/hda1.img /hda1
- Modify /hda1/etc/fstab with the new device numbers: /usr = hda3, swap = hda4
- cp /hda1/etc/lilo.conf to /etc
- Run /hda1/sbin/lilo to configure booting to the new partition
Boot to DOS: Boot from a DOS floppy. The new DOS partition should be visible as your C: drive.
Install: Format the C: drive with the option to copy the system files over:
format /s c:
LILO: Reboot to Linux and modify your /etc/lilo.conf file so it has the option of booting to Linux or DOS.
fsck.msdos Problems: I had a problem with /sbin/fsck.msdos giving errors and forcing my Linux boots into recovery mode. Not sure what the problem was, but I just moved fsck.msdos to fsck.msdos.hold, effectively deleting it and eliminating the problem.
9. CP/M-86 v1.1
CP/M was an operating system from Digital Equipment Corporation (DEC) for Z-80 based microcomputers that was popular in the late 70's. Gates stole alot of ideas from CP/M when creating M$-DOS. With the advent of the IBM-PC in 1981, DEC ported CP/M and named the product CP/M-86. As M$-DOS gained dominance, DEC added a DOS compatibility layer and CP/M-86 became DosPlus before fading into the mists of software history by the mid 80's.
There was alot of nice software written for CP/M and CP/M-86 and a small but devoted cult following for this OS still exists today. The native CP/M interface is somewhat cleaner (i.e. more primitive) than DOS and boot time is very snappy compared to anything released in the last 15 years. The variety of available compilers testifies to CP/M's roots in the wild early days of microcomputing. Although CP/M is still proprietary intellectual property that has passed through an incomprehensible maze of mergers and spinoffs, CP/M software is freely available on the web.
Packages for both CP/M-86 v1.1 and DOSPlus (i.e. CP/M-86 v4) are available with hard drive support. However, DOSPlus was tailored to look and feel like M$-DOS and if you want that, you should probably just install the real thing.
Download: CP/M-86 v1.1 is available from a German Site as a zip file you can download here. Note that there are numerous variants and versions of CP/M for a wide variety of architectures. Be careful not to get a version for an incompatible system. (archive disk 2005-08-09)
Boot Floppy: The package linked above comes in a zip file with a DOS program, CopyQM. CP/M floppies are not in IBM format, so this formatting program is needed to create the floppy. You will need access to a system running DOS. You can create a bootable DOS floppy and copy the package contents to it. Bootable DOS floppy images are available from BootDisk.com. The MAKEDISK script on the floppy will start CopyQM and prompt you to insert a blank floppy. Everything you need to get started in CP/M will be on the boot floppy.
Linux Recovery Floppy: The ancient CP/M disk partition utility will mess up the partition table and master boot record (MBR), although it will not corrupt the Linux partitions themselves. You should create a Linux boot floppy or create a tomsrtbt floppy so you can reconstruct the partition table. You should also make note of your exact partition dimensions (cylinders) so you can use them when reconstructing the partition table.
Partition: In addition to the 512MB limitation imposed by the BIOS on this machine, CP/M-86 v1.1 has a firm 8MB partition limitation. The drive can, of course, be larger, but the partition(s) used for CP/M cannot exceed 8MB or they will not be detected by the OS. For simplicity, the partition should be the first one on the drive (/dev/hda1). It can be created in fdisk with a type of db.
Boot CP/M-86: Reboot the system from the boot floppy and you should get a complete running version of CP/M-86.
HDMAINT: The hdmaint transient program on the floppy will walk you through prompts to create a CP/M partition. The program will detect any partition of type CP/M (type db). Because there is no file system on the new partition, hdmaint will prompt you to delete the existing partition. You should add a new partition, starting with cylinder 000 and ending with 016 (depending on the geometry of your hard drive). Note that CP/M-86 v1.1 has an 8MB size limit. hdmaint will format the drive and reboot from floppy.
Verify: When CP/M reboots, you should be able to change to the hard drive with the "B:" command. You should copy the transient commands from the floppy to the hard drive with the PIP command. Note that the order of source/destination is reversed from DOS and Unix.
b: pip b:=a:*.*
Rebuild Partition Table: hdmaint may rename some of your partitions, making it impossible to boot with LILO. You should boot from a recovery disk and run fdisk to delete and re-add partitions with the exact same locations and names as before the CP/M installation.
LILO: hdmaint will also wipe out the LILO MBR, so you will need to rerun LILO. You should boot from a boot disk, but use the "mount root=/dev/hda2" as a boot option so Linux will actually boot from the hard drive. You should then modify your /etc/lilo.conf file so there is an entry at the end for CP/M:
other = /dev/hda1 label = CPM table = /dev/hda
Note that the lilo command on tomsrtbt will not work with Slackware 7 and will fail with the message:
First boot sector doesn't have a valid LILO signature
Boot CP/M from the Hard Drive: You should now be able to reboot the system, select "CPM" from the LILO menu, and have CP/M-86 boot from the hard drive.
Transferring Files To/From CP/M: Michael Haardt's CP/M Tools can be used for transferring files between Linux and your CP/M partition. Since CP/M has no networking capability, this will be essential for installing new software and getting anything you create on this system out to the real world. CP/M floppies are not IBM compatible.
The nasty part about using cpmtools is finding the correct disk configuration for /usr/local/share/diskdefs. CP/M ran on a very wide variety of hardware before the IBM/M$ monopoly took over and disk formats varied widely among systems. The default ibm-3740 format will not be valid for use with hard drives. With my Toshiba hard drive, I redefined the ibm-3740 as:
diskdef ibm-3740 seclen 512 tracks 272 sectrk 63 blocksize 4096 maxdir 512 skew 0 boottrk 16 os 1.1 end
CP/M file systems have three sections: bootable system data, a fixed number of 32-byte directory entries and the data blocks. The boottrk parameter is the offset from the beginning of the drive to the disk directory (sectrk * seclen) and may be inferred by hexdumping the image and looking for file names. The blocksize parameter is crucial for finding the data blocks based on the offsets given in the directory.
Use the device file /dev/hda as the "image" parameter for all the cpm* commands. Note that this is not the partition device /dev/hda1 since the offsets in the file system are relative to the beginning of the drive, not the beginning of the partition. You may have to tweak values while trying to get listings from cpmls.
- The Unofficial CP/M site
- CP/M-86 software repository
- CP/M Software archive
- British CP/M site
- Gaby's CP/M site
- Online CP/M manual
- German CP/M site (in German)
- History and overview of CP/M
- Floppy information
- Description of the CP/M disk format
FYI: the terminal configuration that works with WordStar is the IBM 3101
10. Other Operating Systems
While Linux is a reasonable option for this ancient machine, there are other options to consider:
FreeDOS: An open-source implementation of DOS that brings it into the present, kind of. FreeDOS.org.
Windoze 3.1/95: This machine shipped with Windoze 3.1, which is nasty but functional. If you can find it, Windoze 95 will install and run, although you need a hard drive upgrade since it will take 150MB of the 200MB drive.
OS/2: What could have been if IBM hadn't succumbed to Gates' predatory business practices.
TomsRTBT: All of the miniature Linux distributions have serious limitiations. However, tomsrtbt is an excellent single-disk distribution that crams an extremely large amount of Linux into a SINGLE FLOPPY. This is primarily useful as a recovery tool, not an OS for general, everyday use.
11. Disk Image
Before wiping away your old Windows OS, you may want to keep a copy of it for future use. I discarded my recovery floppies years ago, but you never know when you will need a copy of Windoze 3.11 :+(
If you can find a network card supported by tomsrtbt, an image of the complete hard drive can be copied across a network using the dd command. If you have a network directory mounted on /mnt: the entire drive can be copied with the command below. Note that the input file is the raw disk block device, /dev/hda, not the partition, /dev/hda1
dd if=/dev/hda of=/mnt/t1910_image.img
Because tomsrtbt runs entirely in RAMDISK, it has problems with the dd command (for block copies) overflowing since disk reads are much faster than disk writes. This causes the OS to reboot. To work around that problem, I created a script that copies in 512K chunks and sleeps for a second to allow the buffer to flush.
dd if=/dev/hda1 of=t1910.000.img skip=0 count=1024 echo 000 512 sleep 1 dd if=/dev/hda1 of=t1910.001.img skip=1024 count=1024 echo 001 1024 sleep 1 (etc...)
Since the full 200MB drive would require 400 entries, this script can be created with another script. Note that a script with a while loop cannot be run directly since the shell in tomsrtbt is too simple to interpret conditional statements.
x=0 while [[ x -lt 512 ]]; do block=$(( x * 1024 )) suffix=`printf "%03d" $((x))` echo dd if=/dev/hda1 of=t1910.$suffix.img skip=$block count=1024 x=$(( x + 1 )) echo echo $suffix $(( x * 512 )) echo sleep 5 done
These separate image files can be combined with cat or a simple C program that reads all the files and concatenates them.
/dev/hda has 32 blocks (16384 bytes) before the /dev/hda1 that are used for the master boot record and partition table. If you strip this off, you can mount the image file to a mount point and view its contents.
mount -o ro,loop=/dev/loop0 (image file) /mnt/cdrom
This procedure can also be used to create an image of a Linux installation on this or any other machine. However, with large hard drives and partitions used on most contemporary machines, the resulting image files can be quite large.
Be cheerful while you are alive. (Phathotep, 24th century BC)