Commit Graph

995 Commits

Author SHA1 Message Date
martin eb3f00e1e9 When upgrading an old system, install new bootblocks too.
Fixes PR port-sparc64/17204.
2003-12-10 19:42:51 +00:00
agc 7db1d33cba Modify the licences of code written by Theo De Raadt from a 4-clause
to a 2-clause licence (retaining UCB clauses (1) and (2)), per PR
22409 from Joel Baker, approved by Theo de Raadt, and ratified by
myself - the only discrepancy being the handling of the original
clause 3 in src/usr.sbin/yppoll/yppoll.c.
2003-12-10 12:06:25 +00:00
lukem 388cd3a59c use ${.CURDIR:T} instead of ${.OBJDIR:T}, per similar change in bsd.own.mk 2003-12-01 01:11:57 +00:00
dsl 31d8f670de - Change enum for partition numbers from [A..Z] to PART_[A..P] (16 is enough)
- Rename run_prog() to run_program() and remove the 'errmsg' argument (almost
  never used).
- Be consistent about #define<space> in defs.h
- Allow BSDFFS partitions to be FFSv1 or FFSv2 (fixes PR install/23547)
- i386: install correct bootblocks for root filesystem type.
- Do 'fsck -p' before all mounts (but never a full fsck), rename fsck_xxx()
  to mount_xxx() and remove some wrapper functions.
- Allow root to be an APPLEUFS partition - and allow them to be newfsed,
  should fix PR install/23198
- Redo fstab processing for upgrade to avoid large static data items and
  memory leaks.  Change walk() to abort on user defined error.
  (the fstab stuff really needs more work though...)
- i386: 'Warp' cursor to alternate option when selecting console/bootblocks,
  should fix PR port-i386/23546.
- Allow MENU_ok and MENU_yesno to take user defined title.
- Ensure that mountpoint not defined for swap (and similar issues) when
  editing netbsd label.
- Tweaks to error handling in run_program(), allow user to say that errors
  are expected or that the display shouldn't be cleared before returning.
- Remove some old code that has been festering under #if 0
2003-11-30 14:36:43 +00:00
dsl 2726af786f When rounding a partition to end on a cylinder boundary, round the start
down to a cylinder boundary before adding in the requested size.
Stops the partition being one cylinder larger than requested when the
partition doesn't start at the beginning of a cylinder (eg for partitions
starting in sector 63).
Fixes part of PR install/23548
2003-11-27 21:43:22 +00:00
dsl 6750190db8 Add some progress messages for MAKEVERBOSE == 1
Tweak dependency rules for (menu|msg)_defs.h so that everything isn't
recompiled if the xxx_def file has changed but the generated header
is unaffected.
2003-11-20 13:13:38 +00:00
dsl b528ce0e0b Don't take the size of an mfs /tmp off the free disk space,
nor count a partition for it.
(Maybe the size of /tmp should be capped by that of swap.)
2003-11-20 09:47:53 +00:00
dsl 3cbf1bc2e1 ping generates output, don't wait for user to acknowledge it. 2003-11-19 00:16:49 +00:00
sekiya 1cc0ebce1f A few sysinst fixes:
* use cd0a rather than cd0[cd] as the CDROM installation device.
	  This fixes problems with platforms that install from iso9660 images
	  encapsulated in a partition, and should not affect platforms that
	  don't.
	* add RUN_PROGRESS to the run_prog() flags for ftp installs.

Okay'ed by David Laight.
2003-11-15 12:53:34 +00:00
sekiya 32b29fc3c8 Use new bootloader names. 2003-11-13 08:03:03 +00:00
sekiya 96dd3017c1 Adapt to new config file naming convention. 2003-11-13 02:33:39 +00:00
dsl 5815f1a577 Line up 'Command' and 'Status' strings,
ensure command text doesn't overflow line.
2003-11-11 17:27:13 +00:00
dsl 6a3a05223d Use [*] to match an explicit '*' in shell pattern matches. 2003-11-11 17:25:45 +00:00
perry cd932bc689 resolv.conf:
Make sure that there is a domain set before printing a "search" line.
hosts:
Add domain to the second "localhost" line if there is a domain set.
Add domain to hostname (in addition to bare version) if there is a
domain set.

Patches from William Simpson, PR 21999
2003-11-04 16:27:22 +00:00
perry 8b72ff67e9 rc.conf's "hostname" variable needs to be fully qualified -- change
the code so that it is. From William Simpson in PR 22044
2003-11-04 01:53:28 +00:00
dsl 111e24b1c9 Use shell variables for non-alphanumeric patterns in ${x#pattern} to improve
portability.  If particular solaris ksh barfs on patterns containing ( and ).
Fixes PR 23265
2003-10-29 09:13:51 +00:00
lukem f85d2d1c14 Use ${HOST_SH} instead of `sh'.
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
2003-10-26 07:25:33 +00:00
agc c61c0de641 Fix integer/NULL confusion. 2003-10-21 12:02:32 +00:00
dsl 1becc89246 Change RC_CONFIGURED from NO to YES (not YES to NO). 2003-10-19 20:45:27 +00:00
dsl 7ef7a3f227 Checkpoint a load of changes - seems to work ok still.
- rework run_prog() so that the program name (etc) is usually displayed if
  the program generates any output, or terminates with an error.
  Allow arguments to included in single quotes.
  Try to collect console output so it doesn't interfere with curses.
- Add a '*' to the cylinder count if non-integral number of cylinders
  (on disklabel editor)
- Only show partition type for unused partitions.
- Show size including unused space on '+' partition, remove a..z since
  the don't relate to partition IDs (netbsd partition sizes)
- Fix deleting of 'user' partitions - killed size of next ptn.
- Don't default a swap partition is the disk already has one.
- Fix deleting of extended MBR partitions - changed size of ptn 2.
- Show error message if user tries something illegal in mbr editor.
- Default to old diskname (actually disk type - dunno why!)
- Use MI enable_rc_conf() to set RC_CONFIGURED=YES, use a single sed
  command instead of a raft of code playing with files etc.
- Float some menus to just below header text, saves counting and lets
  language variants have different height headers (use y=-1)
- Track whether anything is mounted on /mnt2 better.
- Put more texts into message file.
- Change english prose texts to be more correct.
- Stop french and polish versions core dumping if ptn start/size changed.
- Fix processing logic for saving /etc (action is still borked)
- Do tail-end setup if any sets (eg X) can't be found (but not if you give
  in (yet)).
2003-10-19 20:17:31 +00:00
fvdl 627c2abc03 Remove the 'toolchain' set, since everything is in-tree now. 2003-10-18 14:17:00 +00:00
sekiya 4762dcf39b Bring the sgimips MD code into sync with the rest of the ports. 2003-10-17 10:58:16 +00:00
agc 9f1aac5bb3 Move Jason Downs's code from a 4-clause to a 3-clause licence by
removing the advertising clause.  Diffs provided in PR 22410 by Joel
Baker, confirmed to the board by Jason Downs.

With additional thanks to Jason Thorpe.
2003-10-13 15:36:33 +00:00
agc 61470ee029 Move Mark Nudelman's code from a 4-clause to a 3-clause licence by removing
the advertising clause. Diffs provided in PR 22549 by Joel Baker, confirmed
to the board by Mark Nudelman.
2003-10-13 14:34:25 +00:00
lukem 1c33b4e6a4 Overhaul MBR handling (part 1):
<sys/bootblock.h>:
    *	Added definitions for the Master Boot Record (MBR) used by
	a variety of systems (primarily i386), including the format
	of the BIOS Parameter Block (BPB).
	This information was cribbed from a variety of sources
	including <sys/disklabel_mbr.h> which this is a superset of.

	As part of this, some data structure elements and #defines
	were renamed to be more "namespace friendly" and consistent
	with other bootblocks and MBR documentation.
	Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
    *	Deprecated in favor of <sys/bootblock.h> (the latter is more
	"host tool" friendly).

amd64 & i386:
    *	Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
	be consistent with the naming convention of the msdosfs tools.

    *	Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
	and it's confusing to have two functionally equivalent bootblocks,
	especially given that "ufs" has multiple meanings (it could be
	a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

    *	Rework pbr.S (the first sector of bootxx_*):
	    +	Ensure that BPB (bytes 11..89) and the partition table
		(bytes 446..509) do not contain code.
	    +	Add support for booting from FAT partitions if BOOT_FROM_FAT
		is defined.  (Only set for bootxx_msdos).
	    +	Remove "dummy" partition 3; if people want to installboot(8)
		these to the start of the disk they can use fdisk(8) to
		create a real MBR partition table...
	    +	Compile with TERSE_ERROR so it fits because of the above.
		Whilst this is less user friendly, I feel it's important
		to have a valid partition table and BPB in the MBR/PBR.

    *	Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
	with other platforms.

    *	Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
    	we can boot off FAT partitions.

    *	Crank version of /usr/mdec/boot to 3.1, and fix some of the other
	entries in the version file.

installboot(8) (i386):
    *	Read the existing MBR of the filesystem and retain the BIOS
    	Parameter Block (BPB) in bytes 11..89 and the MBR partition
	table in bytes 446..509.  (Previously installboot(8) would
	trash those two sections of the MBR.)

mbrlabel(8):
    *	Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
	to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
2003-10-08 04:25:43 +00:00
dsl 98b66fc660 Use new kern.root_partition sysctl to find out whether we are installing
over the current root (ie the one we are booted from).
Remove all the stuff that tried to find this out by other means.
A few other message changes.
2003-09-27 10:47:17 +00:00
dsl 070457d605 Use installboot (not disklabel) to make disk bootable (untested). 2003-09-27 10:44:03 +00:00
dsl c268192676 make main menu sit below initial text. 2003-09-27 10:42:16 +00:00
dsl 3322ced37b Make partition menu sit just below header (regardless of header size).
Change flag for bootmenu default from 'b' to 'd'.
2003-09-27 10:39:35 +00:00
dsl df047cb827 Just convert \r\n to \n\r when relaying program output.
Ensure we never write an undefined error message.
Remove support for RUN_SYSTEM - it isn't used and there are too many paths
through this code....
2003-09-27 10:38:05 +00:00
dsl a6c235d09a Include '+' in default for partition size.
If partition size input as '+', treat as 1 cylinder and '+'.
Set default sized /usr if all space can't be given to root.
2003-09-27 10:16:33 +00:00
takemura 8260617c99 Fixed alignment of call by reference arguments. This change solves unalignement
access and segmentation fault problem on MIPS architecture.
2003-09-21 02:30:18 +00:00
takemura 191a44adea Remove unnecessary mbr_buf.S. Type of global variable 'mbr' was changed and
allocated in main.c since 7/2003. This change resolves some unaligned access
problems.
2003-09-21 02:23:55 +00:00
dsl d421676fae Put fs type back into bintall command line. 2003-09-20 20:55:34 +00:00
dsl e1f4ec62b8 Fix a few arch/md.c to use targetroot_mnt instead of "/mnt". 2003-09-20 15:40:41 +00:00
martin 604a0dda0c No need to special-case sparc64 any longer. 2003-09-19 16:29:21 +00:00
fvdl 42dd9f2673 Define SET_KERNEL_GENERIC. 2003-08-31 16:53:03 +00:00
fvdl 9aa3a44add Use get_bootmodel in amd64 after all, but have it return GENERIC all
the time, otherwise we're left without an installed kernel.
2003-08-31 16:41:53 +00:00
dsl ca995a5145 fix incomplete $id$, delete clause 3 2003-08-30 21:54:42 +00:00
fvdl f921290437 * get_bootmodel doesn't exist on amd64, so don't use it in that case.
* use a size_t for the length argument to sysctl(), not an int
2003-08-30 17:12:49 +00:00
dsl a8f1b6c6be Move definition of PART_USR to md.h where it has a chance of having some effect. 2003-08-30 13:53:28 +00:00
lukem 668e6c5574 s/exitisting/existing/ 2003-08-27 16:00:30 +00:00
dsl 41fc0f3e23 No need to build sysinstmsgs.en (they are compiled into the program).
(I'd failed to persuade make to do this before...)
2003-08-27 10:23:53 +00:00
dsl b969d59ce5 make sysinst compile for amd64 2003-08-19 17:25:49 +00:00
dsl b0559c2322 Add some trailing spaces to force line breaks. 2003-08-19 14:33:16 +00:00
dsl b2fa78b58e Let noexec, nodev and nosuid be written to /ets fstab entries
Always use 1023 cylinders in mbr for large disks
2003-08-10 14:51:48 +00:00
mrg fa688653a3 return type of sizeof() is size_t not long. 2003-08-10 08:28:09 +00:00
mrg b90813089d avoid gcc3 cpp lossage. 2003-08-10 08:26:38 +00:00
dsl fe536754c3 Allow user to shoot themselves in the foot by specifing a non-standard
'average bytes per inode' for each partition.
Fixes PR install/8509
2003-08-09 21:36:26 +00:00
dsl 144c38f82d Don't delete \r that aren't followed by '\n' when relaying program output.
Needed to get progress bar displayed correctly.
Kill a level of indent to get some coding space.
2003-08-09 19:26:38 +00:00