Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jan 2023 12:48:20 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        Mike Karels <mike@karels.net>
Cc:        "karels@freebsd.org" <karels@FreeBSD.org>, dev-commits-src-main@freebsd.org
Subject:   Re: git: d670a8f7c596 - main - growfs_fstab: add new /etc/rc.d script to add swap to fstab
Message-ID:  <3445E24D-FA0B-4124-9900-0EEA66BCF7E6@yahoo.com>
In-Reply-To: <36A98BE4-83C7-4E23-A4B1-A761D5F22DD4@karels.net>
References:  <3F68EC4A-1D8A-409B-81D0-BECE377EFBE7.ref@yahoo.com> <3F68EC4A-1D8A-409B-81D0-BECE377EFBE7@yahoo.com> <36A98BE4-83C7-4E23-A4B1-A761D5F22DD4@karels.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Dec 26, 2022, at 06:57, Mike Karels <mike@karels.net> wrote:
>=20
> On 25 Dec 2022, at 16:41, Mark Millard wrote:
>=20
>> Mike Karels <karels_at_FreeBSD.org> wrote on
>> Date: Sat, 10 Dec 2022 19:41:14 UTC :
>>=20
>>> The branch main has been updated by karels:
>>>=20
>>> URL: =
https://cgit.FreeBSD.org/src/commit/?id=3Dd670a8f7c596fd387823644c5cbf1dde=
e788eee4
>>>=20
>>> commit d670a8f7c596fd387823644c5cbf1ddee788eee4
>>> Author: Mike Karels <karels@FreeBSD.org>
>>> AuthorDate: 2022-12-10 19:39:59 +0000
>>> Commit: Mike Karels <karels@FreeBSD.org>
>>> CommitDate: 2022-12-10 19:39:59 +0000
>>>=20
>>> growfs_fstab: add new /etc/rc.d script to add swap to fstab
>>>=20
>>> The growfs_fstab script is a helper for the growfs script to add any
>>> new swap partition to /etc/fstab on first boot. If growfs adds a
>>> swap partition, it sets growfs_swap_pdev in the kenv. In this case,
>>> after the root file system is read/write, if there is no swap =
partition
>>> in the fstab, growfs_fstab adds growfs_swap as a swap partition to =
the
>>> fstab. Also, it runs dumpon to add the swap partition (as this
>>> happened earlier in the startup sequence).
>>>=20
>>> Discussed with: cperciva
>>> Differential Revision: https://reviews.freebsd.org/D37463
>>> . . .
>>=20
>> I tried the new main [so: 14] snapshot, dd'd to a USB3 SSD and =
booted:
>>=20
>> snaphot: =
FreeBSD-14.0-CURRENT-arm64-aarch64-RPI-20221224-c89209c674f2-259842.img
>> so: FreeBSD 14.0-CURRENT #0 main-n259842-c89209c674f2: Sat Dec 24 =
05:52:28 UTC 2022
>>=20
>> Result (from the serial console capture):
>>=20
>> Starting file system checks:
>> /dev/ufs/rootfs: FILE SYSTEM CLEAN; SKIPPING CHECKS
>> /dev/ufs/rootfs: clean, 599506 free (242 frags, 74908 blocks, 0.0% =
fragmentation)
>> /etc/rc.d/growfs: 203: Syntax error: "(" unexpected (expecting "}")
>>=20
>>=20
>> Looks to be the ' in "Don't" in a supposed #comment that that instead =
matches a prior awk use of ' unintentionally. Later in the line is: =
"(decimal)" that supplies the "(" reported.
>=20
> I ran into this over the weekend too.  Fixed by 4c8a257810a6.
>=20

For the new snapshot of main

FreeBSD 14.0-CURRENT #0 main-n259905-231d75568f16: Sun Jan 1 11:28:27 =
UTC 2023 =
root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC

I ended up with:

# gpart show=20
=3D>      63  62333889  mmcsd0  MBR  (30G)
        63      1985          - free -  (993K)
      2048    102400       1  fat32lba  [active]  (50M)
    104448  62228480       2  freebsd  (30G)
  62332928      1024          - free -  (512K)

=3D>       0  62228480  mmcsd0s2  BSD  (30G)
         0       128            - free -  (64K)
       128  62228352         1  freebsd-ufs  (30G)

So no swap. Looks like it got "gpart: Invalid start param: Invalid =
argument" . . .

Starting file system checks:
/dev/ufs/rootfs: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/ufs/rootfs: clean, 599451 free (483 frags, 74871 blocks, 0.0% =
fragmentation)
Growing root partition to fill device
random: randomdev_wait_until_seeded unblock wait
random: unblocking device.
Adding swap partition
GEOM_PART: mmcsd0s2 was automatically resized.
  Use `gpart commit mmcsd0s2` to save changes or `gpart undo mmcsd0s2` =
to revert them.
mmcsd0s2 resized
gpart: Invalid start param: Invalid argument
mmcsd0s2a resized
super-block backups (for fsck_ffs -b #) at:
 11524224, 12804672, 14085120, 15365568, 16646016, 17926464, 19206912,
 20487360, 21767808, 23048256, 24328704, 25609152, 26889600, 28170048,
 29450496, 30730944, 32011392, 33291840, 34572288, 35852736, 37133184,
 38413632, 39694080, 40974528, 42254976, 43535424, 44815872, 46096320,
 47376768, 48657216, 49937664, 51218112, 52498560, 53779008, 55059456,
 56339904, 57620352, 58900800, 60181248, 61461696
Swap partition not found on mmcsd0s2
dumpon: /dev/label/growfs_swap: No such file or directory

=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3445E24D-FA0B-4124-9900-0EEA66BCF7E6>