Installation on ThinkPads without CD-ROM drive

From ThinkWiki
Revision as of 19:50, 7 January 2008 by Whizkid (Talk | contribs) (Added booting from PCMCIA)
Jump to: navigation, search

Some ThinkPads (e.g. the whole X series) come without a CD-ROM drive by default. Even though there are options to buy a solution like the UltraBase, a full dock or simply an external CD-ROM drive1, this is not the cheapest option and might not always be necessary. Also, with some external CD-ROMs the problem might arise that the ThinkPad is not able to boot from them. See our List of supported boot devices for various ThinkPads.

So the question arises how to get your system of choice onto that precious piece of hardware. This page should tell you about the possible solutions.

Since in most cases the installation base packages come on CD, you'll need a second computer, equipped with a CD-ROM drive, for all of those solutions.

Many older ThinkPads came with only a floppy drive and cannot boot from any CD drive at all. For those machines, booting from floppy is the only option. Then one can install from CD, over a network, or from the hard drive.

Installation from USB drive

Not all ThinkPads have a BIOS that supports USB booting.

This is probably the easiest approach:

  1. Connect the USB drive2 to the host and format it.
  2. Get a bootable system and all needed installation files onto the USB drive, i.e. by copying the complete filesystem from your installation CD-ROM to the USB drive. Of course if your USB drive is not big enough for that you'll have to make more sophisticated choices about what to copy and what to leave behind. Here are some instructions (and instructions for ubuntu)for converting a LiveCD ISO image onto a pen drive, and making it bootable.3
  1. Insert the USB drive into the USB port of your ThinkPad.
  2. Power on the ThinkPad and press F12 to get to the boot menu. For some models (X24 comes to mind) you need to go into the BIOS and change the boot sequence before USB devices are shown in the boot menu.
  3. Select the USB drive as boot media and boot.
  4. Follow the normal installation process.

It seems some ThinkPad BIOSes don't use the code on the master boot record (MBR), or at least skip it when it is blank. These systems will need an Extended-IPL boot loader. Putting this Extended-IPL boot loader onto the disk (such as sda) goes something like this:

dd if=/dev/zero of=/dev/sda bs=1 count=446
dd if=/usr/lib/extipl/aldebaran.bin of=/dev/sda

Booting from a PCMCIA device

Many ThinkPads, even as old as some original Pentium models, can boot from a PCMCIA slot. The device must appear as a normal hard drive for that to work, and it must have boot code on the first block of the device. PCMCIA hard drives and some PCMCIA card readers (compact flash, SD, memory stick, etc.) will work for this purpose.

If your distribution offers an installation image, just copy it to the device and boot from it. Here's a sample that works with Ubuntu 7.10 (Gutsy Gibbon). Insert the card and reader into a laptop running Linux. If the device mounts automatically, unmount it. Run these commands:

gunzip boot.img.gz
sudo dd if=boot.img of=/dev/sdb (careful!)

Be very careful when typing that last line. A typo could erase your hard drive. This image installs over a network, but there are other larger images that install the entire system directly.

Put the card reader and any other needed cards (such as a network card). Get into EZSetup and change the boot order to PCMCIA then HDD-1. Reboot and the installation should start.

Installation via network boot

Thinkpads support PXE to boot off another system that is connected via Ethernet. In this case the ThinkPad acts as a network boot client, the other system as server. The idea is to boot a system on the server that the ThinkPad can boot into then by loading all required data directly from that server.

For this to work you will have to either have both the server and the ThinkPad connected in the same subnet of your LAN, or have them connected directly via a crossed Ethernet cable.

Using Windows as a server

To get your Thinkpad to boot over a network, you must set up a DHCP and a TFTP server. For Windows, the freeware program TFTPD32 does both. To set up TFTPD32, do the following:

  1. Create a directory that will contain the PXE boot code.
  2. Copy the boot code into that directory. (For a Debian Sarge install, for example, you can find code to initiate a network install under debian/dists/sarge/main/installer-i386/current/images/netboot/ from a Debian mirror -- copy files to simulate symlinks for pxelinux.0 and pxelinux.cfg/)
  3. Launch the TFTPD32 program.
  4. "Browse" to set the current directory to the directory containing the PXE boot code (i.e. the directory you created in the first step, above).
  5. On the DHCP server tab, set:
    1. IP pool starting address to something appropriate for your network
    2. Size of pool to a non-zero value (all you really need is 1)
    3. Boot file to the PXE boot image (for Debian, the filename is pxelinux.0)
    4. WINS/DNS Server to the DNS server used by your network
    5. Default router to the IP of your default gateway
    6. Mask to your network's netmask
    7. Domain Name to your network's domain
Do not under any circumstances run the DHCP server if there are other DHCP servers on your network. There must be only one DHCP server on each network segment. You must either disable the other server or move to another network.

On your ThinkPad, do the following:

  1. Boot your Thinkpad, and press F12 to select an alternate boot device
  2. Use "Intel(R) Boot Agent Version 4.0.17" (or similar -- on the Transnote used to make this guide, "Network Boot" did not work while the "Boot Agent" option did)

The TFTPD32 server window should show activity as the ThinkPad downloads files. Once the first stage has installed and the ThinkPad is ready to boot from its own hard drive, shut down TFTPD32 and re-enable your permanent DHCP server.

Using Knoppix as a Terminal Server

