Commit Graph

93 Commits

Author SHA1 Message Date
phil ead95231ed pc532 partitions and md stuff. 1997-12-10 04:36:19 +00:00
jonathan 00a23f52d7 Delete implemented TODO items from the for-1.3 list.
Note special-purpose delay after run_prog() for untarring sets.
1997-12-07 03:03:19 +00:00
bouyer 5423c09ec6 Sync with .eng versions + correct some spellings/wording. 1997-12-05 17:37:41 +00:00
phil 00b12cbbd6 Ping the right host. (From Matthias Pfaller.) 1997-12-05 17:19:48 +00:00
simonb b0b1d20a3c Change the tar command that copies the diskimage files to the target
disk to use reletive pathnames to stop the "removing /" warnings.
Fixes pr#4579.
1997-12-05 14:55:09 +00:00
simonb c483af0a08 Fix typo in partition overlap checking - the inner loop check for
boringpart used the outer loop variable.
1997-12-05 14:46:01 +00:00
jonathan 3722de06d9 Put shell quotes around FTP URLs in case of shell metachars in passwords.
From PR #4580.
1997-12-05 14:26:27 +00:00
jonathan d7afdff3d0 * Add main menu option to reinstall sets or install additional sets.
(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.
1997-12-05 14:00:59 +00:00
simonb 424f55f4b5 Add a cleanup function (set with atexit()) that shuts down curses nicely
and unmounts any filesystems left mounted when sysinst exits under any
circumstances.
1997-12-05 13:38:59 +00:00
bouyer 33e8f8cecb Sync with msg.mi.eng + better translation in one place. 1997-12-04 16:57:56 +00:00
jonathan ead082ab43 tar.gz -> .tgz as per release(7).
Clarify English text of localfssource: it's for an un-mounted
local filesystem, not an already-mounted pathname.
1997-12-04 13:24:30 +00:00
jonathan 7bd6655894 Add check for overlapping partitions:
* 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.
1997-12-04 11:27:56 +00:00
jonathan fc3fa7cd7f Implement TODO item to unwind target mounts on completion:
* 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).
1997-12-04 09:05:35 +00:00
jonathan 6266fb93be Quote disktab(5) entry name so that label names with spaces
(e.g., "bsd disk") work CVS:
1997-12-02 11:00:59 +00:00
jonathan 4b1dd00797 Fix target_already_root() check: is_active_rootpart() takes a
string like "sd0a", and compares it against mounted_rootpart(),
which returns a string like "/dev/sd0a". For now, prepend "/dev".
1997-12-02 03:02:29 +00:00
fvdl 0cd2d70c37 * Check for an existing MBR not by looking at the geometry, but by looking
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.
1997-11-29 21:49:13 +00:00
bouyer ffd59152fd French version of the sysinst messages, contributed by Stephane Engel
<steph@Inox.darh.ensta.fr>. Just put LANG=fr in Makefile.inc to
use them.
1997-11-27 10:10:54 +00:00
bouyer f5fee9d6a1 French version of the sysinst messages, contributed by Stephane Engel
<steph@Inox.darh.ensta.fr>. Just put LANG=fr in Makefile.inc to
use them.
1997-11-27 10:10:05 +00:00
phil 1e785c32c4 Reworked partitioning issues for i386, closes PRs 4520, 4534, 4536.
Other tweeks to make install better.
1997-11-25 20:34:59 +00:00
thorpej 75dd009b1d Update for the lay-of-the-land as described in release(7). As such, move
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.
1997-11-25 06:53:07 +00:00
thorpej 01278747a2 Prompt for keypress after FTP failure, so we know what went wrong.
From Havard.Eidnes@runit.sintef.no, PR #4521.
1997-11-25 00:24:52 +00:00
simonb 33960f8371 Load defaults for hostname, IP address and netmask if these are already
configured.
1997-11-22 14:16:55 +00:00
simonb 6cf76648f3 Don't try to ping a nameserver or default router if not is specified. Also
don't build an /etc/resolv.conf if a nameserver is not specified.
Fixes PRs #4548 and #4539.
1997-11-22 13:52:45 +00:00
simonb e2b222f32d If not network interfaces are found, just return without cycling forever
with no valid choices.
Fixes PR#4542 from Stephane Engel.
1997-11-22 00:29:33 +00:00
simonb b80b4d1cd0 Catch SIGINT and do a endwin() to leave tty in a sane state. 1997-11-21 12:08:06 +00:00
simonb cd110ecf63 Use a default of 32MB for the root filesystem with a custom partition
layout.
1997-11-19 14:06:47 +00:00
simonb 2ddb44e7f3 Backout previous chance with distrib set location. The should be done
in a MI manner when we work exactly what that is...
1997-11-17 21:27:47 +00:00
simonb cd1152e9eb Change the tar command that copies the diskimage files to the target
disk to use reletive pathnames to stop the "removing /" warnings.
1997-11-16 12:53:07 +00:00
simonb 06f521afad Distribution sets are in ..../binary, not ..../binary/Tarfiles 1997-11-16 12:50:05 +00:00
simonb c8f66d4491 Use bootp or dhcp to get some network services? (hostname, domain
name, name servers...)
1997-11-15 11:09:45 +00:00
simonb b2ba0b82ff Fix typo in a comment. 1997-11-14 23:47:49 +00:00
simonb 5a662afa53 A few more ideas. Clean SIGINT handling, loading from mounted
filesystems and from maximum entropy - better error message handling
1997-11-14 09:32:24 +00:00
phil a4f785ec69 Fix va_start call, PR 4477. 1997-11-13 17:26:25 +00:00
simonb 0c8e3514d7 Reposition some menus (the "change a partition" and "change distribution
sets" menus) so that the bottom of the menu doesn't go below the 24th
line of the screen.
1997-11-13 04:23:39 +00:00
jonathan 35fa360c0b * Create /mnt2 before unpacking sets, in case it's not on install media.
* 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.
1997-11-13 03:06:44 +00:00
jonathan bf4782e7cf Rephrase intro text to mention sysinst by name, mention upgrades, and
to fit in 80 colums even during _ALPHA.
1997-11-13 02:44:34 +00:00
phil 4ec8d82726 Clear up confusion of extract_dist() extract directory source. New var
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.
1997-11-11 00:43:31 +00:00
jonathan 9f8db6cd26 Add ideas from Simon Burge.
Mark things currently in progress, but which won't make it for today's
review, as `to do for release'.
1997-11-10 17:11:19 +00:00
jonathan 61531e7b2d fix typo ("/netsbd"). Use target call to copy /tmp/.hdprofile to target root. 1997-11-10 08:16:21 +00:00
jonathan f3e413c744 Only duplicate /install.usr into the target /usr if we /install.usr exists. 1997-11-10 06:08:55 +00:00
jonathan 8f4cc24742 Change dist_list[] order in all md.h files to unpack `base' before `etc'. 1997-11-10 03:57:00 +00:00
jonathan 35c15567d3 Better, more correct pipeline for usr/bin files, from Simon Burge. 1997-11-10 01:52:46 +00:00
jonathan b1def2c4bb Workaround for MI code running "/usr/bin/tar".
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.)
1997-11-10 01:07:12 +00:00
phil 0e4140c713 - lower swap size for smaller systems
- fix bug in custom partition sizes that made huge swap partition defaults
1997-11-09 16:07:56 +00:00
phil 5337c61bc4 -TODO: Remove names as they were source name rather than names of who should
do it.
-change install confirmation message to outline install process
-move english print text into msg.mi.eng.
1997-11-09 15:54:15 +00:00
jonathan b3da2a1b88 Fix target prefixing to handle both root-in-swap (traditional miniroot)
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.
1997-11-09 12:47:06 +00:00
jonathan 3b987e7971 * Add local definition of DISKLABEL_CMD to arch/i386/md.h.
* Remove default definition from disk.c.  Ports that don't support
  dislabels (e.g., amiga) can now just not define DISKLABEL_CMD.
1997-11-09 04:14:10 +00:00
mark b7fff31651 Initial commit of arm32 MD support for sysinst. 1997-11-08 02:17:16 +00:00
jonathan 5aa3e4ef06 reflect recent changes. Add more random ideas for features. 1997-11-07 14:12:27 +00:00
jonathan cb086002a9 Add annoyingly verbose comments to pmax md.c and md.h, to serve as
documentation for porting to more hosts.

Define DISKLABEL_CMD in MD code.
CAVS: ----------------------------------------------------------------------
1997-11-07 08:43:46 +00:00