FreeBSD Rescue-System

Last change on 2021-05-07 • Created on 2020-03-19

Introduction

This article explains the general usage of the Hetzner FreeBSD Rescue System.

What ist the FreeBSD Rescue System?

The FreeBSD Rescue System is based on a minimal FreeBSD distribution, which can be booted into from the network (PXE). This gives you the ability to repair your current FreeBSD system if you have made a configuration error, if you want to download or upload files, or if you want to install FreeBSD on your server. The installation and usage of FreeBSD requires a certain amount of FreeBSD knowledge and is recommended for advanced users only. Please note that Hetzner Online generally doesn't offer software support, so any problems arising from the use of FreeBSD are your own responsibility. Martin Matuska created the FreeBSD images using the image creation system mfsBSD.

How can I start the Rescue System?

To do this, log into your Robot account. Next, click on the correct server and select the Rescue tab. Choose the FreeBSD Rescue System from the dropdown menu, confirm and restart the server. (Normally you can restart it via SSH, but if there was an error, you can also do this via the Reset tab on Robot).

When you activated the FreeBSD Rescue System, you receive a password. You can now use this password to log in as user root via SSH.

How can I mount my filesystem?

UFS filesystem

Please use the command mount. For example:

mount -t ufs /dev/da1p1 /mnt

You can find more options and the exact syntax on this site.

ZFS filesystem

First, list the pools that can be imported by using the command:

zpool import

To mount the pool my_pool into /mnt, for example, use the following command:

zpool import -o altroot=/mnt my_pool

How can I reset or change my root password?

To reset the password of the root user, please mount the root partition (/) of your installed system under /mnt, as described in the previous section. Then you can change the current root into the mounted root partition of your installed system:

chroot /mnt

Now you can change the password of the root user with:

passwd

Finally, exit the chroot environment, un-mount the root partition, and reboot the server back to the installed system:

exit
umount /mnt
reboot
Table of Contents