Guide: How to Build FreeNAS (Part 2: Install and Build FreeNAS)

Status
Not open for further replies.

dziring

Dabbler
Joined
Aug 17, 2011
Messages
37
I'm guessing that it's not normal for my system to churn for nearly 24 hours straight on the "Compressing GUI upgrade image" stage?

**edit: Ok, it's only been 21 hours since the build started, and the GUI compression step started 3 hours into that. So really it's just been trying to compress the image for about 18 hours. Still, this is unusually long, right? **
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
Your build is too long unless you have a very very old system. Are you building the trunk? Drop me some specifics like what version number and what commands you are using to build with.
 

dziring

Dabbler
Joined
Aug 17, 2011
Messages
37
I followed the directions in steps 1 and 2 in the forum.
I'm building in a VMWare virtual machine with one of two 3 GHz CPU cores available, and 512MB of RAM.

The command I ran was:
sh build/do_build.sh

Last two lines in the output log that I see are:
03:45:19 ## Compressing GUI upgrade image
03:45:19 ### log: /usr/local/freenas/trunk/obj.amd64/_.gui_image
 

dziring

Dabbler
Joined
Aug 17, 2011
Messages
37
Well, whatever the problem, starting clean after bumping up to two cores and 1GB of memory on the VM seemed to fix the problem.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
How large is your virtual hard drive? I know with mine I can only hold two different builds so you need to keep them cleaned. The RAM can also be an issue so bumping that up to 1GB is a smart idea if you have it but in my experience RAM more than 1GB does not speed up the process. Also keep in mind that the trunk builds get buggy at times and just will not build due to some change they put in. It can be very frustrating at times.
 

dannyb78

Explorer
Joined
Aug 30, 2011
Messages
70
I have an issue with the new script.
I used several times the older version without problems, but now when I run "sh fbuild -sb" or -sbu the scripts ends with a error message and dont create the iso nor the xz files.
I increased my VM disk from 20 to 40GB, and reinstalled freebsd but I still get the same error

after the svn update and the ports tree checkout it starts the buildings and after buildinf proftpd say
do_build.sh: ERROR: Can't find image file (/usr/local/freenas/trunk/obj.amd64/FreeNAS-8.2.1-ALPHA-r9585-x64.Full_Install.xz) for r9585, punting 64-bit File Build Complete

this is the end of the proftpd adding log

src/fsio.o(.text+0x98): In function `sys_chroot':
: undefined reference to `__FreeBSD_libc_enter_restricted_mode'
libtool: link: rm -f ".libs/proftpdS.o"
gmake: *** [proftpd] Error 1
*** Error code 1

what's wrong? I followed this guide step by step as it worked several times :(
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
I'll give it a try r9585 and whatever the latest is but I suspect the build process is broken again. I use the script all the time. What is the date on the script (upper right hand corner)?

EDIT: Last question, do you get the error if you delete everything first and start from scratch? I will first try "sh fbuild.sh -delete" followed by "sh fbuild.sh -sbx" and see where that goes. I use the "x" because I have a local CVSUP server so it saves about 20 minutes downloading time. If that passes I'll just do the "sb" to see if there is a difference.

-Joe
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
The build is broken in the trunk and has nothing to do with the script. Mine failed at
Code:
00:37:03 ## [13/170] customize "add_port_ftp_proftpd"
00:37:03 ### log: /usr/local/freenas/trunk/obj.amd64/_.cust.add_port_ftp_proftpd


I submitted ticket #1204 to report the problem.

As for the script I wrote, if you think it might be in error you can always try the manual steps just to see if it works. And I'm glad you brought this to my attention as I'd rather test the script out and find out if there is a problem and fix it than letting it sit out there screwing up builds and disappointing people.

Question: What was the last build number that you created fine? I was going to try to locate the problem.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
@dannyb78

Make sure you read the ticket answer here https://support.freenas.org/ticket/1204#comment:4
It explains what is going on but it should be fixed for now. Don't expect it to remain this way, it will change again, these things happen frequently during these stages of development. All you can do is report them and they will get fixed typically quickly but always give it a few days.
 

