create_ramdisk.ksh revision 9632cfad671ee03057c5878b18702ea3b53be47d
f808c858fa61e7769218966759510a8b1190dfcfraf# CDDL HEADER START
f808c858fa61e7769218966759510a8b1190dfcfraf# The contents of this file are subject to the terms of the
f808c858fa61e7769218966759510a8b1190dfcfraf# Common Development and Distribution License (the "License").
f808c858fa61e7769218966759510a8b1190dfcfraf# You may not use this file except in compliance with the License.
f808c858fa61e7769218966759510a8b1190dfcfraf# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f808c858fa61e7769218966759510a8b1190dfcfraf# See the License for the specific language governing permissions
f808c858fa61e7769218966759510a8b1190dfcfraf# and limitations under the License.
f808c858fa61e7769218966759510a8b1190dfcfraf# When distributing Covered Code, include this CDDL HEADER in each
f808c858fa61e7769218966759510a8b1190dfcfraf# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f808c858fa61e7769218966759510a8b1190dfcfraf# If applicable, add the following below this CDDL HEADER, with the
f808c858fa61e7769218966759510a8b1190dfcfraf# fields enclosed by brackets "[]" replaced with your own identifying
f808c858fa61e7769218966759510a8b1190dfcfraf# information: Portions Copyright [yyyy] [name of copyright owner]
f808c858fa61e7769218966759510a8b1190dfcfraf# CDDL HEADER END
f808c858fa61e7769218966759510a8b1190dfcfraf# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
f808c858fa61e7769218966759510a8b1190dfcfraf# Use is subject to license terms.
f808c858fa61e7769218966759510a8b1190dfcfraf# ident "%Z%%M% %I% %E% SMI"
159d09a20817016f09b3ea28d1bdada4a336bb91Mark Phalan# Parse options
159d09a20817016f09b3ea28d1bdada4a336bb91Mark Phalan echo "Creating ram disk for $ALT_ROOT"
f808c858fa61e7769218966759510a8b1190dfcfrafif [ -x /usr/bin/mkisofs -o -x /tmp/bfubin/mkisofs ] ; then
f808c858fa61e7769218966759510a8b1190dfcfraf# mkisofs on s8 doesn't support functionality used by GRUB boot.
f808c858fa61e7769218966759510a8b1190dfcfraf# Use ufs format for boot archive instead.
f808c858fa61e7769218966759510a8b1190dfcfraf echo "Creating ram disk for $ALT_ROOT"
159d09a20817016f09b3ea28d1bdada4a336bb91Mark Phalan find $filelist -print $NO_AMD64 2> /dev/null | \
159d09a20817016f09b3ea28d1bdada4a336bb91Mark Phalan # Check if gzip exists in /usr/bin, so we only try to run gzip
159d09a20817016f09b3ea28d1bdada4a336bb91Mark Phalan # on systems that have gzip. Then run gzip out of the patch to
159d09a20817016f09b3ea28d1bdada4a336bb91Mark Phalan # pick it up from bfubin or something like that if needed.
f808c858fa61e7769218966759510a8b1190dfcfraf if [ -x /usr/bin/gzip ] ; then
f808c858fa61e7769218966759510a8b1190dfcfraf isocmd="mkisofs -quiet -graft-points -dlrDJN -relaxed-filenames $NO_AMD64"
f808c858fa61e7769218966759510a8b1190dfcfraf find $files 2> /dev/null | cpio -pdum "$rdmnt" 2> /dev/null
f808c858fa61e7769218966759510a8b1190dfcfraf # Check if gzip exists in /usr/bin, so we only try to run gzip
f808c858fa61e7769218966759510a8b1190dfcfraf # on systems that have gzip. Then run gzip out of the patch to
f808c858fa61e7769218966759510a8b1190dfcfraf # pick it up from bfubin or something like that if needed.
f808c858fa61e7769218966759510a8b1190dfcfraf if [ -x /usr/bin/gzip ] ; then
f808c858fa61e7769218966759510a8b1190dfcfraf ksh -c "$isocmd" 2> "$errlog" > "$ALT_ROOT/$BOOT_ARCHIVE-new"
56a424cca6b3f91f31bdab72a4626c48c779fe8bmp if [ $? -eq 0 ]; then
if [ -f "$ALT_ROOT/etc/boot/solaris/filelist.ramdisk" ]; then
is_amd64=$?
echo "updating $ALT_ROOT/$BOOT_ARCHIVE...this may take a minute"
echo "update of $ALT_ROOT/$BOOT_ARCHIVE failed"