Only single slices or partial disks are allowed.
If you specify a non-zero starting load partition, the
load length must be one. If you specify zero
for the starting load partition, then you can include any or
all of the slices (1-4). Note that '0' means to start at the
boot sector, while '1' means to start at the beginning of the
first partition (typically starting at sector 63).

The OS (partition) that is active when the node boots up.

The image file must reside in the project directory.

Specify the node types that this image will be able
to work on (ie: can be loaded on and expected to work).
Typically, images will work on all of the \"pc\" types when
you are customizing one of the default images. However,
if you are installing your own OS from scratch, or you are
using DOS partition four, then this might not be true.
Feel free to ask us!

If you already have a node customized, enter that node
name (pcXXX) and the image will be auto created for you.
Notification of completion will be sent to you via email.

There are other image descriptors that specify the
same OS descriptors for the same node types.
There must be a
unique mapping of OS descriptor to Image descriptor for
each node type! Perhaps you need to delete one of the
images below, or create a new OS descriptor to use in
this new Image descriptor.

\n";
USERERROR("Please check the other Image descriptors and make the ".
"necessary changes!", 1);
}
}
# Send to the backend for more checking, and eventually, to update the DB.
$imagename = $args["imagename"];
if (! ($image = Image::NewImageId(0, $imagename, $args, $this_user, $group,
$node_id, $errors))) {
# Always respit the form so that the form fields are not lost.
# I just hate it when that happens so lets not be guilty of it ourselves.
SPITFORM($formfields, $errors);
PAGEFOOTER();
return;
}
SUBPAGESTART();
SUBMENUSTART("More Options");
if (! isset($node_id)) {
$imageid = $image->imageid();
$fooid = rawurlencode($imageid);
WRITESUBMENUBUTTON("Edit this Image Descriptor",
"editimageid.php3?imageid=$fooid");
WRITESUBMENUBUTTON("Delete this Image Descriptor",
"deleteimageid.php3?imageid=$fooid");
}
WRITESUBMENUBUTTON("Create a new Image Descriptor",
"newimageid_ez.php3");
WRITESUBMENUBUTTON("Create a new OS Descriptor",
"newosid.php3");
WRITESUBMENUBUTTON("Image Descriptor list",
"showimageid_list.php3");
if ($isadmin) {
WRITESUBMENUBUTTON("OS Descriptor list",
"showosid_list.php3");
}
SUBMENUEND();
#
# Dump os_info record.
#
$image->Show();
SUBPAGEEND();
if (isset($node_id)) {
#
# Create the image.
#
# XXX There is no locking of the descriptor or the node. Not really a
# problem for the descriptor; the script is done with it by the time
# it returns. However, if the node is freed up, things are going to go
# awry.
#
$node = Node::Lookup($node_id); # Already been checked.
$node_id = $node->node_id(); # XXX Why?
#
# Grab the unix GID for running script.
#
$unix_gid = $group->unix_gid();
$unix_pid = $project->unix_gid();
$safe_name = escapeshellarg($imagename);
echo "
Creating image using node '$node_id'.

\n";
flush();
SUEXEC($uid, "$unix_pid,$unix_gid",
"webcreate_image -p $pid $safe_name $node_id",
SUEXEC_ACTION_DUPDIE);
echo "This will take 10 minutes or more; you will receive email
notification when the image is complete. In the meantime,
PLEASE DO NOT delete the imageid or the experiment
$node_id is in. In fact, it is best if you do not mess with
the node or the experiment at all until you receive email.\n";
}
#
# Standard Testbed Footer
#
PAGEFOOTER();
?>