freebsd-questions Digest, Vol 809, Issue 1
Carl Johnson
carlj at peak.org
Mon Dec 9 17:02:41 UTC 2019
Scott Aitken <freebsd-lists-5 at thismonkey.com> writes:
> Unfortunately I'm using an SD image from the FreeBSD website which doesn't
> have a swap partition, and then chews up any free space with 'growfs' on
> first boot. (Something to remember for next time - add swap before growfs
> runs).
>
> So I don't have any swap. I had forgotten about that when I first posted.
> (I could plug in a USB stick for swap).
>
> Still if anyone has had success in cross-compiling in Go for arm I'd I'd love
> to know.
I had set up a swap partition after I used dd to put the image on the
card, and before I booted the image. You can use a USB device, or you
can just try a swapfile[1]. I just tested the following sequence:
#-------------- Start code snip
dd if=/dev/zero of=/var/swapfile bs=1m count=200
echo 'md none swap sw,late,file=/var/swapfile 0 0' >>/etc/fstab
swapon -aL
#-------------- End code snip
That will give you 200MB on a swapfile, which I think will be enough.
You can try more if you want, but a swap partition would probably be
better.
[1] - The handbook also shows how to create a swapfile at:
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/adding-swap-space.html
--
Carl Johnson carlj at peak.org
More information about the freebsd-questions
mailing list