Start 2 XS SATA
September 03, 2019
To install FreeBSD using the rescue system on a Start-2-XS-SATA
from online.net:
#!/bin/sh -x
USER=monkey
PASSWORD=secret
gpart destroy -F ada0
gpart create -s gpt ada0
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0
gpart add -t freebsd-boot -l boot -s 128K ada0
gpart add -t freebsd-swap -l swap -s 4g ada0
gpart add -t freebsd-ufs -l root ada0
gpart set -a active ada0
newfs /dev/gpt/root
mount /dev/gpt/root /mnt
cd /tmp
fetch http://ftp.fr.freebsd.org/pub/FreeBSD/releases/amd64/12.0-RELEASE/base.txz
fetch http://ftp.fr.freebsd.org/pub/FreeBSD/releases/amd64/12.0-RELEASE/kernel.txz
cd /mnt
tar xJf /tmp/base.txz
tar xJf /tmp/kernel.txz
rm /tmp/*.txz
cat << EOF > /mnt/etc/fstab
/dev/gpt/root / ufs rw,noatime 1 1
/dev/gpt/swap none swap sw 0 0
EOF
cat << EOF > /mnt/etc/rc.conf
ifconfig_igb0="DHCP"
sshd_enable="YES"
EOF
cat << EOF > /mnt/boot/loader.conf
boot_multicons="YES"
boot_serial="YES"
comconsole_speed="9600"
console="comconsole"
comconsole_port="0x2F8"
EOF
cat << EOF >> /mnt/etc/ttys
ttyu1 "/usr/libexec/getty std.9600" vt100 on secure
EOF
chroot /mnt pw useradd ${USER} -m -G wheel -s /bin/csh -h 0 <<EOP
${PASSWORD}
EOP
echo "terminated"