Date: Sun, 29 May 2016 16:35:36 +0200 From: Bertram Scharpf <lists@bertram-scharpf.de> To: freebsd-questions@freebsd.org Subject: Re: How to create a fork of freebsd Message-ID: <20160529143536.GA69838@becker.bs.l> In-Reply-To: <CAKxc9qGY537jEL7LdW%2B8596wTT8ubfN%2BsEvTPdkKWhhcQweLqA@mail.gmail.com> References: <CAKxc9qGY537jEL7LdW%2B8596wTT8ubfN%2BsEvTPdkKWhhcQweLqA@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
Hi,
On Sunday, 29. May 2016, 13:06:46 +0200, Mathe Eliel wrote:
> Now, I would like to create a sample OS based on freeBSD. I have a web
> application written in PHP and running on Apache Server in a FreeBSD
> computer. How can I make this kind of fork of FreeBSD thus I give a .iso
> file to my friends containing the webserver, the php application and other
> downloaded ports such as apinger, dhcpd? To allow them use my application
> without redownloading all those applications but they can install it in a
> computer and it starts working?
This is roughly what I do:
# dd if=/dev/zero of=myliveusb.img bs=2G count=2
# mdconfig -a -f myliveusb.img
# gpart add ... md0
# gpart bootcode ... md0
# gpart modify -i N -l myliveusb md0
# newfs -U /dev/gpt/myliveusb
# mount /dev/gpt/myliveusb /mnt/install
# cd /usr/src
# make DESTDIR=/mnt/install installworld installkernel distrib-dirs distribution
- Create an /etc/fstab that mounts / to /dev/gpt/myliveusb,
/tmp, /var/tmp, /var/run, /var/log to mfs.
- Create an elementary /etc/rc.conf:
ifconfig_DEFAULT="DHCP"
ntpdate_enable="YES"
- Copy /etc/localtime
- Chroot into it:
# cp /etc/resolv.conf /mnt/install/etc/
# chroot /mnt/install /bin/sh
# mount_devfs devfs /dev
- Install packages
- Leave the chroot, umount the partition and release the md.
dd the .img to a USB stick.
Good luck!
Bertram
--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160529143536.GA69838>
