Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Nov 2022 09:52:06 -0800
From:      bob prohaska <fbsd@www.zefox.net>
To:        Mike Karels <mike@karels.net>
Cc:        freebsd-arm@freebsd.org, jmg@freebsd.org
Subject:   Re: adding swap when expanding root filesystem
Message-ID:  <20221107175206.GA49113@www.zefox.net>
In-Reply-To: <202211071610.2A7GAcHl090048@mail.karels.net>
References:  <202211071610.2A7GAcHl090048@mail.karels.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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 better
> 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 installing,
> there is no option to add swap space on the install image.  I have added
> swap space on a USB disk, but this is often not an option.  It occurred
> 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 disk
> if the disk is at least 15 GB and the initial root partition is no more
> 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 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20221107175206.GA49113>