-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jail2iso.conf added. jail2iso: playing with UEFI. initenv-tui: re-run…
… initenv after commit; jrctl.conf; jclone: fix for ip4_addr
- Loading branch information
olevole
committed
Aug 6, 2014
1 parent
ea80dff
commit abc08a1
Showing
19 changed files
with
693 additions
and
370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ from_jail=1 | |
|
||
default_jailname="freebsd" | ||
freesize="2g" | ||
|
||
ip4_addr="DHCP" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
PRODUCT="CBSD jail2iso" | ||
LABEL="CBSD" | ||
PUBLISHER="The CBSD Project. http://www.bsdstore.ru" | ||
|
||
# enable efi boot ? | ||
efi=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
alljails="0" | ||
shownode="0" | ||
|
||
# sample of display: | ||
#display="jname,memoryuse,swapuse,nice" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
rctl_profile="defaults" | ||
profile_description="No limits" | ||
stacksize="0" | ||
coredumpsize="0" | ||
memoryuse="0" | ||
memorylocked="0" | ||
maxproc="0" | ||
openfiles="0" | ||
vmemoryuse="0" | ||
pseudoterminals="0" | ||
swapuse="0" | ||
nthr="0" | ||
msgqqueued="0" | ||
msgqsize="0" | ||
nmsgq="0" | ||
nsem="0" | ||
nsemop="0" | ||
nshm="0" | ||
shmsize="0" | ||
wallclock="0" | ||
pcpu="0" | ||
fsquota="0" | ||
nice="0" | ||
bw="0" | ||
nice="0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
rctl_profile="litejail" | ||
profile_description="Limit jail by 512 physical mem, 128MB of swap, 100 descriptors" | ||
openfiles="100" | ||
vmemoryuse="512m" | ||
swapuse="128m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,61 @@ | ||
#!/bin/sh | ||
bootable="-o bootimage=i386;$4/boot/cdboot -o no-emul-boot" | ||
#bootable="" | ||
|
||
if [ $# -lt 3 ]; then | ||
echo "Usage: $0 image-label image-path-name path" | ||
exit 1 | ||
# -l "LABEL" | ||
# -n "NAME" | ||
# -d "DPATH" | ||
# -c "CHROOT" | ||
# -p "PUBLISHER" | ||
# -e "1|0" - enable EFI | ||
while getopts "l:n:d:c:p:e:" opt; do | ||
case "$opt" in | ||
l) LABEL="${OPTARG}" ;; | ||
n) NAME="${OPTARG}" ;; | ||
d) DPATH="${OPTARG}" ;; | ||
c) CHROOT="${OPTARG}" ;; | ||
p) PUBLISHER="${OPTARG}" ;; | ||
e) EFI="${OPTARG}" ;; | ||
esac | ||
shift $(($OPTIND - 1)) | ||
done | ||
|
||
make_efi() | ||
{ | ||
local _md _tmpmnt | ||
|
||
[ ! -f "${CHROOT}/boot/loader.efi" ] && return 0 | ||
/bin/dd if=/dev/zero of=/tmp/efiboot.$$.img bs=4k count=100 | ||
_md=$( /sbin/mdconfig -a -t vnode -f /tmp/efiboot.$$.img ) | ||
/sbin/newfs_msdos -F 12 -m 0xf8 /dev/${_md} | ||
_tmpmnt=$( mktemp -d ) | ||
/sbin/mount -t msdosfs /dev/${_md} ${_tmpmnt} | ||
/bin/mkdir -p ${_tmpmnt}/efi/boot | ||
/bin/cp ${CHROOT}/boot/loader.efi ${_tmpmnt}/efi/boot/bootx64.efi | ||
/sbin/umount ${_tmpmnt} | ||
/sbin/mdconfig -d -u ${_md} | ||
rmdir ${_tmpmnt} | ||
} | ||
|
||
[ -z "${LABEL}" ] && LABEL="NOLABEL" | ||
|
||
if [ -z "${NAME}" ]; then | ||
echo "Empty NAME, use -n " | ||
exit 1 | ||
fi | ||
|
||
LABEL=$1 | ||
NAME=$2 | ||
PATH=$3 | ||
PUBLISHER="The CBSD Project. http://www.bsdstore.ru" | ||
if [ -z "${DPATH}" ]; then | ||
echo "Empty DPATH, use -d " | ||
exit 1 | ||
fi | ||
|
||
[ -z "${PUBLISHER}" ] && PUBLISHER="The CBSD Project. http://www.bsdstore.ru" | ||
[ -z "${EFI}" ] && EFI=1 | ||
|
||
if [ ${EFI} -eq 1 ]; then | ||
make_efi | ||
bootable="-o bootimage=i386;/tmp/efiboot.$$.img -o no-emul-boot -o bootimage=i386;${CHROOT}/boot/cdboot -o no-emul-boot" | ||
else | ||
bootable="-o bootimage=i386;${CHROOT}/boot/cdboot -o no-emul-boot" | ||
fi | ||
|
||
/usr/sbin/makefs -t cd9660 $bootable -o rockridge -o label=$LABEL -o publisher="${PUBLISHER}" $NAME $PATH | ||
/usr/sbin/makefs -t cd9660 ${bootable} -o rockridge -o label=${LABEL} -o publisher="${PUBLISHER}" ${NAME} ${DPATH} | ||
[ ${EFI} -eq 1 ] && /bin/rm -f /tmp/efiboot.$$.img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.