1

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

What is the simplest way of running it?

  • 2
    It should run in any FreeBSD VM. What was your intention in compiling the application for FreeBSD? – AFH Jun 14 '18 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 Jun 14 '18 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 Jun 14 '18 at 12:21
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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.