From owner-freebsd-questions@freebsd.org Sun May 29 14:35:46 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D6D7B51E41 for ; Sun, 29 May 2016 14:35:46 +0000 (UTC) (envelope-from lists@bertram-scharpf.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D11C18A6 for ; Sun, 29 May 2016 14:35:45 +0000 (UTC) (envelope-from lists@bertram-scharpf.de) Received: from becker.bs.l ([85.180.9.93]) by mrelayeu.kundenserver.de (mreue001) with ESMTPSA (Nemesis) id 0LiKeS-1beyaT23Ei-00ceIU for ; Sun, 29 May 2016 16:35:37 +0200 Received: from bsch by becker.bs.l with local (Exim 4.87 (FreeBSD)) (envelope-from ) id 1b71oW-000ERS-Vo for freebsd-questions@freebsd.org; Sun, 29 May 2016 16:35:36 +0200 Date: Sun, 29 May 2016 16:35:36 +0200 From: Bertram Scharpf To: freebsd-questions@freebsd.org Subject: Re: How to create a fork of freebsd Message-ID: <20160529143536.GA69838@becker.bs.l> Mail-Followup-To: freebsd-questions@freebsd.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) Sender: Bertram Scharpf X-Provags-ID: V03:K0:tPgCMiwXHWLsLOwCSiZlZcLogqlYMUVlk07iniesKd9diKDpJDf BGfEg4RjDAWXzwUDu6y4wJCY+ifBvMuAetM9jpZN3MEEfIvRF/R78FobnsXABvYAct9+8gr MJYnkGhAyOfFbpHdLnE3PUlDbYgp6OmeXMMTZHyLtVZHD6fjKSUGW8AUf77ZIC9KPAC/q8A OQMgVrfLfasjAD84iWhbw== X-UI-Out-Filterresults: notjunk:1;V01:K0:6sCL1ZKf/cw=:q1g+oWjE8dMqmXBTiNK6WJ MDTsFUdP9pC5lC6pL6OxOTLfv1SfST2DRw+pbnqPn7Mc2N74IqlRRESLas0enjuHQUPj/Sz+e wlRknQJVlIp5BF3xlm9DPGo4iLKdnfkw0/o1rarwe888TApjx7qMd/Ni4zPjePoWClUSqP1OZ Dq0kBoHZgzOF3UYWkUZnrUhJKylEwB7NgSGplWia4BzP0U6+/se6BbacOewKcinY1OmPceZZg bZ9oPSuP79AlRvHqa7BYrX1otll1aN+9HutEbEvVIZ4fJdBdXRXa51dtadMC1RKF0HhzPvxhc SJPM6fqyQvaZqJKh6lIxZb1HH+Ub4ulI9J1EXPv5/j/o/6DI7gTeKUJ5nz8QoyuHTjl2RtiQl 6dk+Ar3HIN+g6LojTXJIyYwyBcXl62nCzwfdhDPfGQRIYBo91+Qf7mwD0m2SsOqCHADKwb1uW UHUeQCwaHjJq7rW1FzOcekYCU72WTgOQ5mUm56o9y5olP0izT7rNe0nS0nIrPPkMkWW4Afoey PWrDRIOWeI4nviRk7Z0jv4XMibfaaEWG61moZrTCImeGAMVH/AZMX7hUge+sMW55gaopmlzEH rnjkCYppe+czuHsy17QYl43omC4/n+iiUEV5XIkkgxvWDteKtRdJ9dBR72ITWU2fdBz9H60RR pXu2GUf92LWeK503OeAzAm62GIeQM3xGtTsq37aaE83Xb9ELJDDAvXEJQlmBA+vazFYZLjX/7 HzuqH3VJ56gmlkYF X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 14:35:46 -0000 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