OpenBSD CVS

CVS log for src/usr.sbin/installboot/installboot.h


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.17 / (download) - annotate - [select for diffs], Wed Feb 19 21:30:46 2025 UTC (7 months, 2 weeks ago) by kettenis
Branch: MAIN
CVS Tags: OPENBSD_7_8_BASE, OPENBSD_7_8, OPENBSD_7_7_BASE, OPENBSD_7_7, HEAD
Changes since 1.16: +7 -1 lines
Diff to previous 1.16 (colored)

Add -c option that sets up the machine to boot from the specified disk.
For now, this is only implemented on amd64 and arm64 machines that use
UEFI and a GPT partition table.  Will be used by the installer soon.

ok deraadt@, kn@

Revision 1.16 / (download) - annotate - [select for diffs], Tue Nov 8 12:08:53 2022 UTC (2 years, 10 months ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_6_BASE, OPENBSD_7_6, OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (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.15 / (download) - annotate - [select for diffs], Mon Nov 7 15:56:09 2022 UTC (2 years, 10 months ago) by kn
Branch: MAIN
Changes since 1.14: +2 -1 lines
Diff to previous 1.14 (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.14 / (download) - annotate - [select for diffs], Thu Feb 3 10:25:14 2022 UTC (3 years, 8 months ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.13: +3 -1 lines
Diff to previous 1.13 (colored)

installboot(8): Adjustments for EFI platforms

Reduce #ifdef'ing within the control logic to make it clearer that there
are no essential differences in behaviour between the platforms.

Make installboot(8) write startup.nsh to enable simpler and more consistent
code in install.md.

Input and OK kettenis@ deraadt@

Revision 1.13 / (download) - annotate - [select for diffs], Tue Jul 20 14:51:56 2021 UTC (4 years, 2 months ago) by kettenis
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.12: +2 -1 lines
Diff to previous 1.12 (colored)

Add -p option to "prepare" (newfs) a filesystem that will be used for
the bootloader.  This is a no-op on architectures where such a filesystem
isn't needed.

ok krw@, deraadt@

Revision 1.12 / (download) - annotate - [select for diffs], Mon Jun 8 19:17:12 2020 UTC (5 years, 3 months ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.11: +4 -1 lines
Diff to previous 1.11 (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.11 / (download) - annotate - [select for diffs], Sat Sep 1 16:55:29 2018 UTC (7 years, 1 month 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
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

Remove 'overlap_allowance' parameter from bootstrap().

It was added to support Vax. Vax is dead Jim.

ok deraadt@

Revision 1.10 / (download) - annotate - [select for diffs], Thu Oct 15 19:27:30 2015 UTC (9 years, 11 months ago) by miod
Branch: MAIN
CVS Tags: 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.9: +2 -2 lines
Diff to previous 1.9 (colored)

Add an extra argument to bootstrap() to allow for a limited overlap between an
existing partition and the boot blocks span, and update all callers to require
an overlap limit of zero sectors (thus not changing their behaviour).

Then, add proper support for vax: copy the 2nd-stage boot block to /boot and
install the 1st-stage boot block at the beginning of the disk, retaining the
disklabel; allow for an overlap of up to 16 sectors, which is perfectly fine
as long as your `a' partition is FFS.

Note that regular installs will not even have such an overlap, because the
default OpenBSD span on a disk on vax starts at sector 16, but installation
media use sperific layout which require this.

ok krw@

Revision 1.9 / (download) - annotate - [select for diffs], Thu Oct 15 04:41:09 2015 UTC (9 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.8: +3 -1 lines
Diff to previous 1.8 (colored)

give up; include stdlib.h from the .h file, sigh

Revision 1.8 / (download) - annotate - [select for diffs], Wed Oct 14 14:13:12 2015 UTC (9 years, 11 months ago) by jsg
Branch: MAIN
Changes since 1.7: +2 -1 lines
Diff to previous 1.7 (colored)

add includes for crc32() and uuid_dec_be() missed in rev 1.11
ok krw@

Revision 1.7 / (download) - annotate - [select for diffs], Wed Oct 14 00:19:04 2015 UTC (9 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.6: +1 -3 lines
Diff to previous 1.6 (colored)

Backout last. Breaks sparc64, amoung other dubiousness.

requested by deraadt@

Revision 1.6 / (download) - annotate - [select for diffs], Mon Oct 12 20:52:20 2015 UTC (9 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.5: +3 -1 lines
Diff to previous 1.5 (colored)

Check that the disk specified on the command line is the disk that
files are copied to. Error out with 'cross-device install' if not.

ok millert@, ok deraadt@ & jsing@ for previous version

Revision 1.5 / (download) - annotate - [select for diffs], Thu Oct 8 14:50:38 2015 UTC (10 years ago) by krw
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

Refactor fileprefix() and filecopy() to use warn() instead of err()
to display error message, and to return error indications (NULL and
-1 respectively).  Use the error indications in write_efisystem()
to unwind in the face of more error conditions. In other cases just
exit(1) to emulation current behaviour.

ok deraadt@

Revision 1.4 / (download) - annotate - [select for diffs], Sat Jan 18 03:07:05 2014 UTC (11 years, 8 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.3: +1 -0 lines
Diff to previous 1.3 (colored)

Make installboot(8) easier to use - copy the second stage boot loader to
the default location used by the given architecture. This eliminates the
need to copy it over manually prior to running installboot.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Jan 18 02:47:27 2014 UTC (11 years, 8 months ago) by jsing
Branch: MAIN
Changes since 1.2: +4 -1 lines
Diff to previous 1.2 (colored)

Add a -r flag that allows for the mount point of the root filesystem to be
specified. This is primarily for use by the installer and defaults to /.

Revision 1.2 / (download) - annotate - [select for diffs], Sat Dec 28 11:26:57 2013 UTC (11 years, 9 months ago) by jsing
Branch: MAIN
Changes since 1.1: +5 -1 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 (11 years, 9 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.