Whole document tree
    

Whole document tree

Diskless Nodes HOW-TO document for Linux: Diskless with "Live Linux CDROM" Next Previous Contents

3. Diskless with "Live Linux CDROM"

The "Live Linux CDROM" is a CDROM which has the entire Linux Operating System filesystem on the CDROM. It is made by copying the live Linux system on to CDROM. The "Live Linux CDROM" directly boots the Linux operating system from the CDROM drive. But you need to setup the BIOS to first boot from CDROM. Generally the boot order is : Floppy Drive, Hard disk, CDROM. You can enter BIOS setup, by powering on the computer and presssing the DEL key.

Get the "Live Linux CDROM" from

Diskless workstation with "Live Linux CDROM" is becoming a reality because of the following reasons:

  1. RAM prices are all time low and 512MB RAM costs only US$70.
  2. CDROM drives are becoming extremely fast and current read speed is topping at 72X.
  3. CDROM IDE drives are very cheap, CDROM with 52X read speed is costing only US$33.
  4. DVD-ROM is also getting very cheap and can carry 5 Gigabyte of Linux software and is three times faster than CDROM drive.

A big advantage of Live Linux CDROM over other methods of diskless operations like EEPROM is that it is very easy to setup and you can very easily upgrade the Linux CDROM with new versions of the Linux kernel every three months. Simply throw away the old Live Linux CDROM and pop-in the new version Live Linux CDROM. Upgrade is just 20 seconds and the cost of Linux CDROM is 30 cents (less than a US dollar!). In near future, Live Linux CDROM + DVD-ROM will rule the computer desktops.

FIVE SECONDS UPGRADE: Live Linux CDROM promotes RAPID Operating Sytem UPGRADE. You can upgrade an OS in less than 5 seconds!! Live Linux CDROM introduces the concept of mass upgrade and RAPID ACTION. Simply throw away the old Live Linux CDROM and pop in new CDROM and you are done upgrading!

With Live Linux CDROM, you do not need a hard-disk, floppy drives and others. All you need to build a diskless workstation is :

  1. Live Linux CDROM
  2. CPU
  3. Mother board
  4. NIC (Network Interface Card)
  5. CDROM drive (IDE or SCSI)
  6. RAM (32 MB minimum for full graphics and 16 MB minimum for console mode)

For best prices on RAM and CDROM IDE drives check auctions in online stores like Egghead http://www.egghead.com or local stores in your city like UBM, Houston.

After you boot "Live Linux CDROM", you can mount the hard disk partitions from remote Linux servers. And you can use VNC to access MS Windows 2000 and Linux servers. Or you can use WinConnect to access MS Windows applications like MS Office, Outlook etc. But WinConnect needs MS Windows XP/2000/NT server.

To evaluate the CDROM/DVD drives use the following software from http://www.cdspeed2000.com. This site also gives the speed comparison of drives from different vendors. The top speed CDROM drive is from Kenwood at http://www.kenwoodtech.com at 72x speed.

3.1 Build a Live Linux CDROM

You can build your own Live Linux CDROM and customize the kernel, hardware support, loadable module support etc.

This section was originally written by Hans de Goede j.w.r.degoede@et.tudelft.nl for the Diskless-root-NFS-HOWTO. I modified it slightly in order to reflect some differences between this document and the Diskless-root-NFS-HOWTO.

Much of the above also goes for booting from cdrom. Why would one want to boot a machine from cdrom? Booting from cdrom is interesting everywhere one wants to run a very specific application, like a kiosk, a library database program or an internet cafe, and one doesn't have a network or a server to use a root over nfs setup.

Creating a test setup