dannyb78

Explorer
Joined
Aug 30, 2011
Messages
70
thanks! after I posted here I tried to manually build FN but I got the same error, it can build proftpd port.
I don't opened a ticket cause I was not sure if was my fault or build problem.
 

dannyb78

Explorer
Joined
Aug 30, 2011
Messages
70
compiling 9597.... proftpd has been added successfully, waiting for the end of the process. great work!
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
thanks! after I posted here I tried to manually build FN but I got the same error, it can build proftpd port.
I don't opened a ticket cause I was not sure if was my fault or build problem.
I generally just double check my build process before I submit a ticket and on the second go around I ensure I start from a clean slate and collect any data I want to include in the ticket that might be useful to the developers in case it fails. I'm glad you asked for confirmation but don't worry, if you submit an invalid ticket, the developers will be happy to let you know :)

-Cheers
 

dannyb78

Explorer
Joined
Aug 30, 2011
Messages
70
I'm a very big noob with BSD and development, that's why I'm annoying you all with so much questions ;)
now I should learn to use (and where to find) plugins for 8.2 ^^
I'm loving freenas, as much as I love learn new things about IT and I'm loving too my ESXi environnement :D
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
I'm a very big noob with BSD and development, that's why I'm annoying you all with so much questions ;)
now I should learn to use (and where to find) plugins for 8.2 ^^
I'm loving freenas, as much as I love learn new things about IT and I'm loving too my ESXi environnement :D
No worries, you are not bothering me and I'm new to Unix and it's variants, like BSD as well.
 

sebile

Dabbler
Joined
Feb 2, 2012
Messages
11
Hi :smile:

I'm currently trying to do my own custom build of FreeNAS but I can't find an answer to my question.

What I'm trying to do is build the 8.0.3-Release-Multimedia-p1, the only thing that I want to change is for the build to include a patched driver (if_re) in FreeBSD to get WOL to work on my chipset. (see also this thread: http://forums.freenas.org/showthread.php?5807-WOL-Realtek-8111E)

I followed part 1 of joeschmucks tutorial and right now i don't know how to go on in part 2.

Which steps must i follow to get the patched driver. I already searched here and on the net but I haven't found an answer to my problem.

Thanks for your help,


sebile
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
I can't help you with the patch as I have never played with patches before but if you can figure that out, I can get you the rest of the way.

1) Download my script file.
2) Follow the instructions all the way up to "Building your FreeNAS" step 2, stop there and jump to the script section.
3) Move a copy of the script as indicated, I use Filezilla.
4) In Putty run the script 'sh fbuild.sh -brs 8.0.3' and the source code will download.
5) Setting up MULTIMEDIA is done by changing MULTIMEDIA from 0 to 1 in the /trunk/nanobsd/freenas-common.
6) Add your patch (don't know how that is done)
7) In Putty run the script 'sh fbuild.sh -b' and after a few hours (or more depending on your system) you will have the output images.

If you need help with patches, open a new thread asking for help.

Hope that helps.
 

sebile

Dabbler
Joined
Feb 2, 2012
Messages
11
It did help, thank you.

I've managed to build the 8.0.3-Release successfully one time but one patch still needs to be applied.

Right now I have all the freebsd sources. The network driver I'm working on is already patched (in trunk/freebsd/src/sys/dev/..) by the patch file (trunk/patches/freebsd-*.patch).

In the source directory are two files; the patched if_re.c and if_re.orig. Now I manually edited if_re.c to add the additional patch from the FreeBSD developers.

Is it possible to rebuild only the kernel (using the manually changed sources from trunk/freebsd/src) since I already built everything one time?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
Well you might as well get started using 8.0.4 as those files are available now, still in testing, unfortunately I'm on work travel so I can't test until next week. Others are testing as well but once you get 8.0.3 patch working, give it a shot on 8.0.4.

Glad to hear you got it working.
 
Status
Not open for further replies.
Top