WebHosting Paid by #1Payday.Loans


   The ROCK Linux project has been discontinued in 2010. Here are the old data for the historical record!

About ROCK Linux
Rolling ROCK (eZine)
   September 2005
   July 2005
   April/May 2005
   March 2005
   February 2005
   January 2005
   December 2004
   November 2004
   October 2004
   September 2004
   Router PXE install
   Gaming with ROCK Linux
   Build Wrappers Overview
   Status of Sparc and PowerPC
   "Hidden" ROCK Script Features
   ROCK 2.0 Install Disks
   Multi tar-ball packages
   ISO-Testing with VMWare
   ROCK i18n Project
   Building on a Beowulf Cluster
   1.7 Status Reports
   dROCK Overview
   Alpha AXP and MIPS Status
Download
Community
Documentation
Source Trees
Architectures
Target Distributions
Related Projects
Feature Projects
PR Stuff (T-Shirts, ..)
Webpage Mirrors
The ROCK Portal Site
Sitemap
Search

  ROCK 2.0 Install Disks

ROCK Linux 2.0 Install Disks

Building Bootable CDs

ROCK Linux 1.7 has completely rewritten install disks. The new install-disks are their own target in the build configuration (called bootdisks). So if you want to build a "normal" Linux distribution with bootable CDs and install-disks, you need to create and build two configurations:

  1. Build the "main" distribution:
    ./scripts/Config -cfg system
    ./scripts/Build-Target -cfg system

  2. Build the install system:
    ./scripts/Config -cfg installer
    ./scripts/Build-Target -cfg installer
       

  3. Create an ISO-Image with both sub-systems:
    ./scripts/Create-ISO myiso system installer

This will create myiso_*.iso files which can be burned onto a CD as they are. The first CD is bootable and also contains the disk-images for booting from floppy disks. This is the bootdisks target. The "real" system can be any other target - as long as this other target doesn't try to create it's own eltorito (boot from CD) image (which would result in an error message when running ./scripts/Create-ISO.

How does it look like for the user

After booting the kernel, the system mounts the 1st stage filesystem - a small linuxrc system for loading kernel modules and loading the 2nd stage filesystem into memory:


The linuxrc main menu


Loading modules (it's possible to pass module parameters)


Loading the 2nd stage filesystem

The 2nd stage filesystem is less than 20 MB and contains everything which could be usefull for installing ROCK Linux or repairing a system (more than 400 programms - a feature complete small linux distribution in RAM).

How does it work technically

The kernel loads an initrd (ext2) filesystem image into memory while booting and uses it as a root filesystem. This initrd image contains various networking and scsi kernel modules as well as the programs gzip, tar, insmod and a linuxrc program binary. They are all built statically using dietlibc - so no glibc is needed on the initrd filesystem.

The linuxrc binary is running the menus shown in the screenshots above. The user may load kernel modules directly from the initrd or from any additional floppy-disks or CDs as well as load the 2nd stage filesystem.

The 2nd stage filesystem is stored as a tar.gz file on the CD. The linuxrc binary is mounting a tmpfs (memory filesystem) on /mnt_root and extracts the 2nd stage filesystem there. Than it creates a /mnt_root/oldroot directory and executes the system call:

pivot_root("/mnt_root", "/mnt_root/old_root")

This makes the filesystem mounted on /mnt_root the new root filesystem. The original root filesystem will be re-mounted on /mnt_root/old_root (which is just /old_root afterwards).

Then the /linuxrc program from the new root filesystem (the 2nd stage filesystem) is executed. It mounts /dev and /proc and umounts /old_root. Now we are running a small linux distribution entirely in a tmpfs which is (unlike a ram disk) growing and shrinking on demand.

The solution for systems with low memory

For most systems it's no problem to have 20 MB of memory used up by the 2nd stage filesystem. Todays PCs do have at least 64 MB of memory, 256 MB up to 1 GB are very common values - so there is still by far enough memory available for doing the actual installation.

But if you still have a system with 32 MB (or even less) memory, loading a 20 MB 2nd stage filesystem is not an option. Also, the .tar.gz of this 20 MB 2nd stage filesystem is still more than 7 MB big - too big for a floppy disk. That's why we also have a small 2nd stage filesystem, for older systems or systems without a CD-ROM drive.


Our Portal Site: www.rocklinux.net
Copyright © 1998-2003 Clifford Wolf
rocklinux.org search: