Subject: sysinst changes
To: None <tech-install@NetBSD.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-install
Date: 04/13/1999 23:00:20
Hi,
those following sources-changes will have noticed I have done a buch of
changes to sysinst (not yet in the 1.4 branch). I'll explain here what these
changes do.
- I've been trying to solve the corrupted display problems. I've done this
by adding explicits wclear(stdscr); wrefresh(stdscr); at various places
(I may have missed some). However I didn't find the cause of the problem.
When sysinst is used in an xterm, or from a wscons display in vt100/vt220
(25 or 50 lines mode) or sun emulation, it works perfectly fine.
I wonder if these display problem can be a bug in the pc console
driver, or in the pc3 termcap entry (some lines are not cleared
properly, but there are also unexpected new lines).
- in the main do_install() function, make all function used here return an
error code, and abort install if a function fail. It is bogus to continue
install if one of the critical step obviously failed. This needed a lot of
prototype changes, and some more error messages in the message catalog.
I found it easier to print failure messages from run_prog(), so the
message to be printed in case of failure is passed as parameter.
If parameter is NULL, then no message is printed.
- The rounding problems when the users gets in the partitions.
I centralised the parameters aquisitions in 2 functions,
getpartoff()/getpartsize(), which will do the needed alignements and
roundups. Ensure that the end of the parititon is aligned to a cylinder
boundary, and not the size, because it may not start on a cylinder
boundary. This also allows to kill the swapadj hack, which only worked
for full-disk installs on i386.
- as partitions parameters aquisitions are now centralised, we can
allow the user to enter numbers in any units, with a M/c/s at the end.
- fix a problem in mbr.c, where an partition table with 2 actives partitions
could have been written to disk.
- on i386, don't propose defaults that don't fit on the disk.
- in run_prog() don't wait for the user to press enter if the command
succeded. As well, ask the user if he wants to extract the sets verbosly
before getting the sets. Now ftp/set extract can be run in a whole
batch without user intervention.
- before extracting a set, look for a file /dist/<set>_obsolete which should
contain a list of obsoletes files to be removed before this set is installed
(absolute path names, lines not starting with '/' are ignored).
files are unlink()'d first, them directories are rmdir()'d (files are
lstat()'d before to know their status and build the list of files to
remove). If a directory can't be removed because it's not empty, it is
renamed instead. This shouln'd happen unless the file list is wrong, or there
were non-NetBSD files in this directory.
This allows upgrades on i386 to work again (include/i386 and include/machine
need to be removed now, or pax will fail because of a directory->symlink
change).
I don't think I missed anything :)
i386 boot floppies with this version of sysinst can be found in
ftp://ftp.netbsd.org/pub/NetBSD/arch/i386/1.4-install
If you try it, please report me any problems.
These changes may have break something for non-i386 port, and unfortunably
I can't test them. I hope we will be able to pull up these changes before
1.4-BETA starts, however.
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
--