projects
/
zfsinstaller.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
566b564
)
do not try to create /mnt/boot directory twice
author
David Marec
<DavidMarec@users.noreply.github.com>
Sun, 21 Feb 2021 21:19:46 +0000
(22:19 +0100)
committer
David Marec
<DavidMarec@users.noreply.github.com>
Sun, 21 Feb 2021 21:19:46 +0000
(22:19 +0100)
zfsinstall.sh
patch
|
blob
|
history
diff --git
a/zfsinstall.sh
b/zfsinstall.sh
index 9a7cb09a02d2e0455749416b7dce7534c118024a..7d4b589e281b48e355421de88a178a708ffb50a9 100644
(file)
--- a/
zfsinstall.sh
+++ b/
zfsinstall.sh
@@
-15,10
+15,9
@@
if [ "${?}" -ne 1 ]; then
exit 1
fi
exit 1
fi
+mkdir -p /mnt/boot
# check if the disk is ok for writing
# check if the disk is ok for writing
-
-
sysctl kern.geom.part.mbr.enforce_chs=0
for D in ${DESTDISKS}; do
sysctl kern.geom.part.mbr.enforce_chs=0
for D in ${DESTDISKS}; do
@@
-42,7
+41,6
@@
for D in ${DESTDISKS}; do
N=$( echo ${D} | tr -c -d '0-9' )
gpart create -s gpt ${D}
gpart add -a 4k -t efi -s 200M -l efiboot${N} ${D}
N=$( echo ${D} | tr -c -d '0-9' )
gpart create -s gpt ${D}
gpart add -a 4k -t efi -s 200M -l efiboot${N} ${D}
- mkdir -p /mnt/boot
gpart add -a 4k -t freebsd-boot -s 512k -l gptboot${N} ${D}
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 ${D}
gpart add -a 1m -s 32G -t freebsd-swap -l swap${N} ${D}
gpart add -a 4k -t freebsd-boot -s 512k -l gptboot${N} ${D}
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 ${D}
gpart add -a 1m -s 32G -t freebsd-swap -l swap${N} ${D}
@@
-113,7
+111,7
@@
done
for D in ${DESTDISKS}; do
echo copying EFI partcode at ${D}
for D in ${DESTDISKS}; do
echo copying EFI partcode at ${D}
- mount -t msdos /dev/${D}s1 /mnt/boot && cp ${DDESTDIR}/boot/loader.efi /mnt/boot/BOOTX64.EFI
+ mount -t msdos
fs
/dev/${D}s1 /mnt/boot && cp ${DDESTDIR}/boot/loader.efi /mnt/boot/BOOTX64.EFI
umount /mnt/boot
done
umount /mnt/boot
done