*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  Linux HOWTOs -> Linux Laptop-HOWTO: Installation              
Linux Laptop-HOWTO: Installation Next Previous Contents

5. Installation

5.1 Related HOWTOs

  2. Config-HOWTO
  3. Diskless-mini-HOWTO
  4. Installation-HOWTO
  5. Pre-Installation-Checklist-mini-HOWTO
  6. Update-mini-HOWTO
  7. Hard-Disk-Upgrade-mini-HOWTO
  8. Installation and getting started by Matt Welsh and others available at the LINUX DOCUMENTATION PROJECT http://metalab.unc.edu/LDP
  9. Installing Debian Linux 2.1 For x86 by Bruce Perens, Sven Rudolph, Igor Grobman, James Treacy, Adam P. Harris ftp://ftp.debian.org/debian/dists/slink/main/disks-i386/current/install.html
  10. Install-From-Zip-mini-HOWTO
  11. ZIP-Drive-mini-HOWTO

5.2 Prerequisites - Partitioning

Partitioning can be done in a very sophisticated way. Currently I have only some first thoughts. I assume that with laptops there are still some reasons (e.g. updating the firmware of PCMCIA cards and BIOS) to share Linux and Windows9x/NT. Depending on your needs and the features of your laptop you could create the following partitions:

  • BIOS, some current BIOSes use a separate partition
  • suspend to disk, some laptops support this feature
  • swap space Linux
  • swap space Windows9x/NT
  • Linux base
  • Linux /home or data
  • common data between Linux and Windows9x/NT

Note this chapter isn't ready yet. Please read the according HOWTOs first.

5.3 Linux Tools to Repartition a Hard Disk

GNU parted

GNU parted allows you to create, destroy, resize and copy partitions. It currently supports ext2 and fat (fat16 and fat32) filesystems, and MS-DOS disklabels. This program can destroy data, and is not yet safe for general use. parted is currently in its early developement stage.


