From owner-freebsd-arm@freebsd.org Sat Jul 14 18:12:25 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 983FE1035B2B for ; Sat, 14 Jul 2018 18:12:25 +0000 (UTC) (envelope-from peo@nethead.se) Received: from ns1.nethead.se (ns1.nethead.se [5.150.237.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns1.nethead.se", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 325E4836E5; Sat, 14 Jul 2018 18:12:25 +0000 (UTC) (envelope-from peo@nethead.se) X-Virus-Scanned: amavisd-new at Nethead AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nethead.se; s=NETHEADSE; t=1531591943; bh=F/0L1Z7g2NyaIzcNijuIAxxthRWOgJRso4RBNPA39qo=; h=Subject:To:References:From:Date:In-Reply-To; b=tXbUVmGUVHKjFuR6PSeYKS6JRtMAyIJCk1RMP6QnxptRp0TFJ7cpNvLmY1qxQNd6N +JGJkNPKujCM9J/lSjsBB5ZXGUN/HeVeEZ/yyPMy4KvoLKnCX2hqr8ZlWS4+yvwJ7T 7BmN1j8ZhBeZUTc31FBLtKlG7PfcKTohjmYVGSnw= Subject: Re: add swap on a rpi3 To: Ian Lepore , freebsd-arm@freebsd.org References: <1531590103.21781.10.camel@freebsd.org> From: Per olof Ljungmark Message-ID: <8e8f3af9-6b82-2742-3003-47cfef4f5384@nethead.se> Date: Sat, 14 Jul 2018 20:12:21 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1531590103.21781.10.camel@freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2018 18:12:25 -0000 On 07/14/18 19:41, Ian Lepore wrote: > On Sat, 2018-07-14 at 19:28 +0200, Per olof Ljungmark wrote: >> 12.0-CURRENT #0 r336134 arm64 GENERIC on a rpi3 Cortex-A53 >> >> Can I add a swap "partition" somewhere below? I am booting from the >> SD >> card and run the system from an attached USB disk. >> >> As I understand it, I cannot create a freebsd-swap partition/slice >> with >> the BSD/MBR scheme, but is there another way to create a reasonably >> large swap (>1G) under ARM? >> >> =>      63  31116225  mmcsd0  MBR  (15G) >>         63      2016          - free -  (1.0M) >>       2079    102312       1  fat32lba  [active]  (50M) >>     104391  31008825       2  freebsd  (15G) >>   31113216      3072          - free -  (1.5M) >> >> =>       0  31008825  mmcsd0s2  BSD  (15G) >>          0        57            - free -  (29K) >>         57  31008768         1  freebsd-ufs  (15G) >> >> =>       63  125045361  da0  MBR  (60G) >>          63       2016       - free -  (1.0M) >>        2079     102312    1  fat32lba  [active]  (50M) >>      104391   83884089    2  freebsd  (40G) >>    83988480   41056944       - free -  (20G) >> >> =>       0  83884089  da0s2  BSD  (40G) >>          0        57         - free -  (29K) >>         57  83884032      1  freebsd-ufs  (40G) >> >> > > Looks like you've got some free space is on da0, so: > >  gpart add -t freebsd -s -i 3 da0 >  gpart create -s bsd da0s3 >  gpart add -t freebsd-swap -s -i 2 da0s3 > > Now you have a swap parition at da0s3b (-i 2/partition b is sort of > traditional for freebsd swap partitions, but there's no real need for > it to be so). > > You can make the size of da0s3 bigger than 1g, and then carve out just > 1g of it for swap, leaving space to add ufs partitions in that slice > later if you want. Thank you for the quick answer! I had missed "gpart create -s bsd" part. Just one more question, why "-i 2" here: gpart add -t freebsd-swap -s -i 2 da0s3 Could not as well be "-i 1" ?