Commit ea368ecf authored by Thomas Abraham's avatar Thomas Abraham Committed by Arvind Chauhan
Browse files

sgi/distro_boot: fix useability issues

Modifiy the distro-boot script to allow it to accept sata disk images which
are placed at any location in the host's filesystem. Also, as part of the
restructuring of the model scripts, modify the distro-boot script to adapt
it to the changes in the location of the script.

Change-Id: I8401a6e5a7a3bf1e24106fd4b88b490ddc2068c8
Signed-off-by: Thomas Abraham's avatarThomas Abraham <>
parent 620396b2
......@@ -22,7 +22,7 @@ __print_supported_sgi_platforms()
install ()
# Create a disk of $disk_size GB
dd if=/dev/zero of=$disk_name bs=1G count=$disk_size
......@@ -38,24 +38,32 @@ install ()
boot ()
# Check if a installed sata disk image is supplied. If yes, boot from it.
if [ ! -z "$disk_image" ] ; then
dir_name="$(dirname $disk_image)"
if [ $dir_name == "." ] ; then
echo "Proceeding to boot supplied disk image name: $disk_image ..."
pushd $platform_dir
./ -d $disk_image -n $network -a "$extra_param"
exit 0
# If $disk_image is not specified, see if there are more than one
# .satadisk files, if so, prompt the user to pick one with -d.
# If there is exactly one available, boot it. If there are none, prompt
# the user to install with -i/-s
available_images=$(find . -name "*.satadisk")
num_available_images=$(echo $available_images | wc -w)
case $num_available_images in
echo "No available images found to boot from, please install one, see distro_boot -h for help"
exit 1
# In the case of exactly one, the list of images will
# be the image name so just use it
echo "Found $available_images, proceeding to boot ..."
pushd $platform_dir
./ -d $available_images -n $network -a "$extra_param"
......@@ -67,10 +75,6 @@ boot ()
echo ""
echo "Please choose one using distro_boot -d [disk_image]"
echo ""
echo "Proceeding to boot supplied disk image name: $disk_image ..."
pushd $platform_dir
./ -d $disk_image -n $network -a "$extra_param"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment