OpenBSD CVS

CVS log for src/usr.sbin/installboot/softraid.c


[BACK] Up to [local] / src / usr.sbin / installboot

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.9 / (download) - annotate - [select for diffs], Mon Nov 14 13:39:37 2022 UTC (18 months, 2 weeks ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.8: +5 -5 lines
Diff to previous 1.8 (colored)

Check for offline chunks first, then check for keydisks

Like keydisks, offline data chunks also report a size of zero, so skipping
zero sized chunks before doing the offline check means not printing the
"softraid chunk N not online - skipping..." warning.

Restore order to make this warning appear on degraded volumes again.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Nov 8 14:05:41 2022 UTC (18 months, 3 weeks ago) by kn
Branch: MAIN
Changes since 1.7: +5 -8 lines
Diff to previous 1.7 (colored)

Skip softraid(4) keydisks silently

Logging the presence of a keydisk the same way offline data chunks are
logged seems unjustified:

Offline data chunks mean the softraid volume is degraded and installboot(8)
should be rerun when they're online.

Offline keydisks just means the user unplugged their USB key or so and
installboot must never touch them anyway, so the absence of keydisks is
meaningless to installboot -- it should never touch them.

So a) drop the "is keydisk - skipping" message and b) hoist the keydisk
check before the offline check so as to avoid "not online - skipping"
messages for offline keydisks.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Nov 8 12:08:53 2022 UTC (18 months, 3 weeks ago) by kn
Branch: MAIN
Changes since 1.6: +36 -1 lines
Diff to previous 1.6 (colored)

Make "prepare filesystem" softraid aware, fix arm64 softraid install

On EFI platforms, 'installboot -p' on a softraid volume will only prepare
the filesysem inside the volume and leave physical softraid chunks untouched
which leaves you with unbootable chunks.

The current workaround is to prepare chunks manually (see regress).

Fix it in the same spirit the actual "install" already works in softraid.c.

This is what mlarkin has already been tested in a combined diff with the
MD -> MI softraid merge bits from the previous commit.

Works fine on amd64, arm64 and sparc64 upgrades and installations.

OK jsing

Revision 1.6 / (download) - annotate - [select for diffs], Mon Nov 7 15:56:09 2022 UTC (18 months, 3 weeks ago) by kn
Branch: MAIN
Changes since 1.5: +48 -1 lines
Diff to previous 1.5 (colored)

Merge duplicate MD code into MI sr_open_chunk()

It does not have the prettiest signature, but nicely folds identical copies
into softraid.c, which then allows us to reuse sr_open_chunk() yet again in
an upcoming diff to make -p softraid aware (fixes arm64 installations).

Regress keeps passing.
Works fine on amd64, arm64 and sparc64.
"looks fine" mlarkin for whom this unbreaks a fresh arm64 softraid install

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jun 8 19:17:12 2020 UTC (3 years, 11 months ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.4: +17 -1 lines
Diff to previous 1.4 (colored)

Provide clear errors when trying to install oversized boot loader

sparc64 installboot(8) on softraid(4) with too large files, e.g. unstripped
builds, fails poorly with "installboot: softraid installboot failed".

This is due to the BIOCINSTALLBOOT ioctl(2) returing the default EINVAL
rather than using softraid's sr_error() interface properly;  additionally,
installboot does not check for such message from the bio(4) layer.


Make the kernel generate "boot block too large" and "boot loader too large"
messages for softraid devices and have installboot act upon them analogous
to bioctl(8), by adapting its bio_status() into the new sr_status() helper.

Input, reminder to look at bioctl, same kernel diff from, OK jsing

Revision 1.4 / (download) - annotate - [select for diffs], Sat Oct 3 16:56:52 2015 UTC (8 years, 8 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

Nuke trailing whitespace to avoid cluttering possible upcoming diffs.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Jan 16 00:05:12 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.2: +1 -2 lines
Diff to previous 1.2 (colored)

first batch of cleanup to programs based upon the namespace cleanups
in net/pfvar.h sys/proc.h sys/ucred.h arpa/nameser.h
change to PATH_MAX, reduce use of MIN() and MAX(), HOST_NAME_MAX+1,
LOGIN_NAME_MAX, etc etc
ok millert guenther, some review by doug

Revision 1.2 / (download) - annotate - [select for diffs], Sat Dec 28 11:26:57 2013 UTC (10 years, 5 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.1: +4 -6 lines
Diff to previous 1.1 (colored)

Various code clean ups - add a missing header, add a missing prototype,
add some casts, tweak some types and variable names.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Dec 27 13:52:40 2013 UTC (10 years, 5 months ago) by jsing
Branch: MAIN

Initial version of a unified installboot(8) that lives outside of
sys/arch/${MACHINE}/stand. For now this only supports i386, however
additional architectures will be added and further development can happen
in tree.

Requested by deraadt@ quite some time ago.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.