Commit Graph

273 Commits

Author SHA1 Message Date
Erwin Lansing
82336c7dbb If the user did not chose a distribution from the menu, a sensible
default distribution (user) will be installed, however, no kernel
will be installed.  Fix this by installing a sensible default kernel,
SMP/GENERIC, depending on WITH_SMP and number of CPUS found.

Reviewed by:    jhb
2006-10-23 20:49:49 +00:00
Simon L. B. Nielsen
62fad4a13f Add FreeBSD version information to the menu title so it's possible to
see which release you are installing (really which FreeBSD version the
installer is running, but that shouldn't matter in all normal cases).

PR:		bin/100309
Submitted by:	Joao Barros <joao.barros@gmail.com> (original version)
Idea from:	FreeBSD ideas page
MFC after:	1 week
2006-07-15 12:23:56 +00:00
John Baldwin
9aa6ce1642 Alpha doesn't support linux ABI compat now. 2006-05-10 18:44:10 +00:00
Sam Leffler
9fe7600bbe Revamp base system packaging of kernels to enable up/smp selection
at runtime and to support distributing additional kernels:
o remove kernel from the base tarball
o add new kernel tarballs
o build + package both SMP and GENERIC kernels when an <arch>/conf/SMP
  config file is present
o add sysinstall support for multiple kernels
o update sysinstall to probe for the number of cpus on a system
  and auto-select smp/up kernel accordingly
o add a post-kernels install hook to fixup /boot/kernel
o add -ldevinfo to boot crunch for sysinstall's cpu probing logic

Notes:
1. On HEAD this code is not currently used because GENERIC kernels
   include SMP.  This work is mainly intended for RELENG_6 where the
   GENERIC kernel is UP.  If HEAD changes to match then just enable
   WITH_SMP in sysinstall/Makefile.
2. The cpu probing support is done with acpi and MPTable; this means
   some systems will require work for auto-detection to work.
3. The handling of /boot/kernel may need to be revisited; for now
   we rename one kernel at the last moment (SMP if installed, otherwise
   GENERIC).  There are other, possibly better, approaches.

Lots of help from ru, emaste, scottl, and jhb.
2006-03-08 18:02:32 +00:00
John Baldwin
9d4514b0fd Fix numerous warnings. Aside from menu items in system.c and menu.c
this now compiles on i386 with WARNS?= 3.  Most of the fixes included
adding missing 'static' keywords to internal functions, using fully-defined
terminators in statically defined arrays of structs, and various
signed vs unsigned mismatches.  Also G/C'd unused configSecurity()
function.
2006-02-28 21:49:33 +00:00
John Baldwin
d30d1cdee6 - Autogenerate a menu containing a list of countries and keymaps supported
by syscons.
- If we are running as init, popup the country menu before the main menu.
  If a non-default country is chosen, then a second menu is brought up
  to let the user choose a keymap.  By default the default keymap for
  the country that was selected is highlighted.  If the user chooses the
  default country, then the default keymap is just assumed and the user
  is not presented with the keymap menu.  Currently the default country
  is set to "United States" except for PC98 which assumes "Japan".

PR:		bin/93853
Submitted by:	Seth Kingsley sethk at magnesium dot net
MFC after:	3 days
2006-02-28 20:29:43 +00:00
Jung-uk Kim
910d8ea0aa Add `mediaOpen' function. This function mounts selected media device.
For example, you can dynamically generate and load configuration file
depending on the hardware configuration with the following template:

	mediaSetCDROM
	mediaOpen
	command='/dist/rescue/sh /dist/scripts/install.sh'
	system
	mediaClose
	configFile=/tmp/generated.cfg
	loadConfig

Now we have full access to files on the media before installation begins.
2006-01-27 21:00:31 +00:00
Ian Dowse
2e46a159cc Remove usbd(8) and all references to it. It is no longer necessary
since devd(8) now provides the same functionality.

Submitted by:	Anish Mistry
2005-12-15 01:04:51 +00:00
Yoshihiro Takahashi
819766797e Switch from OLDCARD to NEWCARD on pc98. 2005-09-27 13:10:24 +00:00
John Baldwin
d61e43fe1e - Fix a bug in sysinstall related to mounting CD-ROMs. If mount(2) fails
with EBUSY and a cdrom is not mounted at /cdrom, sysinstall fails to
  treat it as an error and thinks that the disk mounted ok.  However, it
  doesn't find a cdrom.inf file so it complains.  Later when it tries to
  unmount the disk due to a mediaClose() umount(2) returns an error, and it
  never clears its internal mounted flag.  The fix here is to properly
  handle EBUSY as an error if there isn't a CD already mounted at /cdrom.
- Add a new CDROMInitQuiet variable that can be used to shut up the dialog
  box about the mount(2) system call failing when trying to mount a CD-ROM.
  This is used by the feature described below.
- When using a fixit CD, first try to see if we can mount the disc in the
  drive now and use it as a fixit CD.  If not, then prompt the user to
  insert the disc and try again.  If we do succeed on the first "silent"
  probe then we don't ask the user to eject the disk after leaving fixit
  mode.
- Add a simple file existence test to make sure that the disc that we mount
  really is a livefs disc.
- Explicitly switch back to ttyv0 when using the standard console after
  the fixit shell dies.  Previously this behavior worked accidentally
  because all the fixit modes popped up a dialog box which contained a
  hidden switch to ttyv0.

MFC after:	1 day
2005-03-02 22:27:22 +00:00
Ken Smith
dedb9eb854 Minor comment fix.
MFC after:	1 week
2005-01-07 04:07:48 +00:00
Ken Smith
83c7f6e5de Remove support for configuring the X server from sysinstall. General
concensus seems to be that is best left for doing post-install.

Discussed on:	freebsd-current@
Tested with:	make release
Approved by:	re@
MFC after:	3 days
2004-08-30 21:03:09 +00:00
Ken Smith
83e386eb06 Initial pass at shifting sysinstall(8) to install X.org instead of XFree86.
There are still a few nits to work out (graphical config non-functional).

Patches by:	anholt@, adapted slightly
Reviewed by:	'make release'
2004-08-10 02:18:28 +00:00
Marcel Moolenaar
e66a84ac14 o Save pointers to the chunks for root, home, swap, usr, var and tmp in
global variables. On ia64, save a pointer to the efi chunk as well.
o  At the same time, change checkLabels() to define these globals instead
   of having the caller of checkLabels() pass addresses to variables for
   these. Change the two callers correspondingly.
o  Spent a bit more time adjusting try_auto_label() to prepate for having
   the EFI partition created on ia64.
o  Remove efi_mountpoint(). The EFI chunk is now available without having
   to iterate over the disks and chunks to find it every time we need it.
o  On ia64, now that the root chunk is globally available, set the
   vfs.root.mountfrom tunable in loader.conf. This avoids that one cannot
   boot into FreeBSD after an install. The kernel cannot find the root
   device without a little help...
2004-08-07 01:19:54 +00:00
Colin Percival
d37df47d31 Join the 21st century: Cryptography is no longer an optional component
of releases.  The -DNOCRYPT build option still exists for anyone who
really wants to build non-cryptographic binaries, but the "crypto"
release distribution is now part of "base", and anyone installing from a
release will get cryptographic binaries.

Approved by:	re (scottl), markm
Discussed on:	freebsd-current, in late April 2004
2004-08-06 07:27:08 +00:00
Marcel Moolenaar
498609452e Move the inclusion of libdisk.h from sysinstall.h to the source files
that actually need it. This makes it easier for a platform porter to
find the files that may need tweaking to support whatever MD specific
partitioning is needed. It also helps to prevent that the libdisk API
gets exposed and/or used where it's not needed.
2004-08-02 23:18:48 +00:00
Bruce Evans
03f0d9e8ae Fixed assorted misuses of NULL in integer context. 2004-03-11 11:58:16 +00:00
David E. O'Brien
1618a91860 s/package_exists/package_installed/g as that's much more descriptive of
what the function does.
2004-01-02 09:19:13 +00:00
David E. O'Brien
c67aadb969 FBSD nit. 2004-01-02 08:31:00 +00:00
Robert Watson
4b51d758d5 Add a Securelevel sub-menu to the Security configuration menu,
permitting the administrator to select a securelevel top operate
at.  Include a helpfile summarizing some of the information from
init(8).  This allows for explicit configuration of securelevels,
which was previously implicit in Security Profile selection.
Currently, there are no checkboxes for the active securelevel,
because sysinstall's facilities for deriving "current settings"
from rc.conf may use only one variable, not two, and I opted for
the simplest approach at this point.

Approved by:	re (scottl)
2003-11-29 21:44:51 +00:00
Robert Watson
7fba2041a7 Remove security profiles from sysinstall. Currently, security profile
selection is used to drive two configuration parameters:

(1) Default enable/disable for sshd
(2) Default enable/disable for securelevels

Replace this with an explicit choice to enable/disable sshd.  A
follow-up commit will add a configuration option to the Security
post-install configuration menu to set the securelevel in rc.conf
explicitly.  This should reduce the level of foot-shooting associated
with accidental enabling of securelevels, make the nature and
implications of the securelevel configuration options more explicit,
as well as make the choice to enable/disable sshd more explicit.

Approved by:	re (scottl)
2003-11-28 18:47:45 +00:00
Marcel Moolenaar
697defc485 o Add PART_EFI so that we can use it instead of PART_FAT on ia64
to better deal with the fact that we need an EFI partition and
   that we need to have a mountpoint for it.
o  When creating a new partition, add EFI to the list of types
   the user can select from. This makes it easy to create an EFI.
o  Do not include wizard.c on ia64.
o  The user cannot create a partition on ia64 that's a multiple of
   the cylinder size. We don't have a notion of cyclinders.
2003-11-02 08:58:57 +00:00
Marcel Moolenaar
ceeef1c666 o Do not define WITH_SYSCONS and WITH_MICE on ia64. We cannot have
a generic kernel with syscons.
o  Do not define WITH_SLICES on ia64. We only label because we're
   going to create GPT disks.
2003-11-01 20:17:11 +00:00
Dag-Erling Smørgrav
79ef1f32da Various NFS-related bug fixes (mostly related to using variable_get()
instead of variable_cmp() to test boolean rc.conf variables).

Submitted by:	hmp
2003-10-19 13:37:12 +00:00
Warner Losh
4cd54ca658 Add a new variable 'skipPCCARD'. This variable will cause sysinstall
to ignore all PC Card devices.

Submitted by: Anders Nordby
PR: bin/37650

MFC After: 2 weeks
2003-08-20 06:24:12 +00:00
David E. O'Brien
c5f8ff3aee Remove the vestiges of the old pre-"X_AS_PKG" way we used to handled the
installing XFree86 (version 3.3.6 and before).

Reviewed by:	jhb
2003-08-19 23:23:27 +00:00
Tom Rhodes
b9c3c3fc77 Give users the ability to select an alternative MTA during the installation.
This option adds Postfix and Exim to the list, however, qmail is not added
due to license restrictions.

Collaborated with:	Simon L. Nielsen <simon@nitro.dk>
Reviewed by:		jhb, re@, -audit.
2003-07-12 15:33:09 +00:00
Scott Long
acb9e0f3f6 Teach sysinstall to recognize if acpi was turned off from the bootloader,
and then ask the user if this should be made permanent.

Approved by:	re
2003-05-31 11:28:28 +00:00
Peter Wemm
5e8db10ac1 Add __amd64__ ifdefs to enable the bootblock handling code, slices, etc.
Approved by:	re (murray)
Obtained from:	obrien
2003-05-24 21:12:14 +00:00
Robert Watson
b459937e0c Throw the switch--change to UFS2 as our default file system format for
FreeBSD 5.1-RELEASE and later:

- newfs(8) will now create UFS2 file systems unless UFS1 is specifically
  requested (-O1).  To do this, I just twiddled the Oflag default.

- sysinstall(8) will now select UFS2 as the default layout for new
  file systems unless specifically requested (use '1' and '2' to change
  the file system layout in the disk labeler).  To do this, I inverted
  the ufs2 flag into a ufs1 flag, since ufs2 is now the default and
  ufs1 is the edge case.  There's a slight semantic change in the
  key behavior: '2' no longer toggles, it changes the selection to UFS2.

This is very similar to a patch David O'Brien sent me at one point, and
that I couldn't find.

Approved by:	re (telecon)
Reviewed by:	mckusick, phk, bmah
2003-04-20 14:08:05 +00:00
Robert Drehmel
47469b9f5c Remove a function prototype for `crc' and an associated comment which
were useless for at least seven years and eight months.
2003-03-09 02:28:04 +00:00
Maxim Sobolev
9434c1a30b Add a new variable `noInet6', which if set disables IPv6 configuration
dialog for network interfaces.

MFC after:	20 days
2003-02-27 21:04:34 +00:00
John W. De Boskey
f3194000cb - Increase the maximum device name length.
- Actually check that the entered device name does not exceed the
  maximum device name length.

PR:		misc/18466
MFC after:	2 weeks
2003-02-27 03:57:17 +00:00
John Baldwin
4b6c29cebc - Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists.  There are
  currently three types of dists: DT_TARBALL, the traditonal gzipped and
  split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
  the tree that has its own array of dists as its contents.  For example,
  the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
  dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
  that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
  dists to try and make the statically defined dist table in dist.c more
  readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
  and into its own distExtractTarball() function.  distExtract() now
  calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
  do the multiply prior to the divide so it doesn't have to use floating
  point.
- Axe the installPackage() function along with the special handling for
  the perl and XFree86 dists in distExtractAll() since distExtract()
  handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
  that XFree86-4 uses that as closely map to the X dists we used with
  X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
  #ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
  call it in that case anyways, and it's not suitable for the X_AS_PKG
  case.
- Add in X dist menus for the X_AS_PKG case.

Approved by:	re
2003-01-17 19:05:32 +00:00
John Baldwin
0a10e2868e Add a function driverFloppyCheck() that asks the user if they would like to
load drivers from the driver floppy if the "driver_floppy" variable is set
in the kernel environment and call this function after probing devices but
before displaying the main menu.

X-MFC after:	as soon as I finish committing to current
Approved by:	re@ (blanket)
2003-01-15 21:47:36 +00:00
Scott Long
9335d6884c Teach sysinstall about rpcbind, rpc.lockd, and rpc.statd. As an added
bonus, rpcbind will be enabled automatically if rpc.lockd, rpc.statd, amd,
NFS Server, or NIS is enabled.
2003-01-07 07:46:50 +00:00
Robert Watson
bf1e70b230 Reformulate how sysinstall handles file system options in the label
editor, in order to support specifying UFS2 as a newfs option.

(1) Support three different newfs types: NEWFS_UFS, NEWFS_MSDOS, and
    NEWFS_CUSTOM.  Don't mix up the arguments to them: you can't use
    soft updates on an msdos file system.

(2) Distinguish adding new arguments to the newfs command line from
    replacing it.  Permit the addition of new arguments by the user for
    NEWFS_UFS.  If we entirely replace the command line provided by
    sysinstall, call it NEWFS_CUSTOM.  'N' will now add additional
    arguments; 'Z' will opt to replace the newfs command line entirely,
    but will prompt the user with their current command line as a
    starting point.

(3) Construct the newfs command line dynamically based on the options
    provided by the user at label-time.  Right now, this means selecting
    UFS1 vs. UFS2, and the soft updates flag.  Drop in some variables
    to support ACLs and MAC Multilabel in the future also, but don't
    expose them now.

This provides sysinstall with the ability to do more "in band" editing
of the newfs command line, so we can provide more support for the user,
but doesn't sacrifice the ability to entirely specify the newfs command
line of the user is willing to give up on the cushiness factor.  It
also makes it easier for us to specify defaults in the future, and
define conditional behavior based on user configuration selections.
For now, we default to UFS1, and permit UFS2 to be used as the root
only on non-i386 systems.

While I was there, I dropped the default fragment and block sizes,
since newfs has much more sensible defaults now.

Reviewed by:	jhb, marcel
Approved by:	re
ia64 bits from:	marcel
2002-12-03 22:25:47 +00:00
John Baldwin
544cd27071 Rename installX11package() to installPackage() and tweak it so that it
can be used to install any arbitrary package.

Approved by:	re
2002-12-03 19:36:12 +00:00
Marcel Moolenaar
7e8dbd8b20 ia64 specific.
o  Mount the EFI file system as msdosfs and not ufs as it's a FAT
   file system. Introduce Mount_msdos() for this to go side-by-side
   with Mount().
o  Also, since mounting is performed as a command (which means it's
   queued, sorted, lost, found and executed), we cannot create a
   directory on the file system by calling mkdir. We must make sure
   the mkdir happens after the mount. Introduce Mkdir_command() to
   allow mkdir operations to be queued, sorted, lost, found and
   executed as well.

Approved by: re (jhb, rwatson)
2002-12-02 20:15:16 +00:00
John Baldwin
52c113d540 - Only declare the MBR menu for i386 that is not PC98.
- Only declare mouse menus if WITH_MICE.
- Only declare syscons menus if WITH_SYSCONS.
- Only declare fdisk editor functions if WITH_SLICES.

Approved by:	re
2002-11-27 19:58:57 +00:00
John Baldwin
8e5bc72116 - Add a configOSF1() function (#ifdef __alpha__) that creates /compat/osf1
in addition to setting osf1_enable to YES.
- Only define configLinux() #ifdef WITH_LINUX.

Approved by:	re
2002-11-27 19:37:00 +00:00
John Baldwin
75cd8b4038 Add some helper macros to make #ifdef's in sysinstall easier to read
and more maintainable.
- WITH_SYSCONS: defined on all arch's that support syscons (currently i386,
  alpha, and ia64)
- WITH_MICE: defined on all arch's that support moused(8) (currently i386,
  alpha, and ia64)
- WITH_SLICES: defined on all arch's that use disk slices (currently i386
  and ia64)
- WITH_LINUX: defined on all arch's that support Linux binary compat
  (currently i386 and alpha)

Approved by:	re
2002-11-27 19:30:50 +00:00
John Baldwin
6fe0921bc4 Expand X_AS_PKG so that we don't declare distribution bitmasks or menus
for the X distributions if X_AS_PKG is defined.

Tested on:	i386
Approved by:	re
2002-11-27 18:36:30 +00:00
Yoshihiro Takahashi
676777ed92 - Added the MenuIPLType menu for selecting pc98 boot IPL.
- Disabled 'Syscons, Font', 'Syscons, Screenmap' and 'Syscons, Ttys' menus
  on pc98.
- Fixed the MenuMouseType and MenuMousePort menus for pc98.
- Fixed some comments for pc98.
2002-11-03 10:06:22 +00:00
Makoto Matsushita
9c499b692a Since NEWCARD is the default for i386, undef PCCARD_ARCH.
pccard.c is no longer needed for i386 also.

OKed by: imp, nyan
2002-10-20 11:16:41 +00:00
Makoto Matsushita
b1e41adda4 Add 'Sendmail' menu to set sendmail_enable variable.
Reviewed by:	bmah (description only)
2002-06-01 14:50:14 +00:00
John Baldwin
df349781bf Add a 'diskInteractive' variable that can be set to interactively partition
and label a disk from a sysinstall script.
2002-05-31 13:38:17 +00:00
David E. O'Brien
ee1c407b54 Add the ability to use Bzip'ed packages.
Also add the ability to use Bzip'ed distributions -- but this is exclusive
of being able to use Gzip'ed distributions.

Sponsored by:	FreeBSD Mall, Inc.
2002-04-30 22:40:06 +00:00
Murray Stokely
dd5650233b Add the concept of a volume to the device and package structures. If
these values are different for a given package, then we must prompt
the user to insert another disc before the package can be installed.
2002-04-13 12:43:07 +00:00
Murray Stokely
76494611d2 GCC >= 3 and C99 handle zero-length arrays differently than older
versions of GCC.  With this change, sysinstall compiles and works fine
with GCC 3.1 or 2.95.
2002-04-07 10:27:24 +00:00