Date: Mon, 3 Dec 2001 19:57:56 -0500 From: Alan Eldridge <alane@geeksrus.net> To: FreeBSD Questions List <freebsd-questions@freebsd.org> Cc: Pete Fritchman <petef@databits.net> Subject: Making a bootable install CD Message-ID: <20011203195756.A19472@wwweasel.geeksrus.net>
next in thread | raw e-mail | index | archive | help
This script will create a bootable installation CD from a downloaded
FreeBSD install directory tree.
---8<-snip---8<-snip---8<-snip---8<-snip---8<-snip---8<-snip---8<---
#!/bin/sh
#
# mkfbsdcd
#
# Copyright (c) 2001, Alan Eldridge.
# All rights reserved.
# 
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# 
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# 2001/12/03 alane@geeksrus.net
#
app=${0##*/}
label='fbsd_miniinst'
bootopts='-b floppies/boot.flp -c floppies.boot.catalog'
usage()
{ 
    cat <<EOF
usage: $app BSD-dir [ISO-name]
Makes a bootable FreeBSD installation CD from an installation tree.
BSD-dir is the path to a directory tree suitable for placing on a CD.
You can get such a directory tree by ftp from stable.freebsd.org, in
the directory /pub/FreeBSD/snapshots/i386/.
ISO-name is the filename for the bootable ISO image. If ISO-name is not
given on the command line, then the ISO image is written to standard
output, so that it can be piped to another program, such as cdrecord, to
directory write a CDRW disc.
This program requires that you have the "mkisofs" program, which is
installed by the "mkisofs" port.
EOF
    exit $1
}
test $# -lt 1 && usage 1
test "$1" = "-h" && usage 0
test "$1" = "--help" && usage 0
test -d "$1" || { echo $app fatal: \'"$1"\' is not a directory; exit 1; }
bsddir="$1"; shift
isoname="$1"; shift
test -n "$isoname" && isoname="-o $isoname"
mkisofs $bootopts -r -J -h -V "$label" $isoname "$bsddir"
#
#EOF
---8<-snip---8<-snip---8<-snip---8<-snip---8<-snip---8<-snip---8<---
-- 
Alan Eldridge
#include <cstdlib>
free(sklyarov);
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011203195756.A19472>
