From owner-freebsd-arm@freebsd.org Sat Jul 14 18:15:02 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 9A9031035D71 for ; Sat, 14 Jul 2018 18:15:00 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 196058390F for ; Sat, 14 Jul 2018 18:14:59 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: cca67f21-8791-11e8-8837-614b7c574d04 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id cca67f21-8791-11e8-8837-614b7c574d04; Sat, 14 Jul 2018 18:14:51 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6EIEoZD047586; Sat, 14 Jul 2018 12:14:50 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1531592090.21781.15.camel@freebsd.org> Subject: Re: add swap on a rpi3 From: Ian Lepore To: Per olof Ljungmark , freebsd-arm@freebsd.org Date: Sat, 14 Jul 2018 12:14:50 -0600 In-Reply-To: <8e8f3af9-6b82-2742-3003-47cfef4f5384@nethead.se> References: <1531590103.21781.10.camel@freebsd.org> <8e8f3af9-6b82-2742-3003-47cfef4f5384@nethead.se> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 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:15:03 -0000 On Sat, 2018-07-14 at 20:12 +0200, Per olof Ljungmark wrote: > 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" ? > It could be -i 1, then the swap partition would be da0s3a instead of s3b. There is no reason I know of other than freebsd tradition to make a swap partition be -i 2. -- Ian