Commit Graph

53 Commits

Author SHA1 Message Date
martin 7fd225f6ad Factor out all RAM size thresholds as defines to avoid magic numbers.
To work around PR misc/54886 bump the threshold for a tmpfs /tmp mount
up to 256 MB.
2020-01-24 07:31:15 +00:00
martin 249ed7a6e5 First try to bring evbarm installation closer to current reality. 2020-01-20 21:26:35 +00:00
martin 0e7fb040fb Fix /tmp tmpfs handling and on machines with enough RAM default to
creating a /tmp tmpfs with 25% of ram size limit. Suggested by ad@.
2020-01-16 16:47:19 +00:00
martin abce8cb394 Finish conversion of extended partitioning parts to new abstract
backend interface. XXX still could use a lot of polishing.
2020-01-09 13:22:30 +00:00
martin b2a9c378fb Get rid of the evbarm preliminary menu: do not bother to ask the user
whether this is a RPi - query the FDT instead.
2019-12-11 15:08:45 +00:00
martin b76c9f8f6f Make tar extraction flags depend on our usage of pax-as-tar or bsdtar. 2019-11-14 13:58:22 +00:00
martin 485d530922 Make cloning support optional, so we can save some space on very small
install media.
2019-11-13 18:57:26 +00:00
martin f77b58b179 Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).
2019-11-12 16:33:14 +00:00
maya 50f7458533 Split out /rescue to its own set and adapt installers/images to add it.
This is meant to make updates safer: if something goes wrong with updating
base, we still have the old, standalone /rescue to recover from.
2019-10-02 11:15:59 +00:00
martin 32ccf04c1c Do not offer to upgared the "current system" if we are running off a CD
(i.e. / is mounted read-only)
2019-08-27 14:11:00 +00:00
martin a7267d5357 Support upgrade of systems using NAME= syntax in /etc/fstab.
Make supported file system types dynamic - instead of hardcoding the
available types at compile time, check for available newfs_* helper
binaries in the actual install environment at runtime.
2019-08-07 10:08:04 +00:00
martin 62056b8490 Strip trailing / from last mounted strings.
No idea how they happen, but for cgd root (init.root = "/altroot")
they have been reported to exist.
2019-07-26 08:18:47 +00:00
martin b1fa9754c7 For upgrade / re-install allow the currently running system as a target
in the "disk" selection.
2019-07-23 18:13:40 +00:00
martin 0c91c88eda Fix the "reinstall sets" action. 2019-07-23 16:02:32 +00:00
martin c2ed2005cc When searching for a partition that may be the root partition for upgrading,
allow "/", "/targetroot" and "/altroot" as potential last mount points.
2019-07-23 15:23:14 +00:00
martin 4f30cbf326 We may call md_pre_mount() multiple times for the same install set,
so pass an additional index argument so MD code knows which part
of the install will be mounted next.
2019-07-13 17:13:36 +00:00
martin e4f8c9e59c When adding non-disklabel boot partitions (or similar), distinguish between
ones we need to add to the outer (MBR) partitions, or copy over to the
inner (disklabel) partitions.
2019-07-12 18:28:08 +00:00
christos 72ea5dba1a refactor disk ioctl stuff to make it smaller. 2019-06-21 21:54:39 +00:00
christos 59ed32779d add more printflikes() (rin) and remove unused function.
cVS: ----------------------------------------------------------------------
2019-06-20 15:56:41 +00:00
martin 4103857b9a Rework internal data structures and "interfaces to user interface" functions
to get rid of all disklabel assumptions.

Previously (even for GPT partitioning) struct disklabel was used, which
obviously breaks large disk setups. Also many MD parts and parts of the
user interface assumed (a) a struct disklabel is used internally to
store partitioning information and (b) partitions are named 'a' ... $MAXPART.

Get rid of this and replace it with a quite abstract interface that should
be able to deal with all variants in partition storage:

 - partitions are stored in a (partly abstract) struct disk_partitions
   and most parts of it are only accessed via accessor functions provided
   by a "partitioning scheme".

 - implement partitioning schemes for MBR, disklabel and GPT (with likely
   RDB [amiga] and Apple Partition Map [mac*] to follow soon)

 - partitioning schemes may be cascaded, e.g. on x86 when using MBR as
   "outer partitions", we have disklabel as "inner partitions".

 - all user interface goes via accessor functions in the partitioning scheme,
   some of which return pointers to special user interface descriptors
   (e.g. to allow editing partition flags, which are scheme specific)

Overall the user interface changes (in this initial step) are minimal but
noticable. A new Anita is needed for automatic test setups - many thanks
to Andreas Gustafsson for lots of early testing and a new Anita version,
and to Manuel Bouyer for cooperation and tests of the Anita release.

