OPNsense Forum

English Forums => Development and Code Review => Topic started by: apurvasukant on July 20, 2016, 07:58:12 am

Title: [SOLVED] Fatal Error in building from source from on fresh FreeBSD
Post by: apurvasukant on July 20, 2016, 07:58:12 am
Hi,

I am working on a fresh install of stock FreeBSD 10 in AWS.

I downloaded src from https://github.com/opnsense/src using wget.
I chmoded the files with +x

As root, I tried
Code: [Select]
root@ip: sh opnsense-bootstrap.sh
5: Syntax error: newline unexpected (expecting word)

I am new to opnsense and FreeBSD, though I have 5+ years of experience with Fedora and Ubuntu.

Please help, my intention is to start a FreeBSD based OPNsense installation in AWS.
Title: Re: Fatal Error in building from source from on fresh FreeBSD
Post by: franco on July 21, 2016, 09:58:45 am
Hi apurvasukant,

I'm not completely sure what you're trying to do. "src.git" isn't the first step in building, opnsense-bootstrap has nothing to do with building. :)

The actual build instructions are here: https://github.com/opnsense/tools#setting-up-a-build-system

Unless you don't want to build a system, but rather change a FreeBSD installation to OPNsense. A case study was done here:

https://forum.opnsense.org/index.php?topic=3116

It would help if you could clarify your mission.


Cheers,
Franco
Title: Re: Fatal Error in building from source from on fresh FreeBSD
Post by: apurvasukant on July 22, 2016, 08:10:17 am
Hi Franco!

I am trying to start a virtual machine in the Amazon Web Services cloud. I want to run OPNsense on the VM.

Reading through the OPNsense manual, I gathered that I would have to start with a stock FreeBSD installation in the virtual machine, and then use the opnsense-bootstrap.sh file to load OPNsense on top of the OS.

However, after downloading the three files in the URL- https://github.com/opnsense/update/tree/master/bootstrap and running sh, I get this
Code: [Select]
sh opnsense-bootstrap.sh
opnsense-bootstrap.sh: 5: Syntax error: newline unexpected (expecting word)

What command should I be running?

I have a OPNsense router configured and running at home. As I installed through a bootable USB, I didn't have to go through this process. Thank you for finding time to reply, your help is much appreciated :)
Title: Re: Fatal Error in building from source from on fresh FreeBSD
Post by: apurvasukant on July 24, 2016, 08:37:15 am
I essentially want to perform this on my AWS VM.
https://docs.opnsense.org/manual/virtuals.html#hosted

I don't understand the steps required. Hope this illustrates the case better.

Cheers!
Title: Re: Fatal Error in building from source from on fresh FreeBSD
Post by: franco on July 24, 2016, 01:15:27 pm
Sorry, too many loose ends to wrap up 16.7, I forgot to answer properly.

The steps require a ready AWS image which is only available through Deciso's support subscription for OPNsense.

Now, however, you can set up an OPNsense 16.1 on a running FreeBSD 10.2 using the following:

# fetch https://raw.githubusercontent.com/opnsense/update/master/bootstrap/opnsense-bootstrap.sh
# sh ./opnsense-bootstrap.sh

There are two caveats:

(a) Since we're about to release 16.7, the above stopped working until Thursday. I'm sorry for this, but this has to do with mirror maintenance leading up to the next release, but it will work again on Friday.

(b) Since AWS is *very* special, the image may not boot back up or will be misconfigured after bootstrapping. It'll be your adventure to get the settings right in order to setup an AWS instance properly. This is also subject to change from AWS itself as they like to change things around.

And in general: bootstrapping an image has nothing to do with building as we're taking a ready system and then simply installing OPNsense on top, loading all missing pieces into a FreeBSD derivate.


Cheers,
Franco
Title: Re: [SOLVED] Fatal Error in building from source from on fresh FreeBSD
Post by: apurvasukant on July 24, 2016, 04:21:34 pm
Thank you from the bottom of my heart!  :D
I got the bootstrapper to start!