diff options
author | mr <mr@FreeBSD.org> | 2011-03-21 13:23:25 +0000 |
---|---|---|
committer | mr <mr@FreeBSD.org> | 2011-03-21 13:23:25 +0000 |
commit | 56f05ef7d3398ca0093402076f6020f187834800 (patch) | |
tree | 4819a553c9089a178eb9045eff6ab425128ae47a /tools | |
parent | 46e21ba9ecab807bfc84138a5bb4a391aa237c6d (diff) | |
download | FreeBSD-src-56f05ef7d3398ca0093402076f6020f187834800.zip FreeBSD-src-56f05ef7d3398ca0093402076f6020f187834800.tar.gz |
Delete all GPT partitions at once. (Suggested by Andrey V. Elsukov <bu7cher@yandex.ru>)
Fix amd64 merge script.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/tools/nanobsd/rescue/Files/root/GPT4ZFS_Create.sh | 5 | ||||
-rwxr-xr-x | tools/tools/nanobsd/rescue/merge.sh | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/tools/tools/nanobsd/rescue/Files/root/GPT4ZFS_Create.sh b/tools/tools/nanobsd/rescue/Files/root/GPT4ZFS_Create.sh index f8a4ef7..e52c183 100755 --- a/tools/tools/nanobsd/rescue/Files/root/GPT4ZFS_Create.sh +++ b/tools/tools/nanobsd/rescue/Files/root/GPT4ZFS_Create.sh @@ -25,10 +25,7 @@ shift; while getopts :s:z: arg; do case ${arg} in #?) exerr ${usage};; esac; done; shift $(( ${OPTIND} - 1 )) -gpart delete -i 3 $dsk -gpart delete -i 2 $dsk -gpart delete -i 1 $dsk -gpart destroy $dsk +gpart destroy -F $dsk gpart create -s gpt $dsk # Boot diff --git a/tools/tools/nanobsd/rescue/merge.sh b/tools/tools/nanobsd/rescue/merge.sh index c4f7c79..6761c94 100755 --- a/tools/tools/nanobsd/rescue/merge.sh +++ b/tools/tools/nanobsd/rescue/merge.sh @@ -7,5 +7,12 @@ D2="/usr/obj/nanobsd.rescue_amd64" MD=`mdconfig -a -t vnode -f ${D1}/_.disk.full` dd if=${D2}/_.disk.image of=/dev/${MD}s2 bs=128k +tunefs -L rescues2a /dev/${MD}s2a +mount /dev/${MD}s2a ${D1}/_.mnt + +sed -i "" -e 's/rescues1/rescues2/' ${D1}/_.mnt/conf/base/etc/fstab +sed -i "" -e 's/rescues1/rescues2/' ${D1}/_.mnt/etc/fstab + +umount ${D1}/_.mnt mdconfig -d -u ${MD} |