From owner-freebsd-questions@freebsd.org Mon Sep 11 13:59:53 2017 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 5BE2CE0D2F6 for ; Mon, 11 Sep 2017 13:59:53 +0000 (UTC) (envelope-from tyler@tysdomain.com) Received: from mail-qt0-x231.google.com (mail-qt0-x231.google.com [IPv6:2607:f8b0:400d:c0d::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1956324B8 for ; Mon, 11 Sep 2017 13:59:52 +0000 (UTC) (envelope-from tyler@tysdomain.com) Received: by mail-qt0-x231.google.com with SMTP id i50so19195214qtf.0 for ; Mon, 11 Sep 2017 06:59:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tysdomain-com.20150623.gappssmtp.com; s=20150623; h=reply-to:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=MqUau+Tpc6gzKnNbS1Ad5K16vBgjzi3wddEfY92+xK0=; b=ZGj5BS/FJTy46xa1MLMi6dCYZagj5M4hTe5F8TjnXKMUnvuE3g4YVO3n1GG65s6DJm iLGuG7OysVXIXgcvd2R4MuRRbvyyyDXUrSwyLgb52Es95VHqKsHZbm7EYSXkBfI1dTC8 X5jxqwoHhmXun9pKRVoR9RJpsdtwjZsBMG53laiWaczQ94dOrmhH5MI5+VM2LFrzLzUj EhGz5eZyrqbw7yu31sgiwvpDsFCBS9Gm/ZJ/r360dUegP9tYg9O9sYFXBY7VTN1oyZPg nwtO/Orzg5uuTGrJiKYVMYqT8x6qAOZ+bkYwgkqcSzudelzux2bdnqg7kew1NSfopypK nbZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language; bh=MqUau+Tpc6gzKnNbS1Ad5K16vBgjzi3wddEfY92+xK0=; b=P8Ius5OTPMd4hJt4t7S7eR62Amoyiwq/lEXgzOcw43FVvOsaRzNcKTX2iuX5kt9nW2 NpXm6cQZJOKHEpyzKolEVus/kDzqnqJhBMpgE7Z7BMcMdeSvRF6ZQotYFBSmWR121rLT vjYMgpAQdVvLmF8zmD0StCjo/RV8P85tcdO9u2xP4nh7r02xGceMV3a7IINJRzA6J1r4 NBKVrqRRtrUDMcClISyaKU+CtwL6s/bdNII5o0MTUbW2/ZfOsrgRzLTtMCm5PKufv5/g 5r6rwv325xZx3hr7TJjT+dtnAwf+Pj4zU/kCRAUvHs2I+6Fj/CoS9HAfpGIN8VwFUnsz ArRw== X-Gm-Message-State: AHPjjUigJb+Bz3nD3h9zp5xAt1Emli5ONHj8WDlFKmk/3/iP5H2AD2db 5mrHA9a2Y97e8Rm6YY8tew== X-Google-Smtp-Source: AOwi7QAy28qpfePQdLmMxjcFXh1/DgzOEU+LAeGW1jAiG9Xrolaokaw7s5T2T1instjYxfPrO8Ub+A== X-Received: by 10.237.33.188 with SMTP id l57mr2258525qtc.270.1505138391433; Mon, 11 Sep 2017 06:59:51 -0700 (PDT) Received: from [192.168.88.101] (c-98-229-109-58.hsd1.ma.comcast.net. [98.229.109.58]) by smtp.gmail.com with ESMTPSA id v17sm6230516qtv.62.2017.09.11.06.59.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 06:59:50 -0700 (PDT) Reply-To: tyler@tysdomain.com Subject: Re: help with condensing bsd To: Anton Yuzhaninov , freebsd-questions@freebsd.org References: <8e90abb6-79b0-5f2a-8c1a-4126a663f0ee@citrin.ru> From: "Littlefield, Tyler" Message-ID: <27aa284a-2de7-ead6-ecb8-3ca73f133d66@tysdomain.com> Date: Mon, 11 Sep 2017 09:59:49 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <8e90abb6-79b0-5f2a-8c1a-4126a663f0ee@citrin.ru> Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2017 13:59:53 -0000 On 9/8/2017 3:03 PM, Anton Yuzhaninov wrote: > On 09/08/17 12:04, Littlefield, Tyler wrote: >> I wish to create a smaller BSD as I have a vps with a minimal amount of >> space. > 1. Reducing kernel size. > > create custom config - add to it all you need (drivers, geom/netgraph > modules e. t. c.) and add line > makeoptions NO_MODULES=yes > > only kernel will be build without modules. > Kernel can be compressed using gzip -9 > > 2. World. > > Simple way - just disable optional stuff via src.conf > Read man src.conf and add knobs like > WITHOUT_ACCT=yes > WITHOUT_ACPI=yes > WITHOUT_AMD=yes > e.t.c. > to you src.conf > > Not all can be switched off via src.conf, but if you not building image > for tiny embedded system a few extra Mb probably doesn't matter. > >> I know that I can buildworld and cut a lot of things out (does >> anyone have a good example from where to start)? >> My question is this: Once I buildworld and buildkernel, how do I package >> these up? I have a few systems that need this new buildworld and >> buildkernel, and i also want to replace the base iocage jail. > Different options are possible. > > I use this way: > > On build host I run script make-release.sh [1] > result of this script: files base.txz kernel.txz e. t. c. > > /usr/src/release/release.sh can be used instead, but for me it was more > easy to write own script than customize release.sh. > > To upgrade OS on VPS I use shell script [2] which fetches this files and > extracts them using tar. To upgrade files in /etc I currently use > etcupdate (because mergemaster needs /usr/src). > > If you already have OS installed in this VPS you can install you custom > build (and copy /etc/src.conf used for this build) and then run > make delete-old && make delete-old-libs > to delete switched off parts (but you will need /usr/src for this task). To bad there's not a way to do this without /usr/src. If you just extract this new system over your current system, how does that get rid of things you removed? For example I got rid of bluetooth and various other things that I don't want installed. Thanks,  Also you can save space by not keeping /usr/ports and installing binary packages. If custom options are need you will have to run own package repo using poudriere. 1. http://termbin.com/ad1c 2. http://termbin.com/rvd8 _______________________________________________ freebsd-questions@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- Take Care, Tyler Littlefield Tyler Littlefield Consulting: website development and business solutions. My personal site My Linkedin @Sorressean on Twitter