enabling and disabling swap. Enabling swap is currently only
done by the i386 port on systems with <= 8M of physical memory.
If a user re-enters the install procedure through the main menu,
and the target disk has an active swap partition, try to disable it,
warning the user that this might lead to 'out of swap' problems,
making a restart necessary. This should not happen very often.
Partly based on comments by Simon Burge.
'rc_configured' is still changed via sed's s///, wscons=yes is appended
via "echo >>".
* make target-routines (target_expand(), and whatnot) work if no root
disk was selected. With this, sysinst can now be used on a "normal"
system to adjust the system's timezone. Use the entry in the "Utilities"
menu for that.
Both changes were tested by a full i386 installation.
overwrite anything important. (The moving down hides some elements
of the selection box, but we can scroll).
Took some digging to find out that aparently all selection boxes default
to a upper row of 12 and some more digging on how to change it.
orts. Since port specific information is in appropriate arch/.../md.h
bsddisklabel.c is currently #included by arch/.../md.c.
I'm not totally happy about this, but my concience is somewhat salved by the
overall reduction in breakage.
Initially only pmax, sparc, vax and x68k are using bsddisklabel.c.
While I'm here adjust defs.h for more than eight partitions in a generic
fashion.
partitions under any circumstances, allow no swap, do not *overwrite* /usr
when listing additional partitions, and try to abstract at least most of the
magic numbers to #defines at the top.
Also sync up as much as possible to make this easier in future.
Still need to attack the other arch's md.c files.
Fixed PR#7741
If the default swap is smaller than the remaining disk, truncate to the
available space.
Set rc_configured to YES in md_cleanup_install()
screen as XXX. Where they were not followed by wclear(stdscr), add
wclear(stdscr). Somebody was let out without adult supervision. If i
were more adventurous, i'd remove the bits that output 'CL', but i'm not
gonna go there right now.
read/write that much. Previously, too much was written back to
disk (although it didn't do any harm because of the sequence
of execution).
Also, upgrade the MBR type from 386bsd -> NetBSD if needed during
an upgrade operation.
Check if there's no active partition after MBR editing.
Ask for own MBR to be installed if we're booting from out of CHS range.
Ask for bootselector to be installed if > 1 OS, and configure it.
- in run_prog(), do an explicit wclear(stdscr); wrefresh(stdscr);
before launching subwindows. This seems to solve all the display
problems associated with run_prog().
enter partitions offet and size. The user can chose unit independantly of
the unit used for display ('M'/'c'/'s'). These functions do the proper
bound checks and alignement/roudups. Used in the edfspart menu and
i386 md_make_bsd_partitions() (other ports should do the change as
well).
- now that getpartsize() does the rigth thing, kill the swapadj hack (which was
buggy anyway).
- in i386 md_make_bsd_partitions(), don't propose defaults that don't fit on
the disk. If the disk is too small, fallback to custom instead.
- fix a bug in mbr.c, where the partition flags would not have always been
reset. sysinst created me a MBR with 2 active partition. The boot code
doesn't like it :)
- added a message for eventual mount failures.
- killed donewfs and extracting messages, as we run the commands in a
subwindow these messages just flashed on the screen.
- Changes a few exit(1) to return(1), to give the user a second chance.
- added msg_clear() or wclear(stdscr) in a place or two, to make
display a bit nicer.
- in run_cmd(), if the command succeeded, don't wait for the user to
press enter.
- Make all the functions called from do_install() return an error code,
so that we can abort install if something went wrong.
- Add a 'errstr' argument to run_prog(), which if not NULL is displayed
with msg_printf() and followed by process_menu(MENU_ok) if the command fail.
Used to warn the user that the current action is aborted.
- in a few places use msg_display() or msg_printf() rather than printf.
It seems that stdout/stderr are not always pointing to the active curses
window.
- garbage-collecd unused messages, add a few new one (error handling).
XXX only tested on i386. Other md parts should be tested as well.
* Use structures, not 2-dimensional arrays..
* Use the DIOCGDEFLABEL ioctl to get the disk information,
to avoid confusion with (older) labels.
* Don't ever call fdisk for partitioning. This was the
source of much confusion.
* For the i386, use the BIOS geometry information passed by
the bootblocks.
Lots of things left to do, but it's a start.
commandlines for all tar operations. (work supplied by Matt Green)
2) Update arch/*/md.c to deal with new sysinst/run.c. Special case
anything that needs to do a redirect or a pipe.
3) #if 0 some unused code in target.c. This code will need to be updated,
or special cased with do_system.
Big thank you to Matt for all his work on this.
Scripting and logging functionality for sysinst.
Child programs are run in a "display window" so you can actually see what
they did before the screen flashes back and you loose it all.
Lots of curses fixups. Removed nasty endwins that mangled the tty upon
rentry.
Change the yes/no box to accept Y or N, and not require cursor motion to
decide one or the other.
Perform curses redraws when doing things that could cause the kernel to
spew printfs onto your screen.
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 */
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.
* 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.
* 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.
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.
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.)
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.
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.