From nobody Mon Nov 07 18:47:29 2022 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N5gFw6qJKz4hcth for ; Mon, 7 Nov 2022 18:47:32 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (mail.karels.net [216.160.39.52]) by mx1.freebsd.org (Postfix) with ESMTP id 4N5gFv5933z3NFN; Mon, 7 Nov 2022 18:47:31 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.16.1/8.16.1) with ESMTP id 2A7IlTX7091358; Mon, 7 Nov 2022 12:47:29 -0600 (CST) (envelope-from mike@karels.net) Received: from [10.0.2.130] ([10.0.1.1]) by mail.karels.net with ESMTPSA id urpIMMFSaWPcZAEA4+wvSQ (envelope-from ); Mon, 07 Nov 2022 12:47:29 -0600 From: Mike Karels To: bob prohaska Cc: freebsd-arm@freebsd.org, jmg@freebsd.org Subject: Re: adding swap when expanding root filesystem Date: Mon, 07 Nov 2022 12:47:29 -0600 X-Mailer: MailMate (1.14r5921) Message-ID: <78C2FBC4-D2CE-44B0-9535-02C0EDECD10A@karels.net> In-Reply-To: <20221107175206.GA49113@www.zefox.net> References: <202211071610.2A7GAcHl090048@mail.karels.net> <20221107175206.GA49113@www.zefox.net> List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mail.karels.net id 2A7IlTX7091358 X-Rspamd-Queue-Id: 4N5gFv5933z3NFN X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@karels.net designates 216.160.39.52 as permitted sender) smtp.mailfrom=mike@karels.net X-Spamd-Result: default: False [-3.15 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-0.95)[-0.955]; R_SPF_ALLOW(-0.20)[+ip4:216.160.39.52]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[karels.net]; FREEFALL_USER(0.00)[mike]; ARC_NA(0.00)[]; ASN(0.00)[asn:209, ipnet:216.160.36.0/22, country:US]; RCPT_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 7 Nov 2022, at 11:52, bob prohaska wrote: > On Mon, Nov 07, 2022 at 10:10:38AM -0600, Mike Karels wrote: >> This question is not really arm-specific, but I couldn't think of a be= tter >> mailing list for it. >> >> There are peridic issues reported on small systems like Raspberry Pi >> where people are running buildworld or poudriere and running out of >> memory. As the user gets no control over the disk layout when install= ing, >> there is no option to add swap space on the install image. I have add= ed >> swap space on a USB disk, but this is often not an option. It occurre= d >> to me that it might be reasonable to add swap space before expanding >> the root filesystem if there is sufficient space. I have a prototype, >> and wondered if this is a good thing to do. Granted, this will often >> create swap on microSD, which is not optimal, but probably better than >> nothing. >> >> The current prototype creates a swap partition which is 1/10 of the di= sk >> if the disk is at least 15 GB and the initial root partition is no mor= e >> than 1/3 of the disk, but only up to 1.5x of physical memory. I would >> probably enable this by default, but provide a way to disable it via a >> kenv variable and/or a variable in /etc/rc.conf. >> >> Thoughts? > > For starters, is there any hope of making bsdinstall run from the > microSD and installing FreeBSD via the traditional process on USB? > No need to limit to USB, but that's a useful option for RPi and one > option for many more devices. That treats microSD like a boot > floppy. I think that=E2=80=99s a completely different problem. I suspect that th= is is already possible, fetching packages over the net, but I don=E2=80=99t know the incantation. Ideally the packages would be local, but then the image would be more like a CD-ROM. It would be nice to have a procedure documented though. Mike > I haven't looked at bsdinstall in a very long time, so maybe the > traditional installation process isn't as I remember it. ISTR it > allowing selection of a boot device, a swap device and at least > one /usr device. Maybe I'm confusing it with Jordan Hubbard's > installer. > > Thanks for reading, and apologies if I'm hopelessly out of date. > > bob prohaska