[Planetlab-devel] bootcd_v3 for myplc
Chan, Winson C
winson.c.chan at intel.com
Tue Nov 7 16:20:32 EST 2006
PlanetLab Developers,
My lab has a prototype that integrated wireless mesh with pl_box. I am
trying to migrate to myplc at the moment. One of our interns was using
bootcd_v3 for our pl_box implementation. But when he left, he missed a
few steps for the bootcd_v3 usage. So, I want to see if I can get some
instructions on using bootcd_v3 for migration to myplc.
The following is the documentation we have on bootcd and the boot
manager. I'm trying to port this over to myplc but seem to have some
gap in the instructions. For example, what source should we be using to
build the myplc bootCD via the bootcd_v3 script? Should we just unpack
the iso (BootCD-3.3.iso) in /plc/data/var/www/html/download? Where is
the bootcd_v3 script expecting these files to be located at? Are there
other files that the bootcd_v3 script is expecting other than the files
from the iso?
We don't need to modify the kernel this time. Our most recent wireless
mesh software will include the drivers and subsystems. So I just need
to copy the necessary files into the file structure of the iso and run
the software on boot.
Thanks.
Winson
ADD NODE
1. On the PLC website, add a new node and generate a configuration
file for it. Make sure the IP address and other network configurations
are correct.
2. Put the configuration file under
/planetlab/bootcd_v3/configurations/<PLC name> and add the file name to
the last line of file configuration
3. . /planetlab/bootcd_v3/build.sh clean <PLC name> to clean the
old boot CD image
4. . /planetlab/bootcd_v3/build.sh build <PLC name> to generate new
boot CD image.
5. If cdrecord is not installed (rpm -qi cdrecord), install it by
yum -y install cdrecord
6. Burn boot CD by ./planetlab/bootcd_v3/build.sh burn <PLC name>
7. For the new node, configure it to boot from CD first. Boot the
new node from the above burned boot CD. Answer 'yes' when prompted.
BOOT CD
PlanetLab uses syslinux (including isolinux for .iso) to build the boot
CD image. All the materials are generated to
/planetlab/bootcd_v3/build/<PLC name>/cdroot. They are compressed to the
boot CD image .iso. All materials other than
/planetlab/bootcd_v3/build/<PLC name> /cdroot/usr are compressed as
initrd.gz, which is stored in /planetlab/bootcd_v3/build/<PLC
name>/cdroot/usr/isolinux. The above customized PlanetLab kernel will be
copied to the same directory as initrd.gz. When the new node is booted
from its boot CD, the ramdisk (/dev/ram0) is brought up by syslinux and
the CD is mounted to /usr on the new node. The detailed steps are:
1. Copy the above customized PlanetLab kernel to
/var/www/html/install-rpms/bootcd/ and
/var/www/html/install-rpms/planetlab-v3
2. yum-arch /var/www/html/install-rpms/bootcd
3. yum-arch /var/www/html/install-rpms/planetlab-v3
4. Verify that /var/cache/yum/BootCDRepo/ has no contradicting
kernel
5. Copy the above remade FlexMesh driver modules and all other
FlexMesh software to /planetlab/bootcd_v3/laptop. If we only use ipw2200
driver for 1-hop wireless communication, copy its required driver
modules and firmwares to /planetlab/bootcd_ve/ipw2200. The file build.sh
is modified to copy these materials to the boot CD.
6. Add 'wireless-tools' and 'hotplug' to
/planetlab/bootcd_v3/yumgroups.xml and also copy yumgroups.xml to
/var/www/html/install-rpms/bootcd
7. At PLC website, add a new node and generate a new configuration
file. It is noted that PlanetLab does not allow private network address,
but we only use private network addresses in the WLAN. So we need to
change /planetlab/plc_www/db/nodes/add.php to allow private network
addresses. Copy the configuration file to PLC, clean, build, and burn
the boot CD image. For now, each new node should have its own boot CD
because the configuration file contains a random key specific to each
node.
8. After booting the new node from the boot CD, according to
/etc/inittab, it executes scripts in /etc/init.d, such as pl_sysinit
(calls pl_hwinit and pl_netinit), and pl_boot. pl_netinit has been
modified to install and start the mesh networking function. The network
configuration file is found from the CD and is used to connect to PLC.
9. In pl_boot, the new node connects to the PLC using the wireless
connection. And the bootmanager scripts are downloaded from the PLC
website boot directory. From now on, the task of boot CD is completed
and the control of the new node is transferred to the boot manager,
which can be updated by the administrator of PLC.
BOOT MANAGER
At the end of pl_boot, the boot manager script bootmanager.sh.sgn is
downloaded by the new node to continue installation. The script can be
updated in PLC at /planetlab/bootmanager/. After changing the script, we
execute ./setup_bootmanager.sh to compress the source, convert it to
ASCII, sign it, and copy it to the boot directory in the WWW directory
/planetlab/plc_www or equivalently /var/www/html. The installation
handled by the boot manager involves multiple steps (source code in
/planetlab/bootmanager/source/steps). One of the steps checks that the
provided hostname of the new node in the configuration file matches the
real DNS name, this may not be right for a private network address, so
we change ReadNodeConfiguration.py to force the hostname revolve to be
OK. Some other steps are also modified to enable wireless support. The
detailed steps executed by the boot manager script are:
1. The new node downloads alpine-PartDisks,tar.gz and
alpine-BootLVM.tar.gz from PLC, partition the hard disk in the new node
and add volume groups, the hard disk of the node will be mounted to
temporarily /tmp/mnt/sysimg.
2. Download alpina-BootstrapRPM.tar.bz2 to bring up a basic Linux
system. We need to uncompress the original file using bunzip2 and tar
-xvf and modify it in order to bring up wireless support.
a. cp wirelessdriver <uncompressed directory>/etc/rc.d/init.d
b. chroot <uncompressed directory>
c. chkconfig --add wirelessdriver
d. yum -y install wireless-tools
e. yum -y install hotplug
f. Copy all software for FlexMesh and install it
g. Exit
h. Use tar -cvf and bzip2 to compress the updated directory and
copy the new file alpine-BootstrapRPM.tar.bz2 to /planetlab/plc_www/boot
3. Based on the above basic system, install more packages on the
new node's hard disk.
4. The new node is further configured and gets ready to boot to
another kernel. At the end of the installation, the new node contacts
the PLC to update its status from 'installation' to the regular 'boot'
status, and uploads its log file to the PLC.
5. The new node is ready to switch the old kernel from the boot CD
to the new kernel on the hard disk by kexec. Many modules are shutdown
before kexec because they will be brought up when switching to the new
kernel.
6. We have enabled root login without password so that we can
directly login to the new node after booting to the new kernel.
7. During rebooting, the network connection to PLC is needed first
when PlantLabConf is called. It is also required by ntpd,
vserver-reference, and netflow. So we need to bring up the wireless
connection before that. The script wirelessdriver will be called to
bring up mesh networking. It is noted that the driver modules are loaded
twice before it works. The booting process of standard Fedora Core linux
is as follows.
a. The first process init is called after booting.
b. /etc/inittab stores the run level # and the first script to
call, which is usually /etc/rc.d/rc.sysinit
c. The processes/services in /etc/rc.d/rc#.d are executed. They are
usually soft links to files stored in /etc/rc.d/init.d. Each process is
named as: [S, K]OrderName. (S is start, K is shutdown). To configure
which process should be executed in which run level and in which order,
we use chkconfig --add <name>. For example, at the beginning of the
process file, it says '# chkconfig: 345 15 85' to specify that it should
be executed in run levels 345 and in order number 15 to start and in
order number 85 to stop.
d. At the end, /etc/rc.d/rc.local is executed, which may include
extra steps if necessary.
-----Original Message-----
From: Chan, Winson C
Sent: Thursday, November 02, 2006 10:49 AM
To: 'Marc E. Fiuczynski'
Cc: Vicente, John
Subject: RE: wireless planetlab
I'll give you a call at 11 AM PST. We've already got a prototype using
pl_box. We are migrating to myplc at the moment. Our intern was using
bootcd_v3 for our pl_box implementation. But when he left, he didn't
document all the steps for the bootcd_v3 usage. So, now moving to
myplc, I want to see if I can get some instructions on using bootcd_v3
for that.
Thanks.
Winson
More information about the Devel
mailing list