Linux FAQ's & Manuals
- Linux Scripts
- Debian Install
- Bash For Beginners
- Bugzilla
- Consultants Guide
- GCC Manual
- Linux Command Line Tools
- Gnu Pascal Coding Standards
- Linux Installation Disk
- Labolatorium Linux(PL)
- Budowa systemu Linux(PL)
- Linux Dictionary
- Network Administrators
- Rescue Disk for Linux
- Red Hat Installation
- Red Hat Customization
- Red Hat Getting Started
- Red Hat Security
- Secure & Optimize
- Slackware Manual
- Suse Support
- Suse FAQ
developerWorks: "Monitoring and analyzing masses of information--Is the CPU overloaded? Is the network interface saturated?--across several hosts is a daunting task..."
Review: Puppy Linux 2.18
Puppy Linux is a light weight Linux distribution built from scratch and born in mid 2002. Its creator, Barry Kauler, originally created Puppy Linux as a fun project to do in his spare time...
With New Code Base, Supergamer is Fun Again
Linux.com: "Supergamer is a unique Linux distribution whose primary focus is on fun--specifically, gaming. Supergamer VL, now based on VectorLinux, is all new, with additional games, new code base, and new look and feel. Let the games begin..."
Scribus: Open Source Desktop Publishing
TrustedReviews: "To read most of the digital press, you'd think InDesign was the only big-league desktop publishing (DTP) application anyone took seriously..."
Gartner, Open Source, and Microsoft
Intelligent Enterprise: "I received Gartner e-mail this week marketing their up-coming open-source summit. The message contains gems that illuminate Gartner's perspective on open source and the larger IT world..."
next: first preparation up: making linux installation disks previous: contents contents
subsections
introduction
in my previous article ``getting linux into small machines'' i described how to create a bootable linux diskette with busybox (shell with many built in utilities) and uclibc (a small c library). these programs save an enormous amount of memory and disk space, so that they are usable even on small machines.
in this article i want to carry the idea of creating a small boot diskette a step further. especially i want to achieve the following goals:
- updating the software to the latest available versions.
- adding more functionality to the diskette. especially i want to add the following extra features:
- module support, especially for scsi and ethernet cards.
- network support.
- curses support, especially useful for the dialog utility.
- laying the basis for a more generalized linux installer.
i will draw many ideas from the debian installer. busybox was created for the debian install diskettes in the first place and the debian installer made heavy use of the dialog utility.
the ideas described in this article should not only be useful for installation disks, but also for special-purpose stand-alone linux versions such as routers or print servers.
albeit reluctantly, i will abandon the idea of targeting a 386 system with only 4mb or ram. as even a stripped down linux kernel needs around 3mb of memory to run and i plan to use a ram disk of at least 2mb, the use of a ram disk on a 4mb machine is definitely out if the installation is to be considered useful. systems without a ram disk would need their root file system on a diskette and that would be limited to 1.44mb (it cannot be compressed).
the mission
we want to create an installation diskette that enables us to install a linux distribution onto a hard disk. the system is considered to meet the following requirements:
- a 486dx cpu or later. this requirement is arbitrary. it allows us to leave fpu emulation out of the kernel and leave out special support for the 386.
- 8mb or ram.
- a hard disk on either an (e)ide interface or a scsi interface.
- either an ethernet card or a cd-rom drive.
- the ethernet card must be connected to a (local) network with a static ip address. we could add a dhcp client as well.
- the cd-rom must be atapi or scsi.
- a normal diskette drive or the ability to boot from cd-rom.
at the moment the system does not support pcmcia or usb devices to install from. for laptops it means that their ethernet cards would not be accessible. the debian installer (version 2.1) could do this though.
the aim of this article is to assist in creating a simple boot diskette for your own linux distribution. this is only the infrastructure for the installation diskette, not a completely working installation diskette.
what needs to be added:
- the linux distribution itself. in its simplest form this can be a huge tarball (compressed tar archive) that contains all files that should go onto the hard disk. if you create linux from scratch, a brand new linux system is created on a separate hard disk partition on the host system. the contents of this partition can be put in a tarball, which can then be put on a cd-rom and then it can be installed on a target system using this installation diskette.
any existing linux installation (regardless of the distribution it was originally created with) could in principle be archived and restored this way.
- a set of shell scripts (using dialog) that guides the user through the installation process. this is not strictly necessary, but if non-experts are expected to install the distribution, this is of course necessary.
what needs to be on the diskette?
in order to get a linux system up and running we need the following items:
- a boot loader. this program is loaded by the pc bios and this makes it possible to load another program, such as the linux kernel. we will make use of the grub boot loader, especially due to its flexibility.
- the linux kernel. this is the heart of the operating system.
- a root file system. this is the file system that is mounted when the kernel is started. the first program that runs (typically /sbin/init has to be in the root file system. the root file system can exist on a diskette, it can be loaded in ram at boot time or it can exist on the hard disk.
on our boot diskette we will use an initial ram disk (initrd), which will be loaded by the boot loader before the kernel starts.
the root file system has to contain the following items:
- binaries that we want to run.
- startup scripts and other configuration files.
- the installation scripts themselves.
- shared libraries.
- device files.
- mount points.
the host and target system
the host system is the computer on which we build the bootable diskette. it is assumed to be a fairly modern pc with a modern installation of linux. we will assume that it is a pentium with at least 32mb of ram.
also we assume that it contains a modern linux system that contains the following software:
- linux kernel 2.4
- recent gcc (2.95 or later)
- loop devices (a kernel feature that allows you to mount a file system on a file instead of a block device).
- bzip2
- support for the various file systems that we want to use.
you will need lots of hard disk space. around 400mb would be enough. the unpacked linux kernel source tree alone takes around 170mb these days. paradoxically enough the end result will fit on one or two 1.44mb diskettes.
the target system is the system on which the diskette will be booted. it is supposed to be at least a 486 with 8mb of ram.
next: first preparation up: making linux installation disks previous: contents contents lennart benschop 2003-07-16