ext2resize is a program capable of resizing (shrinking and growing) ext2 filesystems. Checks whether the new size the user gave is feasible (i.e. whether the fs isn't too occupied to shrink it), connected to the parted project.


Something was recently published on the <linux-kernel@vger.kernel.org> mailing list about a partition recovery program. I have not used this, nor examined it, nor read much about it (except for the HTML page.) It may be useful to some of you if you have problems with FIPS, Ranish Partition Manager/Utility or Partition Magic destroying your partition information. You can find information on this partition-fixer named "fixdisktable" at http://bmrc.berkeley.edu/people/chaffee/fat32.html . It is quite a ways down in that page. Or look for it via ftp in ftp://bmrc.berkeley.edu/pub/linux/rescue/ and locate the latest "fixdisktable" in that ftp directory. (Source and binary dist should be available.)


Before repartitioning your harddisk take care about the disk layout. Especially look for hidden disk space or certain partitions used for suspend to disk or hibernation mode. Some laptops come with a partition which contains some BIOS programs (e.g. COMPAQ Armada 1592DT). Search the manual carefully for tools like PHDISK.EXE, Suspend to Disk, Diagnostic TOOLS.

Please see chapter DOS Tools to Repartition a Hard Disk, too.

By Nathan Myers from LL - LinuxLaptops: "I partitioned a 10G Thinkpad drive last week and then none of fdisk, cfdisk, or sfdisk would read the partition table any more. It turns out I had created a partition that started on cylinder 1024, and there's a bug common to all three programs that makes them fail in that case. (I didn't try Disk Druid.) So, maybe you should add some advice about not starting partitions on that cylinder."

Multi Boot

Please see the Different Environments chapter, for information about booting different operating systems from the same harddisk.

5.4 Installation Methods

From the Battery-HOWTO:"Installing and using Linux on a laptop is usually no problem at all, so go ahead and give it a try. Unlike some other operating systems, Linux still supports and runs well on even very old hardware, so you might give your outdated portable a new purpose in life by installing Linux on it."

One of the great benefits of Linux are its numerous and flexible installation features, which I don't want to describe in detail. Instead I try to focus on laptop specific methods, which are necessary only in certain circumstances.

Most current distributions support installation methods which are useful for laptops, including installation from CD-ROM, via PCMCIA and NFS (or maybe SMB). Please see the documents which are provided with these distributions for further details or take a look at the above mentioned manuals and HOWTOs.

5.5 From a Boot Floppy plus CD-ROM - The Usual Way

With modern laptops, the usual Linux installation (one Boot Floppy, one Support Floppy, one Packages CD-ROM) should be no problem, if there is are floppy drive and a CD-ROM drive available. Though with certain laptops you might get trouble if you can not simultaneously use the floppy drive and CD-ROM drive , or if the floppy drive is only available as a PCMCIA device, as with the Toshiba Libretto 100. Some laptops support also booting and therefore installation completely from a CD drive, as reported for the SONY VAIO in the VAIO-HOWTO. Note: Check the BIOS for the CD boot option and make sure your Linux distribution comes on a bootable CD.

Certain laptops will only boot zImage kernels. bzImage kernels won't work. This is a known problem with the IBM Thinkpad 600 and Toshiba Tecra series, for instance. Some distributions provide certain boot floppies for these machines or for machines with limited memory resources, Debian/GNU Linux http://www.debian.org for instance.

5.6 From a DOS or Windows Partition at the Same Machine

This is a short description of how to install from a CD-ROM under DOS without using boot or supplemental floppy diskettes. This is especially useful for notebooks with swappable floppy and CD-ROM components (if both are mutually exclusive) or if they are only available as PCMCIA devices. I have taken this method from "Installing Debian GNU/Linux 2.1 For Intel x86 - Chapter 5 Methods for Installing Debian" http://www.debian.org :

  1. Get the following files from your nearest Debian FTP mirror and put them into a directory on your DOS partition: resc1440.bin drv1440.bin base2_1.tgz root.bin linux install.bat and loadlin.exe.
  2. Boot into DOS (not Windows) without any drivers being loaded. To do this, you have to press <F8> at exactly the right moment.
  3. Execute install.bat from that directory in DOS.
  4. Reboot the system and install the rest of the distribution, you may now use all the advanced features such as PCMCIA, PPP and others.

This should work for other distributions with similar changes. For RedHat see How to Install from CD-ROM without Boot and Supplemental Disks .

Some new laptops may be able to boot a Linux distribution on a bootable CD-ROM (e.g., RedHat). This would allow installation without a floppy disk drive.

5.7 From a Second Machine With a Micro Linux On a Floppy


Because of their small or non-existent footprint, micro-Linuxes are especially suited to run on laptops, particularly if you use a company-provided laptop running Windows9x/NT. Or for installation purposes using another non Linux machine. There are several micro Linux distributions out there that boot from one or two floppies and run off a ramdisk. See appendix A for a listing of distributions.

I tried the following with muLinux http://mulinux.firenze.linux.it/ to clone my HP OmniBook 800 to a COMPAQ Armada 1592DT. Thanks to Michele Andreoli, maintainer of muLinux for his support. Since muLinux doesn't support PCMCIA yet, you may use TomsRtBt instead. In turn TomsRtBt doesn't support PPP but provides slip. Note: Since version 7.0 muLinux provides an Add-On with PCMCIA support.

I have described how to copy an already existing partition, but it might be also possible to achieve a customized installation. Note: Usually you would try to achieve an installation via NFS, which is supported by many distributions. Or if your sources are not at a Linux machine you might try the SMB protocol with SAMBA, which is also supported by muLinux .


You need two machines equipped with Linux. With the laptop (client/destination) on which you want to install Linux use the muLinux floppy. The other machine (server/source) may be a usual Linux box or also using muLinux. Though its low transfer rate I use a serial null modem cable because its cheap. You may apply the according method using a PCMCIA network card and a crossover network cable or a HUB, or a parallel "null modem" cable and PLIP. As the basic protocol I used PPP, but you may also use SLIP. For the data-transfer I used nc. Note: this is an abbrevation for netcat, some distributions use this as the program name. You may use ftp, tftp, rsh, ssh, dd, rcp, kermit, NFS, SMB and other programs instead.

Basic requirements are:

  1. A good knowledge about using Linux. You have to know exactly what you are doing, if not you might end destroying former installations.
  2. A nullmodem serial cable.

Source Machine

At your source machine issue the following commands (attention: IP address, port number, partition and tty are just examples!):

  1. Edit /etc/ppp/options, it should contain only:

  2. With muLinux versions 3.x you may even use the convenient command setup -f ppp .
  3. Start PPP: pppd .
  4. Configure the PPP network device: ifconfig ppp0 .
  5. Add the default route: route add default gw .
  6. Check the network connection: ping, though the destination machine isn't up yet.
  7. Start the transfer from another console, remember <LEFT-ALT><Fx>: cat /dev/hda2 | gzip -c | nc -l -p 5555 .
  8. After the transfer (there are no more harddisk writings) stop the ping: killall ping .

Destination Machine

At the destination machine issue:

  1. Edit /etc/ppp/options, it should contain only:

  2. With muLinux versions >= 3.x you may even use the convenient command setup -f ppp .
  3. Start PPP: pppd .
  4. Configure the PPP network device: ifconfig ppp0 .
  5. Add the default route: route add default gw .
  6. Check the network connection, by pinging to the source machine: ping .
  7. Change to another console and get the data from the server: nc 5555 | gzip -dc >/dev/hda4 .
  8. 400 MB may take app. 6 hours, but YMMV.
  9. Stop the transfer, when it is finished with: <CTL><C> . This can probably be avoided (but I didn't test it) by adding a timeout of 3 seconds using the -w 3 parameter for nc at the destination machine nc -w 3 5555 | gzip -dc >/dev/hda4
  10. After the transfer is completed, stop the ping: killall ping .

Configuration of the Destination Machine after the Transfer

  1. Edit /etc/fstab .
  2. Edit /etc/lilo.conf and /etc/lilo.msg and start lilo .
  3. Set the new root device to the kernel: rdev image root_device .


  1. You may use bzip2 the same way as gzip (untested).
  2. Since rshd, sshd, ftpd daemons are not available with muLinux you have to build your own daemon with nc aka netcat, as described above.
  3. I had to set up both PPP sides very quick or the connection broke, I don't know why.
  4. Speed optimization has to be done, asyncmap 0 or local?
  5. I checked this only with a destination partition greater than the source partition. Please check dd instead of cat therefore.

    Or do the following (untested): At the destination machine cd into the root directory / and do nc -l -p 5555 | bzip2 -dc | tar xvf -. At the source machine machine cd into the root directory / and do tar cvf - . | bzip2 | nc -w 3 5555. This should shorten the time needed for the operation, too. Because only the allocated blocks need to be transfered.

  6. Don't mount the destination partition.

5.8 From a Second Machine With a 2.5" Hard Disk Adapter

From Adam Sulmicki adam@cfar.unc.edu I got this hint: Most but not all harddisks in laptops are removable, but this might be not an easy task. You could just buy one of those cheap 2.5" IDE converters/adapters which allow you to connect this harddisk temporarily to a PC with IDE subsystem, and install Linux as usual using that PC. You may do so using the harddisk as the first IDE drive or besides as the second IDE drive. But than you need to be sure that lilo writes to the right partition. Also you have to make sure that you use the same translation style as your laptop is going to use (i.e. LBA vs. LARGE vs. CHS ). You find additional information in the Hard-Disk-Upgrade-mini-HOWTO. You might copy an existing partition, but it is also possible to achieve a customized installation.

5.9 From a PCMCIA Device

Since I don't have a laptop which comes with a PCMCIA floppy drive (for instance Toshiba Libretto 100), I couldn't check this method. Please see the chapter Booting from a PCMCIA Device in the PCMCIA-HOWTO. Also I couldn't check whether booting from a PCMCIA harddisk is possible.

Anyway, when you are able to boot from a floppy and the laptop provides a PCMCIA slot, it should be possible to use different PCMCIA cards to connect to another machine, to an external SCSI device, different external CD and ZIP drives and others. Usually these methods are described in the documentation which is provided with the distribution.

5.10 From a Parallel Port Device (ZIP Drive, CD Drive)

I couldn't check this method by myself, because I don't have such a device. Please check the according Install-From-Zip-mini-HOWTO and CD-HOWTO. Also I don't know how much these installation methods are supported by the Linux distributions or the micro Linuxes. I suppose you have to fiddle around a bit to get this working.

5.11 From a Second Machine Using the Parallel Port - PLIP Network Install

I got this courtesy by Nathan Myers <ncm@cantrip.org>: "Many distributions support installing via a network, using FTP, HTTP, or NFS. It is increasingly common for laptops to have only a single PCMCIA slot, already occupied by the boot floppy drive. Usually the boot floppy image has drivers for neither the floppy drive itself, nor the PCMCIA subsystem. Thus, the only network interface available may be the parallel port.

Installation via the parallel port using the PLIP protocol has been demonstrated on, at least, Red Hat. All you need is a Laplink parallel cable, cheap at any computer store. See the PLIP-mini-HOWTO for details on setting up the connection. Note that (uniquely) the RedHat installation requires that the other end of the PLIP connection be configured to use ARP (apparently because RedHat uses the DOS driver in their installer). On the host, either export your CD file system on NFS, or mount it where the ftp or web daemon can find it, as needed for the installation."

The PLIP Install HOWTO by Gilles Lamiral describes how to install the Debian GNU-Linux distribution on a computer without ethernet card, nor cdrom, but just a local floppy drive and a remote nfs server attached by a Null-Modem parallel cable. The nfs server has a cdrom drive mounted and exported.

5.12 Installing Linux on Small Machines

If you have less than 8MB memory and want to install via NFS you may get the message "fork: out of memory". To handle this problem, use fdisk to make a swap partition (fdisk should be on the install floppy or take one of the mini Linuxes described above). Then try to boot from the install floppy again. Before configuring the NFS connection change to another console (for instance by pressing <ALT><2>) and issue swapon /dev/xxx (xxx = swap partition ). Thanks to Thomas Schmaltz.

Next Previous Contents
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service