Date: Fri, 6 Mar 2020 10:24:01 -0800 From: Mark Millard <marklmi@yahoo.com> To: bob prohaska <fbsd@www.zefox.net> Cc: freebsd-arm@freebsd.org Subject: Re: Adding a swap partition to the March 5 snapshot image Message-ID: <DD9BE4C3-3894-4FD4-8048-1A8BCE3196A9@yahoo.com> In-Reply-To: <20200306175810.GA21376@www.zefox.net> References: <20200306045443.GA19058@www.zefox.net> <58BB6CC3-34C7-413F-9ED4-D84E63FBCD2D@yahoo.com> <20200306175810.GA21376@www.zefox.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-Mar-6, at 09:58, bob prohaska <fbsd at www.zefox.net> wrote: > On Thu, Mar 05, 2020 at 09:26:42PM -0800, Mark Millard wrote: >>=20 >> On 2020-Mar-5, at 20:54, bob prohaska <fbsd at www.zefox.net> wrote: >>>=20 >>> I've been trying for a while to set up an armv7 RPI2 with a single >>> root partition plus a swap partition at the end of mmcsd0. Letting >>> firstboot invoke growfs seems not to help, since growfs leaves no >>> space for swap. >>>=20 >>> Attempts using gpart in single-user give the appearance of=20 >>> working, but on reboot the machine stops at the mountroot prompt. >>> This method worked well in July of 2018. Seemingly, no more.=20 >>>=20 >>> Has something changed?=20 >>>=20 >>> Mounting the armv7 card on a second Freebsd box and making the = changes=20 >>> appears to work also, but on the initial boot (firstboot disabled) = the=20 >>> machine stops at the mountroot prompt on initial boot. >>>=20 >>> If there's a better way to pursue the same end I'd be grateful for >>> a hint. Perhaps giving a swap size parameter to firstboot?=20 >>=20 >> You have not reported what shows if you enter a "?" command at the >> mountroot prompt. (As I remember that lists what mount root >> classifies as available.) >>=20 >> That might prove to be useful information. >>=20 >=20 > Indeed so. I've put a near transcript of a session at > http://www.zefox.net/~fbsd/rpi2/rpi2_swap_installation >=20 > The punchline seems to be that in the course of resizing > mmcsd0s2a and adding mmcsd0s2b the /dev/ufs/ device > went away. Manually entering ufs:/dev/mmcsd0s2a allows > a one-time mount and boot to multi-user. >=20 > I certainly didn't intentionally delete any files, the only > change (apart from the rather drastic measures taken with > gpart) was to rename /firstboot to /no.firstboot. >=20 > The only hint of possible mischief is: > # gpart resize -i 2 mmcsd0 > GEOM_PART: mmcsd0s2 was automatically resized. > Use `gpart commit mmcsd0s2` to save changes or `gpart undo mmcsd0s2` = to revert them. > mmcsd0s2 reized > ^^^^^^ > [Note the misspelled message. I do not recall the prompt to commit = from 2018] > [The gpart man page implies commit is automatic, except using special = options] >=20 >=20 > Hopefully sharper wits than mine trained on the transcript will find = the error. > Some of the comments in growfs imply it takes a size parameter. That = would help, > but I couldn't recognize how to do it.=20 The growfs description starts with: DESCRIPTION The growfs utility makes it possible to expand an UFS file system. Before running growfs the partition or slice containing the file = system must be extended using gpart(8). . . . It does not change the partition size and so is used after separately adjusting the partition size. (firstboot does more than just growfs.) After you get to either of: # gpart show mmcsd0s2 =3D> 0 124939305 mmcsd0s2 BSD (60G) 0 41 - free - (21K) 41 121634816 1 freebsd-ufs (58G) 121634857 3304448 - free - (1.6G) or: # gpart show mmcsd0s2 =3D> 0 124939305 mmcsd0s2 BSD (60G) 0 41 - free - (21K) 41 121634816 1 freebsd-ufs (58G) 121634857 27648 - free - (14M) 121662505 3276800 2 freebsd-swap (1.6G) you need to do the growfs for /dev/mmcsd0s2a . Note: Some of the information may be stored at the end of the partition, such as the information for /dev/ufs/NAME (labeling). Thus the lack of a growfs might explain the lack of the lack of the label: it has not been moved to the right place yet. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DD9BE4C3-3894-4FD4-8048-1A8BCE3196A9>