  Intersync & Intermezzo Root FS HOWTO
  Robert Read
  v0.01, March 2002

  This document describes how to use Intermezzo as the root filesystem
  of a client.
  ______________________________________________________________________

  Table of Contents


  1. Acknowledgments

  2. Disclaimer and License

  3. Using Intermezzo on a root filesystem

     3.1 Create root
     3.2 Create ramdisk
     3.3 Boot the client


  ______________________________________________________________________

  11..  AAcckknnoowwlleeddggmmeennttss

  22..  DDiissccllaaiimmeerr aanndd LLiicceennssee

  InterMezzo is an experimental file system.  It contains kernel code
  and daemons running with root permissions and is known to have bugs.
  Please back up all data when using or experimenting with InterMezzo.


  InterMezzo is covered by the GPL. The GPL describes the warranties
  made to you, and can be found in the file COPYING.

  Copyright on InterSync is held by Cluster File Systems, Inc.


  Copyright on InterMezzo kernel components is held by Cluster File
  Systems, Inc, Peter J. Braam, Stelias Computing, Carnegie Mellon
  University, Phil Schwan, Los Alamos National Laboratory and Red Hat,
  Inc, TurboLinux, Inc., Tacitus Systems, Inc. and Mountain View Data,
  Inc.

  InterMezzo is a trademark of Stelias Computing.  It may be used freely
  to refer to the software on the InterMezzo web site <http://www.inter-
  mezzo.org> .

  33..  UUssiinngg IInntteerrmmeezzzzoo oonn aa rroooott ffiilleessyysstteemm

  It is now possible, with some effort, to use Intermezzo as the root
  filesystem for a client. This procedure is roughly described here, and
  as this is an active area of development, the process is likely to
  change rapidly.

  Before attempting to use Intermezzo as a root filesystem, make sure to
  go through the above Quick Start procedure to ensure that everything
  is working.

  33..11..  CCrreeaattee rroooott

  The first step is to create the filesystem on the server that will be
  used by the client as its root. The method for doing is specific to a
  particular linux distribution, but there are some handy bootable root
  filesystems available on the User Mode Linux download <http://user-
  mode-linux.sourceforge.net/dl-sf.html> page that you can use for
  testing. Prepare an empty intermezzo filesystem on a partition or loop
  file as above (make sure it is large enough for the root filesystem
  image), and copy the root filesystem on the intermezzo filesystem.

  After the base root is in place, you need to install the rpms for
  intersync.


  rpm --root /path/to/rootfs -Uvh intersync-0.01.rpm



  Also, some versions of Apache write a lock file in /var/lib/http very
  early in the startup process. Since this directory will not be
  writable at the time Apache starts on the intermezzo root filesystem,
  I change that directly to a symbolic link:


  cd /path/to/rootfs/var/lib/
  rmdir http
  ln -s ../../mnt/tmp



  33..22..  CCrreeaattee rraammddiisskk

  This is the trickiest part, but luckily we have ramdisk available here
  that you can start from. You need to build a kernel for your client
  machine, and make sure to enable these options, as well as what you'll
  need on the client:


  +o  ip kernel autoconfig

  +o  ramdisk built in, with a default size of approx 35 MB

  +o  initrd

  +o  ext3 configured as a module

  After building the kernel, install the modules in the ramdisk
  directory:


  make MODULES_DEST_DIR=<ramdisk_dir> modules_install



  Now build the ramdisk image.

  XXX - need to document this step...

  33..33..  BBoooott tthhee cclliieenntt

  Using the kernel and ramdisk built in the previous step, create a
  tagged image file that can be used by Etherboot.


  mknbi-linux --ip rom --rdbase 0x810000 kernel ramdisk



  Store the result in /tftpboot, configure dhcpd on the server so the
  client loads this file and boot the client. If all goes well, you
  should boot into a shell prompt with the ramdisk as your root
  filesystem, and an intermezzo cache dir mounted on /mnt.

  Start intersync and wait for the initial integration to finish:


  intersync --server <server addr> /mnt



  After integration, switch to another virtual console (Alt-F2) and
  hoard the files needed to run intersync on the cache dir.


  chroot /mnt /usr/bin/hoard



  After the hoard, you can switch back to the first console and kill
  intersync using ^C. Now you can switch the root to intermezzo:

  Now your root is intermezzo, but because intersync is not running, the
  filesystem should be read-only. Now start intersync with this command:


  intersync --docroot /mnt/var/intermezz-0 --server <server addr) /



  You may want to run this using nohup, but if you run it the background
  make sure to redirect the log file to somewhere on /mnt.

  That's all there is too it.


































