Commit Graph

239 Commits

Author SHA1 Message Date
ross ccc17f86dd g/c debug rule 1998-10-08 01:08:24 +00:00
ross e462ec8f09 Simplify the SRCDIR comment. 1998-10-08 00:44:16 +00:00
mark 0220416488 Miscellaneous maintainance and debugging.
Fix several size / offset calculation errors.
Make some of the default partition sizes more realistic.
1998-10-06 01:43:12 +00:00
mark 0402c9b7d8 Add T_FILECORE to the DTYPE enum.
Add filecore to the fstype array.
1998-10-06 01:37:17 +00:00
phil 51fbe5aee3 Fix class c netmask. 1998-09-17 16:45:36 +00:00
phil 5807dd11b1 Comments added/modified to clarify how txtwalk works. 1998-09-17 05:57:28 +00:00
phil 3330188abd 1.3 has long since come and gone, update some entries, add a couple. 1998-09-17 04:11:54 +00:00
mrg a93789ab6a add a "ta=4.2BSD" to disktab. fixing choosing X sets to install. 1998-08-30 09:08:52 +00:00
perry e31adf91d8 bzero->memset 1998-08-10 02:23:45 +00:00
perry 4900e681b0 bcmp->memcmp 1998-08-10 02:22:30 +00:00
hubertf bc66f03729 /route/s/-f/flush/ 1998-08-05 07:44:58 +00:00
lukem aa02ec494a link with -lutil for fparseln(). noted by jim bernard in bin/5895 1998-08-02 03:17:21 +00:00
tsubai 04e0026f9b Add md part of sysinst. 1998-07-29 05:41:55 +00:00
rvb a3d43525ee Fix BIOS GEOMETRY menu 1998-07-21 14:53:36 +00:00
mrg 32f519716b - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- 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
1998-07-06 06:56:06 +00:00
mrg 58e5e70a16 remove bogus unnecessary "NetBSD-X.Y" directory from cdrom path; it will not exist for future cdroms 1998-06-22 12:18:52 +00:00
mrg d1b0d1b602 KNF. 1998-06-20 13:05:48 +00:00
mrg 3e6e1c5a04 KNF, and don't copy filesystem. 1998-06-20 12:46:00 +00:00
mrg 8eff781723 add my zlib-based gzip for installs. 1998-06-06 06:11:19 +00:00
mrg 5725ca5157 initial sysinst support for the sparc, based on the alpha stuff. not heavily tested. 1998-06-06 05:34:00 +00:00
lukem 86d96336f3 spell successfully correctly 1998-06-02 14:14:46 +00:00
fvdl 4cefa17401 Forgot this in previous. 1998-05-15 15:19:25 +00:00
fvdl f998547470 Add MD cleanup function to do some thingd once the install is done.
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.
1998-05-15 15:12:29 +00:00
ross f7a658d062 The 3/29 rewrite broke floppy builds, so add back a (different)
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.
1998-05-03 16:50:25 +00:00
ross 25df7fccdd Build x_sh, even though some non-sysinst ports don't use it. Yet. 1998-05-02 08:04:52 +00:00
fair c4b0f47514 fix mdoc references and .Nm usage 1998-04-28 18:17:33 +00:00
lukem d3ecec520c use CPPFLAGS not CFLAGS 1998-04-13 14:10:05 +00:00
christos 1820947a9f Simplify so that this works. 1998-03-29 09:22:06 +00:00
thorpej 7eed6ad8d8 Bring in bsd.own.mk to get the definition of BSDSRCDIR before checking
to see if it's defined.
1998-03-19 00:08:25 +00:00
cgd f45dd19e06 note that only static compilation makes sense here 1998-03-02 19:50:53 +00:00
phil 8668166c18 Make sure fdisk gets told the proper BIOS geometry on every
execution of fdisk.  Otherwise we loose big time.  Should close
PR 5052.
1998-02-27 21:30:09 +00:00
phil 84c669fc44 Make the CDROM default path be .../NetBSD-<rel>/<machine>/binary/sets
as specified in release(7) for the ftp site.  This is because I'm
assuming that the CDROM would just be a copy of the ftp site minus
duplication.
1998-02-25 05:26:37 +00:00
jonathan 1483395dbe Move DOS BIOS-geometry and MBR-handling code to MI code for powerpc, arc:
* 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.
1998-02-24 05:36:03 +00:00
jonathan 1cfa173f7c Add symbolic names for new NetBSD MBR partition ID and for Linux. 1998-02-24 04:32:22 +00:00
jonathan 0ed9642fe0 Add menu entries to md_distcustom for installing X11 sets
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.
1998-02-23 22:55:09 +00:00
phil eaeadf7187 Take 3! Added prototypes instead of including defs.h. Compiles now
cleanly both with sysinst and standalone away from sysinst.
1998-02-20 07:43:52 +00:00
jonathan 98b0f2b8ad * Prune default CD path from "/Release/NetBSD/NetBSD-" back to "/NetBSD-".
* 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.
1998-02-20 02:33:51 +00:00
jonathan 2ce5d64f35 Pull up fixes for coment typos, punctuation, and (partial,inconsistent) KNF
from sysinst/arch/alpha/md.c.
1998-02-20 01:53:59 +00:00
jonathan 317aef44f1 Undo the include cleanups of previous revision. Fixes missing
prototypes when compiling into sysinst, rather than standalone testing.
1998-02-20 01:40:53 +00:00
jonathan 95eae8964b Remove comment references to /mnt: some ports support upgrading while
running from the target root.
1998-02-20 00:37:17 +00:00
phil a7a3b90218 Clean up the includes, make it work as an independent program better,
add a loop in the main to factor all command line parameters.
1998-02-19 19:38:39 +00:00
phil a924a02bc1 Make the primes generation go to the true square root of parameter
max.  (Pointed out by jb@dilbert.apo.nmsu.edu (Jon Brinkmann) on
usenet.)
1998-02-19 18:37:58 +00:00
thorpej 69c0c710e5 Fix some printfs and prototypes. 1998-02-09 07:40:15 +00:00
thorpej fee167dd96 Needs <time.h> 1998-02-09 07:34:16 +00:00
phil c39e6b7b4f Moved selection of distribution sets to before selection of distribution
medium.
1998-02-09 07:03:38 +00:00
phil 4b083bc3ac Ask for custom/full and select distribution files before selecting
distribution medium.  Makes ftp fetch only needed files.
1998-02-09 06:55:27 +00:00
jonathan b59abe7c80 Set hostname (via sethostname()) after configuring network.
Save hostname in /etc/myname when saving networkg config.
From Nathan J. Williams <nathanw@mit.edu> in PR bin/4781.
1998-02-07 10:28:02 +00:00
jonathan 005abca7c5 Fix typo in table of files to check for in target. Found by Phil Nelson. 1998-02-07 09:32:32 +00:00
christos e3fbe7d27f Warnsify, remove register declarations and -lcompat 1998-02-04 11:08:37 +00:00
thorpej bf64e85e53 XXX No xserver set for now. 1998-02-01 02:11:01 +00:00
thorpej 6aed8140af Oops, fix a few stray "arm32"s.. (Guess where I copied these files from? :-) 1998-01-31 22:30:09 +00:00
thorpej ff2548ba56 First-cut at Alpha support in sysinst. 1998-01-31 22:28:33 +00:00
perry 4a5428be69 RCS Id Police. 1998-01-09 18:56:42 +00:00
perry 3fe138c146 RCS Id Police. 1998-01-09 08:03:16 +00:00
fvdl 9630119c6d * mount NFS directory to get the sets from read-only,
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)
1997-12-26 01:58:44 +00:00
fvdl 0eecf02c79 Fix naming of split sets to be loaded from floppy. From Christoph Badura. 1997-12-25 17:54:41 +00:00
matthias 675f5874b0 - call bim to install the boot program on the disk
- define DISKLABEL_CMD to make sysinst label the disk
1997-12-25 09:10:48 +00:00
cjs a85a1c039c Initialise the array primes at run-time rather than compile time
so it's put in bss rather than data. Saves 38K or so. :-) (Well,
only 125 bytes or so after commpression.)
1997-12-20 23:47:02 +00:00
fvdl e139ac966d Be sure to clear the screen after the fscks in the re-install option. 1997-12-19 00:57:56 +00:00
fvdl 1188ad336b Copy a temporary termcap file onto the harddisk for sysinst's convenience.
Enables sysinst to be run from the harddisk itself as well (PCMCIA workaround).
1997-12-19 00:57:18 +00:00
fvdl 65295d9fb4 Fix typo that made label overlap check unreliable. 1997-12-18 11:54:11 +00:00
phil 9ebbc533c7 Make sure last extension of split files matches BETA release.
(misc .ai -> .aj)
1997-12-16 01:13:58 +00:00
bouyer 4f685d31cb Sync with .eng. 1997-12-15 13:19:47 +00:00
fvdl 71e91aafda Add option to check for BIOS < 1024 root partition size limit, and
enable the user to re-edit things in case it fails.
1997-12-15 00:43:57 +00:00
gwr 6536ca4e3e On the m68k, compile ramdisk stuff with -msoft-float
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.
1997-12-12 23:26:29 +00:00
jonathan 3c0420c31a Commit change from Dec 6 discussion on current_users:
use example rc.conf lines for setting rc_configured.
1997-12-12 22:26:32 +00:00
gwr ef111cbc49 Add: more x_ftp x_route zcat 1997-12-12 03:38:30 +00:00
gwr 727536cab0 Add getnet.c 1997-12-12 03:36:38 +00:00
gwr 637548c0c9 Add NOMAN=1 1997-12-12 03:34:39 +00:00
gwr 717a6b07a9 Keep getnetbyname from pulling in the resolver. 1997-12-12 03:05:59 +00:00
fvdl 5325d6d716 Mark partition as 'set' when changing the type. 1997-12-11 02:02:22 +00:00
fvdl 385f01a1ad Mark partitions as 'set' when changing the type, otherwise the change
will get lost if you only change the type.
1997-12-11 01:36:22 +00:00
bouyer 36ddb1973c Fix some line overflow. 1997-12-10 10:38:15 +00:00
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