Page MenuHomeFreeBSD

growfs_fstab startup script: set dumpdev to AUTO
ClosedPublic

Authored by karels on Feb 23 2023, 10:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 3 2024, 4:33 AM
Unknown Object (File)
Oct 2 2024, 8:57 PM
Unknown Object (File)
Oct 2 2024, 8:46 AM
Unknown Object (File)
Sep 30 2024, 7:17 PM
Unknown Object (File)
Sep 30 2024, 10:02 AM
Unknown Object (File)
Sep 30 2024, 4:37 AM
Unknown Object (File)
Sep 27 2024, 6:51 PM
Unknown Object (File)
Sep 27 2024, 12:57 PM

Details

Summary

The growfs_fstab script has been testing dumpdev, and if it is AUTO,
enables dumps on the newly-added swap device for the initial boot.
However, dumpdev defaults to AUTO on main, but NO on stable/13 and
release branches. On the other hand, bsdinstall adds dumpdev="AUTO"
by default (controlled by a menu item). bsdinstall is not used when
booting an SD card or other disk image. Adopt the default from
bsdinstall, and set dumpdev to AUTO in /etc/rc.conf in the
growfs_fstab script if a swap partition has been added, along with
the explanatory comment added by bsdinstall.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

karels created this revision.

@cperciva, I am hoping that this causes no new complication for EC2. I presume you need to disable this script on EC2. You can do it by unsetting the kenv variable. Note that the growfs swap addition is in 13.2.

jlduran added inline comments.
libexec/rc/rc.d/growfs_fstab
55

As noted in D37463. This is likely better handled by sysrc(8).

libexec/rc/rc.d/growfs_fstab
55

I don't think sysrc will do comments. I want to make this look like the similar items created by bsdinstall.

libexec/rc/rc.d/growfs_fstab
55

Right, I see now the end goal. Thank you!

@imp or @cperciva, any thoughts on this? Ideally it would make it into 13.2 (and I have tested it there), but the schedule is very tight now.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 28 2023, 1:57 PM
This revision was automatically updated to reflect the committed changes.

FYI:

Note: The following was done with a 4 GiByte RPI4B in order to avoid having a 8 GiByte RPi4B used with the U-Boot 2023.01 that FreeBSD is using: 2023.01 fails to load FreeBSD's EFI loader for a 8 GiByte RPi4B, reporting a message that is a misnomer for the actual internal problem.

I downloaded:

http://ftp3.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/14.0/FreeBSD-14.0-CURRENT-arm64-aarch64-RPI-20230302-005cca8361a4-261233.img.xz

and put the .img on a USB3 SSD via dd and booted the result on a RPi4B. That worked fine, producing a dumpdev context of:

# dumpon -vl
kernel dumps on priority: device
0: label/growfs_swap