Delete all GPT partitions at once. (Suggested by Andrey V. Elsukov <bu7cher@yandex.ru>)

Fix amd64 merge script.
This commit is contained in:
mr 2011-03-21 13:23:25 +00:00
parent 46e21ba9ec
commit 56f05ef7d3
2 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -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}