Multiboot OpenBSD and FreeBSD and restore *BSD boot loader

I ran into a situation where I installed OpenBSD while having FreeBSD installed. OpenBSD overwrite MBR. The fix was simple:

Boot from FreeBSD USB/CD, then run boot0cfg to install FreeBSD boot loader on MBR

boot0cfg -B ada0

This will restore FreeBSD boot loader and will add OpenBSD to boot loader options, where you choose “F1 “to boot FreeBSD, and “F2” to boot OpenBSD. ada0 is the first hard disk, change the disk number accordingly.

This command can be used also to restore FreeBSD/OpenBSD to MBR incase you only FreeBSD/OpenBSD and another system overwrite MBR (Like Linux)

Add a Comment

Your email address will not be published. Required fields are marked *