Ok, thanks.
Can you described process to add packages just after installing freenas source code in freebsd vm?
May be i CAN customize size of freenas and add java, tomcat packages in new freenas custom release ?
Thank you for you help
Here we go....
Lets install a media server. I like mediatomb because with few mods will serve movies, music and pictures to xbox, playstation and the very picky samsung tv.
Mediatomb has a lot of dependencies and use quite bit a of space, so I compiled Freenas for a 2Gb usb stick, otherwise it will not fit. If your packages are large use a larger stick accordingly.
Once you have freenas compiled and installed go to the Web GUI on the services page. Configure SSH to allow login from root with password and start the service.
Use an SSH client, I like putty which is of nimble size but powerful.
With putty SSH to your freenas box and login as root. The password is the GUI admin password.
Once you are logged in run
mount
The output is something like this:
Code:
/dev/ufs/FreeNASs1a on / (ufs, local, read-only, soft-updates)
devfs on /dev (devfs, local, multilabel)
/dev/md0 on /etc (ufs, local)
/dev/md1 on /mnt (ufs, local)
/dev/md2 on /var (ufs, local)
Note the partition that is mounted as
/ in this case
/dev/ufs/FreeNASs1a
This is one of the 2 large "code" partition nanobsd creates on the usb stick.
Now remount the partition read-write:
mount -o rw /dev/ufs/FreeNASs1a /
now you are ready to install packages
pkg_add -r mediatomb or whatever you need.
Tweak the configuration files now that the filesystem is RW and keep in mind that if your packages needs to write files i.e. mediatomb needs to update a sqlite database you have to instruct your package to store these files on a writable partition. The only writable disk based partition in Freenas are the actual volumes created in the GUI. they are mounted into
/mnt/yourvolumename, make a directory in one of your nas volumes and instruct your package to use that directory for its writable files.
You can remount the filesystem as ro with:
mount -o ro /dev/ufs/FreeNASs1a / or reboot. Upon rebooting the FS will be RO again.
Please note the package is installed in only one of the two partitions so if you swhitch to the other one your package will not be there.
Also your packages will be lost upon upgrading and will need to be installed again once you do that.
Hope it does help