1

I have an executable cross-compiled for FreeBSD in a docker container.

What is the simplest way of running it?

3
  • 2
    It should run in any FreeBSD VM. What was your intention in compiling the application for FreeBSD?
    – AFH
    Commented Jun 14, 2018 at 12:13
  • I am developing a Rust sysinfo implementation for FreeBSD. Is it possible to put my app inside a FreeBSD *.iso so I may run it directly from the installation media?
    – hedgar2017
    Commented Jun 14, 2018 at 12:17
  • 1
    I don't know if the installation disc gives an environment where applications can be run manually. If not, you'll need to complete the installation to create a working VM.
    – AFH
    Commented Jun 14, 2018 at 12:21

1 Answer 1

2

Most modern FreeBSD installation ISOs do indeed permit live use of FreeBSD's CLI. Copying the executable into a custom-burned ISO may not be the easiest route, though. Slightly easier, assuming you have both a burned ISO and a spare thumb drive, is to put the executable on the thumb drive, boot the ISO, mount the thumbdrive, and run the executable from the thumbdrive.

Actually, if you have a spare thumbdrive, then it's probably just as easy and somewhat faster to skip the optical media. Download a "memstick" installation image and dd the image to the thumbdrive as directed in section 2.3.1.1 of the handbook:

https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/bsdinstall-pre.html

After you've dd'ed the image onto the thumbdrive, mount the thumbdrive and copy your executable into /mnt/root or someplace of your own choosing. Now boot the thumbdrive, and you can run your executable from the directory you placed it into.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .