[Midnightbsd-cvs] src [11831] trunk/release/i386/make-memstick.sh: done with image now
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Jul 12 20:16:44 EDT 2018
Revision: 11831
http://svnweb.midnightbsd.org/src/?rev=11831
Author: laffer1
Date: 2018-07-12 20:16:44 -0400 (Thu, 12 Jul 2018)
Log Message:
-----------
done with image now
Modified Paths:
--------------
trunk/release/i386/make-memstick.sh
Property Changed:
----------------
trunk/release/i386/make-memstick.sh
Modified: trunk/release/i386/make-memstick.sh
===================================================================
--- trunk/release/i386/make-memstick.sh 2018-07-13 00:15:21 UTC (rev 11830)
+++ trunk/release/i386/make-memstick.sh 2018-07-13 00:16:44 UTC (rev 11831)
@@ -7,8 +7,7 @@
#
# Usage: make-memstick.sh <directory tree> <image filename>
#
-# $MidnightBSD: src/release/i386/make-memstick.sh,v 1.1 2011/12/02 13:15:03 laffer1 Exp $
-# $FreeBSD: src/release/i386/make-memstick.sh,v 1.4 2011/10/09 16:23:04 nwhitehorn Exp $
+# $MidnightBSD$
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin
@@ -15,35 +14,30 @@
export PATH
if [ $# -ne 2 ]; then
- echo "make-memstick.sh /path/to/directory /path/to/image/file"
- exit 1
+ echo "make-memstick.sh /path/to/directory /path/to/image/file"
+ exit 1
fi
if [ ! -d ${1} ]; then
- echo "${1} must be a directory"
- exit 1
+ echo "${1} must be a directory"
+ exit 1
fi
if [ -e ${2} ]; then
- echo "won't overwrite ${2}"
- exit 1
+ echo "won't overwrite ${2}"
+ exit 1
fi
echo '/dev/ufs/MidnightBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab
-makefs -B little -o label=MidnightBSD_Install ${2} ${1}
+echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local
+makefs -B little -o label=MidnightBSD_Install ${2}.part ${1}
if [ $? -ne 0 ]; then
- echo "makefs failed"
- exit 1
+ echo "makefs failed"
+ exit 1
fi
rm ${1}/etc/fstab
+rm ${1}/etc/rc.conf.local
-unit=`mdconfig -a -t vnode -f ${2}`
-if [ $? -ne 0 ]; then
- echo "mdconfig failed"
- exit 1
-fi
-gpart create -s BSD ${unit}
-gpart bootcode -b ${1}/boot/boot ${unit}
-gpart add -t mnbsd-ufs ${unit}
-mdconfig -d -u ${unit}
+mkimg -s gpt -b ${1}/boot/pmbr -p mnbsd-boot:=${1}/boot/gptboot -p mnbsd-ufs:=${2}.part -p mnbsd-swap::1M -o ${2}
+rm ${2}.part
Property changes on: trunk/release/i386/make-memstick.sh
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
More information about the Midnightbsd-cvs
mailing list