Deleted Added
full compact
make-memstick.sh (293188) make-memstick.sh (302387)
1#!/bin/sh
2#
3# This script generates a "memstick image" (image that can be copied to a
4# USB memory stick) from a directory tree. Note that the script does not
5# clean up after itself very well for error conditions on purpose so the
6# problem can be diagnosed (full filesystem most likely but ...).
7#
8# Usage: make-memstick.sh <directory tree> <image filename>
9#
1#!/bin/sh
2#
3# This script generates a "memstick image" (image that can be copied to a
4# USB memory stick) from a directory tree. Note that the script does not
5# clean up after itself very well for error conditions on purpose so the
6# problem can be diagnosed (full filesystem most likely but ...).
7#
8# Usage: make-memstick.sh <directory tree> <image filename>
9#
10# $FreeBSD: head/release/arm64/make-memstick.sh 293188 2016-01-05 03:20:45Z gjb $
10# $FreeBSD: head/release/arm64/make-memstick.sh 302387 2016-07-07 05:47:42Z wma $
11#
12
13PATH=/bin:/usr/bin:/sbin:/usr/sbin
14export PATH
15
16if [ $# -ne 2 ]; then
17 echo "make-memstick.sh /path/to/directory /path/to/image/file"
18 exit 1

--- 14 unchanged lines hidden (view full) ---

33makefs -B little -o label=FreeBSD_Install ${2}.part ${1}
34if [ $? -ne 0 ]; then
35 echo "makefs failed"
36 exit 1
37fi
38rm ${1}/etc/fstab
39rm ${1}/etc/rc.conf.local
40
11#
12
13PATH=/bin:/usr/bin:/sbin:/usr/sbin
14export PATH
15
16if [ $# -ne 2 ]; then
17 echo "make-memstick.sh /path/to/directory /path/to/image/file"
18 exit 1

--- 14 unchanged lines hidden (view full) ---

33makefs -B little -o label=FreeBSD_Install ${2}.part ${1}
34if [ $? -ne 0 ]; then
35 echo "makefs failed"
36 exit 1
37fi
38rm ${1}/etc/fstab
39rm ${1}/etc/rc.conf.local
40
41mkimg -s mbr -p efi:=${1}/boot/boot1.efifat -p freebsd:=${2}.part -o ${2}
41mkimg -s gpt -p efi:=${1}/boot/boot1.efifat -p freebsd:=${2}.part -o ${2}
42rm ${2}.part
43
42rm ${2}.part
43