non-soft-settable media. Treat that as if there was no media output.
Use a supplied media-string of "<null>" or "<default>" or synonyms to
avoid passing explicit media flags onto ifconfig.
just what the hell sysinst is asking for. (Why do we include the
`dangerously dedicated at all?)
Fix dangerous UI botch: make `normal' install the default, not `whole disk'.
i386) so that the partition menu items match the selector letters).
XXX: All the .fr files need checking - look for the comment
/* XXX: ENGLISH -> FRENCH */
Replace with MAX_DISKS (size of the array of disk info).
Fixes a problem where sysinst cannot install onto disks rz5 or greater
on pmaxes (which use old SCSI with wired-down scsi devices, even for
GENERIC kernels).
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
Only implemented for the i386; behaviour for other ports is
unchanged. For the i386, make this function remove some extraneous
files in /, and frob rc.conf to have rc_configured=YES. The defaults
are reasonable, and it saves the user having to set TERM and mount
filesystems by hand in order to be able to edit /etc/rc.conf
(XXX not very clean, but it's a workaround to be more user-friendly
for 1.3.2)
Also adapt a few messages slightly so they apply to both situations.
hack to enable this to work when included from a different directory.
Idea: if the crunchgen(1) child were to cd to the target directory
just prior to executing its manufactured Makefile, then problems
like this might not occur.
* Split bios geometry and MBR partition editing code formerly in
arch/i386/{md,fdisk}.c to mbr.c in mi directory.
* Leave /sbin/fdisk parsing/handling code in separate file,
we may want to change it later. move to mi directory.
* Create mbr.h with declarations for MBR/BIOS-geomotry code.
#include "mbr.h" in i386 md.h.
* Use symbolic names for 386bsd and new NetBSD partition IDs.
Handle MBRs with both 386bsd and NetBSD partitions less stupidly.
in menus.md.{eng,fr}, lifted verbatim from Alpha and pmax.
Give last split-floppy for each X11 set, for 1.3.
FIXME: if the number of floppies in any split set changes for 1.3.1,
syinst is hosed for 1.3.1. Same is true for any release: we can't
install from split sets if the count of floppies doesn't match
the precompiled version.
The number of floppies in a split set should be computed dynamically
from a directory listing, or read from a config file in the split
directory.
* Add cp_to_target() to copy a file from current root, to an absolute
path relative to target root.
* Clean up alpha, arm32, i386, pmax MD code: use cp_to_target()
NB: Alpha uses target_expand() when calling installboot.
* Add tests for target == current root. Intended to support
`upgrade/reinstall' to current root, either for testing or easier
minor-release upgrades. Only tested on pmax.
same for floppies (from Christoph Badura)
* allow user to run 'Configure network' multiple times, to correct errors
for example.
* deal with network interfaces that need explicit media type selection
(i.e. ask for it when it is needed, also store it in the generated
/etc/ifconfig.blah file on the destination disk)
so we can be sure there are no float instructions.
Nothing in here uses floating point, and this saves
space by avoiding the FPU_EMULATOR in the kernel.
(like upgrade but without trying to save etc.
* Add option to setls0urce menu to look in an already-mounted (local)
directory. Change `local fs' option to say umounted local fs.
* Change extract_file() to check that a tarball actually exists
and give an explicit non-curses warning if it doesn't. (see above.)
* GNU tar returns a successful status if its gunzip child dies.
Add short sleep() after tar commands in case of undetected errors.
* Change set-source selection code (except FTP, floppy) to check
that the mandatory set files (base.tgz, etc.tgz) exist
in the selected directory. If they don't, warn the user and
prompt the user to change the selected directory.
Give the user the option to explicitly continue even if
base.tgz or etc.tgz not found, just in case.
* Change extract_file() to keep count of set unpacks that succeeded
or failed. (Unreliable, given the broken return status of gnu tar.)
Warn the user if there are errors and abort the installation/upgrade
if we find any. Does at least catch Ctrl-C interrupts of unpacking.
* Make unwind_mounts() signal-safe.
* Sense of target_verify_* is broken. Replace with predicates that
return 1 iff the file or directory exists.
* Fix upgrade tests for existing etc.old (see above) before saving
target /etc as /etc.old.
* Other detail fixes.
* Add `partinfo' type, for description of a single partition,
so we can pass labels by reference..
* Add label.c with label initialization, naive overlap-check code,
and a UI entrypoint edit_and_check_label() which iterates through
checking a label for overlaps, and if any, giving the user the choice of
fixing them or punting back to the main menu.
* Change return type of md_make_bsd_partitions from void to int.
Return 0 if the partition has problems (or the user gave up on it)
and 1 if the partition is completed and looks OK.
* Change install() to check return value of md_make_bsd_partitions().
If it returns zero, print an `abort' message and return to main menu.
* Add label.c to all ports' Makefile.
MD code tested on pmax and cut-and-pasted to other ports.
* Add mount_with_unwind() that adds mountpoint to a LIFO queue
of mountpoints to undo on error. Use in target_mount().
* Add unwind_mounts() which traverses the LIFO queue and unmounts
filesystems, silently ignoring errors.
* create toplevel() function which displays banner message and
calls unwind_mounts().
* change toplevel menu to call toplevel() instead of inline banner.
Where to do unwinds needs more thought. Perhaps we should only unwind
if an upgrade or install appears unsuccessful, so after a successful
install, the target is mounted (e.g., for upgrading /etc/rc.conf).
at used partitions. fdisk may report the number of cylinders > 1024
correctly if no translation is used.
* Print out the end of the partition as well as the size when editing things.
* Enable the user to specify the BIOS geometry if he/she wishes.
* Fix 1023 / 1024 mixup. The reason BIOSs will return 1023 is an old IBM
convention to use the last cylinder as diagnostic cylinder. The user
can still skip the last ('real') cylinder if specified.
* Make some messages more verbose.
all pathname-on-server related definitions to MI code, since they are now
defined to be consistent across all platforms. Also, nuke the "rels" global,
since release numbers are now always specified in "long form", i.e. 1.3A
vs. 13A.
* Create target /kern after creating target /etc/fstab entry for /kern.
* Check for more files in target when done: /etc/{rc,rc.subr,conf}
* Clean up warning exerciser.
ext_dir that is absolute directory name of where files are located to
extract. All setup routines must set that directory name correctly.
Make target.c compile if DEBUG is set.
If installing from a pmax diskimage as both current root and target root,
the diskimage /usr/bin/tar is hidden underneath the target /usr mountpoint
when it's time to untar distribution files. From a comment in the change:
Make sure any binaries in a diskimage /usrbin get copied
into the current root's /usr/bin. (may be same as target /usr/bin.)
The rest of sysinst uses /usr/bin/{tar,ftp,chgrp}.
We cannot ship those in /usr/bin, because if we did
an install with target root == current root, they'd
be be hidden under the target's /usr filesystem.
Requires updated diskimage build script which populates /usrbin with
tar, gzip, gunzip, ftp, and chgrp (all statically linked.)
and current-root-is-target-root (pmax diskimage.
* Add code to check disk names (e.g., "sd0") against the current
kern.root_device sysctl (whic does *not* include a partition).
* Add new function must_mount_root():
check to see if it's the same device as the root. If not,
the current and target root partitions cannot overlap.
If they do, do statfs() on "/", and return 1 iff we get back
"root_device" as the mounted-on filesystem, otherwise zero.
* Call must_mount_root() right after the user specifies a disk as
install/upgrade target, and if it returns 1, print a message asking
them to mount root, and abort.
* Use statfs("/") mounted_from string to check if a disk partition
(e.g., "sd0a") matches the current root.
as last step of upgrade, so /etc/fstab exists after reboot.
* util.c: correct sense of test in sanity-check helper check_for().
Change variable name to `found' for readability.
still needs an option to specify the distribution sets from a filesystem
present in fstab.
Add "ados" to the list file recognized filesystems.
Increase label information table size to 16 to allow for 16 partitions.
* Change find_disks: after mouting target root, check for
/etc/fstab in target, and abort upgrade if not found.
* Change upgrade to check if the target root has /etc.old
before renaming the target /etc -> /etc.old. If found, abort.
(may indicates a failed upgrade.)
* Add save_etc(). saves target /etc as /etc.old, then copies back
config files we might want during upgrade, in case target is current root.
* Fix logic that fscks and mounts disks. Use subroutines to
fsck with a warning message and ok() on continue. Same for doing mounts.
* Fix bug in extract_dist(). Do NOT do target prefixing on the dist_dir,
since we didn't do target prefixing when mounting it.
(At least, NFS does't.)
* Add function to sanity-check target root.
Call after upgrade/install is done.
* Change MSG_realdir to print the strerror() of any errors.
Change target_chdir() to check if chdir() returns -1 and return errno.
* Make sure /dev exists before cd'ing there and running MAKEDEV.
* Use target_fopen() and fprintf() to write network state to disk,
to avoid inadvertent shell escapes.
* Fix silly typo in append_to_target_file. (maybe add shell quotes?)
- Added -r rel flag to change the release tag on the tar files.
- Added Usage
- Fixed a menu bug (missing exit)
- Made target_expand available to all functions to produce correct
file names.
Add more #ifdef DEBUG to target-prefixing.
* Fix niggle in creating a new resolv.conf: ctime()'s result ends in '\n',
so don't include one after the %s for the timestamp.
* Change upgrade: add the same ``disk stuff done'' message used in install,
so the user knows what's going to happen.
(is a more tailored message useful?)
* Correct arg typo in mv_within_target_or_die().
* Add new path-prefixing entrypoints to fopen(), collect(), and do mounts.
* Use the above. MI code is now clean of explicit references to /mnt.
* Lint: add `const' to collect()'s pathname arg.
include <stdio.h> in factor.c, now that defs.h uses FILE*.
* Put newfs-and-mount code into a separate function, in case
we want to support non-ffs filesystems.
* Check for the currently-mounted root, and don't newfs or mount it.
Assumes md code will also avoid changing that partition.
* renames of files from one pathname within the target to another
(e.g., mv_within_target_or_die("/etc", "/etc.old");
* check to see if a partition name like "sd0a" is the current root
* Duplicate a file from the current root into the target root
(for copying /netbsd from RAMdisk into the target).
A no-op if the root is the install target).
Start using these where appropriate.
Change net.c to avoid losing any information when updating network
config files: where possible, do appends to files that might have more
info than we got from the user (e.g., /etc/hosts.)
Where possible, add comment saying file was created/modified by sysinst.
Add target.c to Makefiles.
* Minor fixes:
* Fix buglet in disks.c: make sure the target /etc exists before
touching the target's /etc/fstab. (Could be even cleaner.)
* If the target root is on /, don't copy our temporary /etc/resolv.conf
to the target /etc/resolv.conf. (Could be even cleaner.)
* Don't write the DNS hostname into /etc/defaultdomain.
DNS search paths are often not the same as YP group names.
run_prog_or_die() -- aborts if system() returns an error.
run_prog_or_continue() -- prints a warning that installation may
have failed but lets the user continue. Suitable for running mkdir.
RAW_PART for new labels, instead of just the latter.
Avoids shrinking RAW_PART label with pmax kernel-supplied default
labels or with already-labelled disks.
XXX Get real incore label, instead of default label instead (or as well)?
to 4.3BSD-style (BSD uses whole disk, 8 partitions, c=RAW_PART, d=/usr).
Initialize variables appropriately.
May be a good starting template for sparc, vax, others?
Use symbolic defines to allow changing the partition used for /usr (to
add a /var partition, or for consistency with i386).
* Use md_make_bsd_partitions() code lifted from the i386 version,
modified to set D partition size.
* Add the MD messages used by the above to sysisnt/arch/pmax/msg.md.eng.
* Add X11 sets xbase, xserver, xcomp to arch/pmax/md.h.
parallel development. i386 version about 90% complete. pc532 version
just started, other architectures later in coordination with portmasters.
This is a curses based, menu driven installation program.
Better error checking is needed.