This work was sponsored by The NetBSD Foundation, Inc.
2019-06-12 06:20:17 +00:00
martin c3f237b4de Backout previous snprintf nonsense, instead STFU gcc 7's most
useless warning ever.
2019-02-12 18:32:15 +00:00
martin ccb99dea3b Fix a few off by one (in both directions) in previous, pointed out by mrg.
Avoid open coding snprintf return value checking and introduce a
helper functions that always ensures string termination instead,
suggested by christos.
2019-02-11 20:40:18 +00:00
oster b402551324 Remove extra #ifdef and duplicated set of #ifdef's. 2019-01-27 04:15:11 +00:00
pgoyette d91f98a871 Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
martin 009ce0057d Separate binary sets and binary pkg prefix from the machine, and set
it explicitly for evbarm*, evbmips* and evbsh3 so we get the correct
64bit pkgs on aarch64 and also have working defaults on the other
variants.
2018-12-16 11:36:08 +00:00
martin 72cf5c53dc Cosmetics: consistently use MEG and GIG defines for size calculations 2018-11-27 17:13:41 +00:00
martin b978e7a9c1 Split positional argument string expansion from msg display, we can make
good use of it elsewhere too.
2018-11-19 17:17:43 +00:00
martin ac730b5183 Add a new helper function to show messages with positional parameters 2018-11-15 10:23:32 +00:00
martin c4cf3d8d86 Slightly enhance previous: create two utility functions checking for
partitionability and boot code requirements, use a generic match helper
function for both and fully check the device name.
2018-11-14 02:30:00 +00:00
martin 57cf8237b6 Skip floopies when selecting an install target, but do not add them to
the CD list when selecting an installation source device.
2018-11-11 10:06:09 +00:00
martin 8b5066c45d Do not allow installation onto floppy disk - can be overriden by
architectures where it would make sense (none currently), and also
works around a bug in QEMU for sparc that kills our -current anita tests.
2018-11-11 09:17:10 +00:00
martin 1c2e5b02c0 Adapt other cd-device query functions to new world order, fix
default cd device (assume 'a' partition).
2018-11-08 20:29:37 +00:00
martin 3b44a3d7f6 Unify handling of CDROM device names.
Skip CDs when looking for install targets (we do not support installing
onto a blueray with UDF).

Fix search for the default CDROM device and the CD we booted from
for ports with nonstandard CDROM device names.
2018-11-07 21:20:23 +00:00
martin 0ef20e9266 Support sets in .tar.xz format 2018-10-06 18:45:37 +00:00
rin d1110cca13 Add NOPARTMAN compile-time option, which drops extended partitioning
support provided by partman.c. It reduces, e.g., about 30KB for
crunched binary in atari install floppy.

OK christos
2018-09-20 12:27:42 +00:00
martin ad83f34c87 Now that the build cluster creates stable "latest" links, use them
as default for downloading sets.
2018-09-16 09:15:12 +00:00
martin 56c59c7a28 Try to properly guess a path on the ftp server for pkg binaries
and use that as default.

Assume for $N.99 (current) we can use $N.0. Otherwise strip all
RC*/STABLE* annotations and just use the plain numbers.
2018-09-12 13:44:05 +00:00
martin 9ce05eeee9 Split the host name used for ftp transfers from the one used for http
transfers. This is slightly inconsistent, as directories are still
shared - but this allows us to default to cdn/nycdn for http (which don't
support ftp).
2018-09-11 08:05:18 +00:00
martin df9944f85a Fix editor accident in previous 2018-09-08 20:01:19 +00:00
martin 3575766bab Fix previous in case when BUILDID is passed - the subdirectory has the
same name as the BUILDID (which already includes the trailing "Z", no need
to append it again)
2018-09-06 07:56:40 +00:00
martin 7141f3ff1f For local builds, at least use the right prefix on nyftp 2018-09-05 12:49:55 +00:00
martin b99992c095 Try to guess the proper directory on ftp or nyftp where the binary
sets for the current build will end up.
2018-09-05 12:01:52 +00:00
martin 2575b4dcc3 Add an option to install onto a pre-configured wedge.
Greatly simmplifies (U)EFI setups (but does not fully automate them yet).
2018-06-03 13:16:30 +00:00
joerg b77ea2f710 deconst -> __UNCONST, the former involves UB with NULL arithmetic. 2018-05-18 12:23:22 +00:00
martin 5270515f54 Make "ask_yesno" and "ask_noyes" take a const char * as argument, moving
the deconst() dance into the utility functions and simplifying all callers.
2015-05-11 13:07:57 +00:00
martin e21052b4e5 Backout the previous incorrect fix for PR 49440 and redo it more globaly:
get rid of the global "yesno", introduce utility functions "ask_yesno()"
and "ask_noyes()" instead, greatly simplifying a lot of code.
Pass in a pointer to the return value to various "set source" menus.
2015-05-10 10:14:02 +00:00
martin f33ca424b5 Add a new utility function "update_wedges()", which triggers a scan
for wedges on the given disk. Call this after writing a disklabel.
This makes all auto-discovered wedges go away after we changed the
partitioning (and are not using GPT) and fixes PR 49665.
2015-05-09 12:06:31 +00:00
abs 40a37f0d92 Rather than scatter set_swap() calls wrapped in ram size checks through
md_post_disklabel() and md_pre_update(), abstract them out to an MI
set_swap_if_low_ram() and call from the appropriate MI places.
Now all platforms add swap if the system has <= 32M of RAM.
2015-01-02 19:43:13 +00:00
christos e47dca206e Don't use asctime(localtime(time_t *)) because this is really ctime(time_t *)
and not checking the result of localtime can lead to tears.
Add a safectime() that always returns a good string, and add some debugging
so that we can see if there is indeed something wrong in the new libc time
code.
2014-10-14 16:35:20 +00:00
roy 13c4979619 Only prompt for one nameserver, let the user decide if it's a
pre-determined google server other another one.
2014-09-13 00:38:36 +00:00