|
@@ -33,10 +33,8 @@ echo partitioning ${DESTDISK}
|
|
|
echo =============
|
|
echo =============
|
|
|
|
|
|
|
|
gpart create -s gpt ${DESTDISK}
|
|
gpart create -s gpt ${DESTDISK}
|
|
|
-gpart add -a 4k -t efi -s 200M -l efiboot0 ${DESTDISK}
|
|
|
|
|
-gpart bootcode -p /boot/boot1.efifat -i 1 ${DESTDISK}
|
|
|
|
|
gpart add -a 4k -t freebsd-boot -s 512k -l gptboot0 ${DESTDISK}
|
|
gpart add -a 4k -t freebsd-boot -s 512k -l gptboot0 ${DESTDISK}
|
|
|
-gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 ${DESTDISK}
|
|
|
|
|
|
|
+gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${DESTDISK}
|
|
|
gpart add -a 1m -s 32G -t freebsd-swap -l swap0 ${DESTDISK}
|
|
gpart add -a 1m -s 32G -t freebsd-swap -l swap0 ${DESTDISK}
|
|
|
gpart add -a 1m -t freebsd-zfs -l zfs0 ${DESTDISK}
|
|
gpart add -a 1m -t freebsd-zfs -l zfs0 ${DESTDISK}
|
|
|
gpart set -a active ${DESTDISK}
|
|
gpart set -a active ${DESTDISK}
|
|
@@ -48,7 +46,7 @@ sysctl vfs.zfs.min_auto_ashift=12
|
|
|
echo set up zfs pool: ${ZPOOL} alt mount: ${DESTDIR}
|
|
echo set up zfs pool: ${ZPOOL} alt mount: ${DESTDIR}
|
|
|
echo =================
|
|
echo =================
|
|
|
|
|
|
|
|
-zpool create -m none -f -R ${DESTDIR} ${ZPOOL} ${DESTDISK}p4 ada1
|
|
|
|
|
|
|
+zpool create -m none -f -R ${DESTDIR} ${ZPOOL} ${DESTDISK}p3 ada1
|
|
|
if [ "${?}" -ne 0 ]; then
|
|
if [ "${?}" -ne 0 ]; then
|
|
|
echo "unable to create zpool"
|
|
echo "unable to create zpool"
|
|
|
exit 1
|
|
exit 1
|
|
@@ -130,27 +128,24 @@ dumpdev="AUTO"
|
|
|
zfs_enable="YES"
|
|
zfs_enable="YES"
|
|
|
EOF
|
|
EOF
|
|
|
|
|
|
|
|
-cd ${SCRIPTBASE}
|
|
|
|
|
-for I in resolv.conf rc.conf.local; do
|
|
|
|
|
- if [ -r "${I}" ]; then
|
|
|
|
|
- echo installing ${I}
|
|
|
|
|
- install -o root -g wheel -m 0644 ${I} ${DESTDIR}/etc/
|
|
|
|
|
- fi
|
|
|
|
|
-done
|
|
|
|
|
-
|
|
|
|
|
-for I in loader.conf.local; do
|
|
|
|
|
- if [ -r "${I}" ]; then
|
|
|
|
|
- echo installing ${I}
|
|
|
|
|
- install -o root -g wheel -m 0644 ${I} ${DESTDIR}/boot/
|
|
|
|
|
- fi
|
|
|
|
|
|
|
+COPYCAT="/etc"
|
|
|
|
|
+cd ${SCRIPTBASE}${COPYCAT} || exit 1
|
|
|
|
|
+echo installing files into ${COPYCAT}
|
|
|
|
|
+for I in *.conf*; do
|
|
|
|
|
+ if [ -r "${I}" -a -f ${I} ]; then
|
|
|
|
|
+ install -o root -g wheel -m 0644 ${I} ${DESTDIR}${COPYCAT}/
|
|
|
|
|
+ fi
|
|
|
done
|
|
done
|
|
|
-
|
|
|
|
|
-echo installing rc.conf.d
|
|
|
|
|
-install -o root -g wheel -d -m 0755 ${DESTDIR}/etc/rc.conf.d
|
|
|
|
|
-if [ -d "./rc.conf.d" ]; then
|
|
|
|
|
- echo installing files into rc.conf.d
|
|
|
|
|
- install -o root -g wheel -m 0644 ./rc.conf.d/* ${DESTDIR}/etc/rc.conf.d/
|
|
|
|
|
-fi
|
|
|
|
|
|
|
+COPYCAT="/etc/rc.conf.d"
|
|
|
|
|
+cd ${SCRIPTBASE}${COPYCAT} || exit 1
|
|
|
|
|
+install -o root -g wheel -d -m 0755 ${DESTDIR}${COPYCAT} || exit 1
|
|
|
|
|
+echo installing files into ${COPYCAT}
|
|
|
|
|
+install -o root -g wheel -m 0644 * ${DESTDIR}${COPYCAT}/
|
|
|
|
|
+COPYCAT="/etc/rc.conf.d/network"
|
|
|
|
|
+cd ${SCRIPTBASE}${COPYCAT} || exit 1
|
|
|
|
|
+install -o root -g wheel -d -m 0755 ${DESTDIR}${COPYCAT} || exit 1
|
|
|
|
|
+echo installing files into ${COPYCAT}
|
|
|
|
|
+install -o root -g wheel -m 0644 * ${DESTDIR}${COPYCAT}/
|
|
|
|
|
|
|
|
chroot ${DESTDIR} passwd
|
|
chroot ${DESTDIR} passwd
|
|
|
chroot ${DESTDIR} adduser
|
|
chroot ${DESTDIR} adduser
|