Now that we know what we want to do and how, it's time to create a test setup:

  • For starters just take one of the machines which you want to use and put in a big disk and a cd burner.
  • Install your linux of choice on this machine, and leave a 650 MB partition free for the test setup. This install will be used to make the iso image and to burn the cd's from, so install the necessary tools. It will also be used to restore any booboo's which leave the test setup unbootable.
  • On the 650 mb partition install your linux of choice with the setup you want to have on the cd, this will be the test setup.
  • Boot the test setup.
  • Compile a kernel with isofs and cdrom support compiled in.
  • Configure the test setup as described above with the root filesystem mounted read only.
  • Verify that the test setup automagically boots and everything works.
  • Boot the main install and mount the 650 MB partition on /test of the main install.
  • Put the following in a file called /test/etc/rc.d/rc.iso, this file will be sourced at the beginning of rc.sysinit to create /var:
                        #/var
                        echo Creating /var ...
                        mke2fs -q -i 1024 /dev/ram1 16384
                        mount /dev/ram1 /var -o defaults,rw
                        cp -a /lib/var /
    

  • Edit /test/etc/rc.sysinit, comment the lines where the root is remounted rw, and add the following 2 lines directly after setting the PATH:
                        #to boot from cdrom
                        . /etc/rc.d/rc.iso
    

  • Copy the following to a script and execute it to make a template for /var and create /tmp and /etc/mtab links.
                        #!/bin/sh
                        echo tmp
                        rm -fR /test/tmp
                        ln -s var/tmp /test/tmp
    
                        ###
                        echo mtab
                        touch /test/proc/mounts
                        rm /test/etc/mtab
                        ln -s /proc/mounts /test/etc/mtab
    
                        ###
                        echo var
                        mv /test/var/lib /test/lib/var-lib
                        mv /test/var /test/lib
                        mkdir /test/var
                        ln -s /lib/var-lib /test/lib/var/lib
                        rm -fR /test/lib/var/catman
                        rm -fR /test/lib/var/log/httpd
                        rm -f /test/lib/var/log/samba/*
                        for i in `find /test/lib/var/log -type f`; do
                          cat /dev/null > $i;
                        done
                        rm `find /test/lib/var/lock -type f`
                        rm `find /test/lib/var/run -type f`
    

  • Remove the creation of /etc/issue* from /test/etc/rc.local: it will only fail.
  • Now boot the test partition again, it will be read only just like a cdrom. If something doesn't work reboot to the working partition fix it, try again etc. Or you could remount / rw, fix it, then reboot straight into to test partition again. To remount / rw type:
                        # mount -o remount,rw /
    

Creating the CD

If you need more information than you can find below, please refer to the CD-Writing-HOWTO.

Creating a boot image

First of all, boot into the working partition. To create a bootable cd we'll need an image of a bootable floppy. Just dd-ing a zImage doesn't work since the loader at the beginning of the zimage doesn't seem to like the fake floppydrive a bootable cd creates. So we'll use syslinux instead.

  • Get boot.img from a redhat cd.
  • Mount boot.img somewhere through loopback by typing:
                        # mount boot.img somewhere -o loop -t vfat
    

  • Remove everything from boot.img except for ldlinux.sys and syslinux.cfg.
  • Cp the kernel-image from the test partition to boot.img.
  • Edit syslinux.cfg so that it contains the following, of course replace zImage by the appropriate image name:
                        default linux 
    
                        label linux
                        kernel zImage
                        append root=/dev/<insert your cdrom device here>
    

  • Umount boot.img:
                        # umount somewhere
    

  • If your /etc/mtab is a link to /proc/mounts, umount won't automagically free /dev/loop0 so free it by typing:
                        # losetup -d /dev/loop0
    

Creating the iso image

Now that we have the boot image and an install that can boot from a readonly mount it's time to create an iso image of the cd:

  • Copy boot.img to /test
  • Cd to the directory where you want to store the image and make sure it's on a partition with enough free space.
  • Now generate the image by typing:
                          # mkisofs -R -b boot.img -c boot.catalog -o boot.iso /test
    

Verifying the iso image

  • Mounting the image through the loopbackdevice by typing:
                          # mount boot.iso somewhere -o loop -t iso9660
    

  • Umount boot.iso:
                          # umount somewhere
    

  • If your /etc/mtab is a link to /proc/mounts umount won't automagically free /dev/loop0 so free it by typing:
                        # losetup -d /dev/loop0
    

Writing the actual CD

Assuming that you've got cdrecord installed and configured for your cd-writer type:


             # cdrecord -v speed=<desired writing speed> dev=<path to your writers generic scsi device> boot.iso

Boot the cd and test it

Well the title of this paragraph says it all;)


Next Previous Contents