- Use a
memstick.imgfile to write a FreeBSD installer to a memory stick - boot from the stick in single user mode
/bin/csh- use gpart(8) to resize things
growfs /mount -uw /- assuming vt(4)
setenv TERM xterm-clearbsdconfig vt_keymap- select, and continue with, a keymap that matches your keyboard layout
reboot -r- live system
- login as root, no password
mount -uw /bsdconfig networking- get an Internet connection – for example, enable DHCP for a network interface
- assuming root-on-ZFS
zpool import- note the name of the pool that you want to import – for example, damp
zpool import -R /tmp/altroot dampzpool get bootfs damp- note the value – for example, damp/ROOT/test
zfs mount damp/ROOT/testpkg bootstrap- add a minimal FreeBSD-base repository configuration to
/etc/pkg/FreeBSD.conf– urlhttps://pkg.freebsd.org/FreeBSD:14:amd64/base_release_3 pkg --rootdir /tmp/altroot install --repository FreeBSD-base FreeBSD-certctl FreeBSD-pkg-bootstrap FreeBSD-utilitieschroot /tmp/altrootcd /rootfetch https://tinyurl.com/pkgbasify-foundation -o ./pkgbasify.luachmod +x ./pkgbasify.luamkdir -p /var/db/etcupdate/current./pkgbasify.lua
Last active
October 5, 2025 10:55
-
-
Save grahamperrin/9570092c127bd43777961b6f016e75ba to your computer and use it in GitHub Desktop.
Using pkgbasify to repair a broken installation of FreeBSD 14.3-RELEASE
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Backlinks: