I've put together the following script for installing FreeBSD 13.2-RELEASE from mfsBSD :-
Unfortunately, I can't get $PART to resolve... maybe a simple oversight on my part. Can any see my error?
The above is hard coded for da0. I wanted to get the 'set --' function to work but it wouldn't.
The code above is designed to work with the mfsBSD.iso residing on ada0p1 as an ext4 partition of a Ventoy installation.
I hope someone can figure out what is supposed to happen here...
Bash:
#!/bin/sh
cat <<EOF > FreeBSD-install.sh
mount -t ext2fs /dev/ada0p1 /mnt
tar xf /mnt/mfsbsd-se-13.2-RELEASE-amd64.iso -C /media
umount /mnt
gpart add -t freebsd-ufs -s 10G -l FreeBSD-test da0
#set -- $(gpart add -t freebsd-ufs -s 10G -l FreeBSD-test da0)
PART='da0s1'
echo $PART
newfs /dev/$PART
mount /dev/$PART /mnt
tar zxf /media/13.2-RELEASE-amd64/base.txz -C /mnt
tar zxf /media/13.2-RELEASE-amd64/kernel.txz -C /mnt
EOF
chmod +x FreeBSD-install.sh
scp -P 22 FreeBSD-install.sh root@192.168.1.4:/root/FreeBSD-install.sh
ssh 192.168.1.4 'sh -x ./FreeBSD-install.sh'
Unfortunately, I can't get $PART to resolve... maybe a simple oversight on my part. Can any see my error?
The above is hard coded for da0. I wanted to get the 'set --' function to work but it wouldn't.
The code above is designed to work with the mfsBSD.iso residing on ada0p1 as an ext4 partition of a Ventoy installation.
I hope someone can figure out what is supposed to happen here...