If a server system is available on the network, it can be used to set up a temporary Terminal Server. Follow these steps to set up the Terminal Server using Knoppix:

  1. Insert the Knoppix CD into the server and boot it up. Make sure to boot with the 2.6 kernel by giving the kernel26 boot option.
  2. Once your KDE desktop is loaded, look in the K-Menu hierarchy for the link to the terminal server setup. Select this menu option.
  3. Launch the Terminal Server and make it use the appropriate network device.

Back at your ThinkPad, do the following:

  1. Power on your ThinkPad and press F12 to get to the boot menu.
  2. Select the ThinkPad's network adapter as the boot media.
  3. Reboot. The ThinkPad should now boot from the Knoppix Terminal Server directly.

Using any Linux on the server side

needs better formating, maybe a list where to find the kernel/initrd images on other distros and a hint to speed up booting
  1. TFTP Server
    • Download and install an tftp Server
    • Configure it to serve /tftpboot
  2. Get the kernel and initrd image from your distribution
    • For fedora-core they are in os/images/pxeboot
    • Copy both to /tftpboot/vmlinuz resp. /tftpboot/initrd.img
  3. Bootloader
    • Download the current syslinux-X.YZ.tar.bz2 tarball
    • Copy the included pxelinux.0 to /tftpboot/pxelinux.0
    • Create a directory for the configuration with # mkdir /tftpboot/pxelinux.cfg
    • Create the file /tftpboot/pxelinux.cfg/default with the following contents:
DEFAULT install
LABEL install
        kernel vmlinuz
        append initrd=initrd.img  --
  1. DHCP Server
    • Download and install an DHCP Server
    • Configure it to for your Thinkpad, the following configuration assumes that the MAC-address of your Thinkpad is DE:AD:BE:EF:00:00 and should use the IP with namesever/router/tftpserver
allow booting;
allow bootp;
host thinkpad {
   hardware ethernet DE:AD:BE:EF:00:00;
   option domain-name-servers;
   option routers;
   default-lease-time 28800;
   filename "pxelinux.0";
    • Now you can boot your thinkpad via lan

Installation from the internal harddrive

The idea here is to have all required files already on the internal harddrive when you power up your ThinkPad for installation, including of course a minimal system to boot up and start the installation process.

Convenient, but how do you get the files there?

  • One option is to copy them via network boot (see above).
  • Some Linux distributions offer ways to download the installation files from a FTP server and to choose this directory as installation source instead of a CD-ROM.
  • A second way, if you already have a 'working' copy of DOS or MS Windows installed, is to start the installer from loadlin or GRUB. This is detailed here.
  • Another one is to remove the harddrive from the ThinkPad and connect it to the other machine. Again, this can be achieved in several ways:
    • putting the harddrive into an UltraBay secondary HDD adapter of a second ThinkPad
    • putting the harddrive into an external casing and connect it to the second machine via USB, PCMCIA or whatever
    • connecting the harddrive via a 2.5" (laptop) to 3.5" (desktop) harddrive adapter

Follow one of the following instructions.

Installing Windows 2000 or XP

  • Attach the harddrive to the host computer and install a minimal bootable DOS system i.e. by booting a Win98 Emergency Boot Disk and performing the command "SYS X:" (where X = the laptop's harddrive).
  • Copy FDISK.EXE to the laptop harddrive.
  • Return the harddrive to the laptop and boot to DOS. (If you have Win98 installed by default, you can skip the first two steps and simply reboot in Windows to DOS.)
  • Run FDISK and set up your new Windows system partition on this laptop. (If you do not do this on the laptop, after reboot you will receive the infamous "NTLDR IS MISSING" error. This error may still occur if the partition is greater than 7.8gb in size)
  • Then return the drive to the host and format the drive as FAT32. (DO NOT format as NTFS.)
  • Repeat the "SYS X:" step to make the new partition bootable.
  • Copy Himem.sys and Config.sys, too. Otherwise SMARTDRIVE.EXE won't run
  • Get SMARTDRV.EXE from the internet and copy it to your Thinkpads harddrive.
  • Also, from the Win2K or WinXP CD, copy the I386 folder to the harddrive.
  • Return the laptop's harddrive to the Thinkpad one final time and boot to DOS.
  • Run SMARTDRV.EXE first, then change directories to I386 and run WINNT.EXE, this will allow the installation to begin.
  • During installation, choose NOT to format the destination partition, since it contains the installation files. If you want that filesystem to be NTFS you can convert it after installation from within Windows.

Installation from Diskette

Installing from CD

Many distributions have software on CD that will make a boot floppy that will allow you to install from an unbootable CD drive.

Installing over a network

Some distributions have a set of diskettes that will allow you to boot a machine, enable a network device and start installation over a network. For example, Slackware supports installing via an NFS mount. An unofficial add-on adds an option to install over FTP.

Installing from floppy

Some distributions did allow for a complete installation from diskette. As the size of distributions and the number of required diskettes has grown, and the ubiquity of optical storage increased, support for floppy installation has diminished.

However, there are still some Linux distributions that fit on as few as one diskette - with very limited functionality, of course.

Installation from an ISO image

Some distributions offer a way of installing directly from the downloadable ISO image, residing on your harddisk. Examples are VectorLinux 5.1 and SUSE 10. The individual distributions installation manuals will guide you through the process.

External Sources

  1. External CD-ROM drives typically are connected through USB or PCMCIA. Be aware that not all of these drives are capable of booting. USB connected drives are more likely to be bootable on a ThinkPad than PCMCIA connected ones.
  2. USB drive here means any kind of USB connected bootable data storage device, including external harddisk drives, memory card readers or pendrives.
  3. Most USB keys are already bootable. If it won't work, use lilo to write to the USB key's MBR: See the section "Master Boot Record" here.