depenguin-me / depenguin-run

Installer script for mfsBSD image to install FreeBSD 14.0 with zfs-on-root using qemu
MIT License
17 stars 7 forks source link

Test Report: Hetzner AX41 (2 x 2TB spindle disks) #32

Closed bretton closed 2 years ago

bretton commented 2 years ago

Successful installation as follows:

wget https://depenguin.me/run.sh && chmod +x run.sh && ./run.sh KEYURL

error popped up, can safely ignore

./run.sh: line 277: kvm-ok: command not found

continue till script says ssh available, and connect via ssh on port 1022, change to root with sudo su - and then run

zfsinstall -d ada0 -d ada1 -r mirror -s 4G -A -4 -c -p zroot

successful install ends with:

===============
Extracting FreeBSD distribution ... done
Writing /boot/loader.conf... done
Writing /etc/fstab...Writing /etc/rc.conf... done
Copying /boot/zfs/zpool.cache ... done

Installation complete.
The system will boot from ZFS with clean install on next reboot

You may make adjustments to the installed system using chroot:
chroot /mnt

Some adjustments may require a mounted devfs:
mount -t devfs devfs /mnt/dev

WARNING - Don't export ZFS pool "zroot"!
===============

However we have additional steps to do

cat /home/mfsbsd/.ssh/authorized_keys

*copy to clipboard*

root@mfsbsd:~ # chroot /mnt

pw groupadd <your user>
pw useradd -m -n <your user> -g <your user> -G wheel -h - -c "your name"

cd /home/<your user>

mkdir .ssh
cd .ssh
vi authorized_keys

*paste in keys copied to clipboard earlier*

chmod 600 authorized_keys
cd ..
chmod 700 .ssh

chown -R <your user>:<your user> .ssh

root@mfsbsd:/ # cat /etc/rc.conf
zfs_enable="YES"

vi /etc/rc.conf

hostname="yourhostname"
ifconfig_igb0_name="untrusted"
ifconfig_untrusted="up"
ifconfig_untrusted_ipv6="up"
ifconfig_untrusted_aliases="inet 1.2.3.4/32 inet6 1234::123:123:1234::2/64"
ipv6_activate_all_interfaces="YES"
static_routes="gateway default"
route_gateway="-host 6.7.8.9 -interface untrusted"
route_default="default 6.7.8.9"
ipv6_defaultrouter="fe80::1%untrusted"
sshd_enable="YES"
zfs_enable="YES"

*save and exit*

ctrl-d to exit chroot

back in rescue ssh session, control-c to exit, type reboot.

wait a while, connect ssh youruser@yourip

there is no sudo installed by default, but su - works without password if steps above followed.

proceed with freebsd-update fetch and freebsd-update install and other steps.

bretton commented 2 years ago

additonal error: no dns resolution on boot

grembo commented 2 years ago

additonal error: no dns resolution on boot

Without DHCP, resolv.conf won't be populated properly.

Easiest way would be to copy /etc/resolv.conf from the booted mfsbsd image into the system before rebooting.