summaryrefslogtreecommitdiff
path: root/usr.sbin/sade/install.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace sade the extracted piece of sysinstall with sade the extractedNathan Whitehorn2012-12-301-249/+0
| | | | | | | | | | | piece of bsdinstall (although this time with a symlink instead of duplicated source code). Discussed on: freebsd-geom MFC after: 3 months Notes: svn path=/head/; revision=244859
* In usr.sbin/sade/install.c and usr.sbin/sade/label.c, fix a few warningsDimitry Andric2011-12-181-2/+2
| | | | | | | | | about format strings not being literals. MFC after: 1 week Notes: svn path=/head/; revision=228682
* Port to new libdialog.Max Khon2011-11-241-3/+4
| | | | Notes: svn path=/head/; revision=227944
* Disk selection dialog is now a normal menu, not a checkboxed menu:Max Khon2011-11-241-74/+65
| | | | | | | | checkboxed menu is confusing and also can not be implemented in new libdialog. Notes: svn path=/head/; revision=227939
* Partitions are only meaningful for i386 and amd64 architectures, so disableXin LI2006-08-081-4/+0
| | | | | | | these code on other architectures. Notes: svn path=/head/; revision=161100
* Make sade(8) WARNS=3 clean.Xin LI2006-08-081-20/+4
| | | | Notes: svn path=/head/; revision=161099
* Say welcome to 'sade', the SysAdmins Disk Editor. It's the fdisk and ↵Alexander Leidinger2006-08-071-1034/+8
| | | | | | | | | | | | | | | disklabel part of sysinstall. So sysinstall may retire now, we have the important non-install part of it covered. ATM it doesn't understand GEOM stuff (like mirror, stripe, raid, ...), but patches to change this and to clean it up internally are more than welcome. Submitted by: mami@nyitolap.hu Notes: svn path=/head/; revision=161060
* Disable an SMP detection on pc98.Yoshihiro Takahashi2006-03-101-1/+1
| | | | Notes: svn path=/head/; revision=156533
* missed a case that needs WITH_SMPSam Leffler2006-03-091-0/+2
| | | | | | | Noticed by: kensmith Notes: svn path=/head/; revision=156516
* Revamp base system packaging of kernels to enable up/smp selectionSam Leffler2006-03-081-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=156436
* An i386 machine with 32MB of RAM requires a 700MB disk for auto-layout toCeri Davies2005-12-291-2/+2
| | | | | | | | | | succeed, whilst an i386 with 256MB of RAM requires more. Up the amount of disk hinted at as a minimum requisite for auto-layout. MFC after: 1 week Notes: svn path=/head/; revision=153850
* Automatically switch to ttyv3 where the fixit shell is running when usingJohn Baldwin2005-03-021-0/+2
| | | | | | | | | the standard console and any fixit mode. MFC after: 1 day Notes: svn path=/head/; revision=143067
* - Fix a bug in sysinstall related to mounting CD-ROMs. If mount(2) failsJohn Baldwin2005-03-021-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=143065
* Remove /stand when we are done with it.David E. O'Brien2005-02-071-0/+3
| | | | | | | Submitted by: Ryan Sommers <ryans@gamersimpact.com> Notes: svn path=/head/; revision=141430
* Removed bitrot.Ruslan Ermilov2005-01-131-5/+2
| | | | Notes: svn path=/head/; revision=140182
* Remove support for configuring the X server from sysinstall. GeneralKen Smith2004-08-301-6/+0
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=134532
* o Save pointers to the chunks for root, home, swap, usr, var and tmp inMarcel Moolenaar2004-08-071-99/+65
| | | | | | | | | | | | | | | | | | 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... Notes: svn path=/head/; revision=133241
* Join the 21st century: Cryptography is no longer an optional componentColin Percival2004-08-061-1/+1
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=133196
* ia64 specific:Marcel Moolenaar2004-08-041-21/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | o Remove the code that creates the boot directory on the EFI file system after it has been mounted, as well as remove the code that creates the symlink from /boot -> /efi/boot (*). As a result, /boot will be extracted onto the root file system. o Add a function efi_mountpoint() that returns the mount point of the EFI file system or NULL if no EFI partition is created. This function is used to both check whether there's an EFI file system and to return what its mount point is. o When there's no EFI file system, ask the user if this is what he or she wants. Since we extract /boot onto the root file system, we do not actually need an EFI file system for the installation to work. Whether one wants to install without an EFI partition is of course an entirely different question. We allow it... o When we're done installing and need to fix up the various bits and pieces, check if there's an EFI partition and if yes, move /boot to /efi/boot and create a symlink /boot -> /efi/boot (*). This is a much more reliable way to get /boot onto the EFI partition than creating the symlink up front and hope its being respected. It so happened that we never had the boot directory end up on the EFI partition. We make the symlink relative. (*) /efi is a place holder for the actual EFI mount point of course. Notes: svn path=/head/; revision=133144
* Move the inclusion of libdisk.h from sysinstall.h to the source filesMarcel Moolenaar2004-08-021-0/+1
| | | | | | | | | | 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. Notes: svn path=/head/; revision=133040
* Mods for powerpc.Peter Grehan2004-05-151-10/+20
| | | | | | | Submitted by: Suleiman Souhlal <refugee@segfaulted.com> Notes: svn path=/head/; revision=129259
* Minor fixes for ia64 installs:John Baldwin2004-05-071-0/+6
| | | | | | | | | | - Don't look for partitions inside a FreeBSD chunk on ia64 when mounting the filesystems just before the chroot and install. - Write entries out to /etc/fstab for filesystems that aren't inside a FreeBSD chunk, but are a top-level chunk under the disk. Notes: svn path=/head/; revision=129041
* Remove unused variables.John Baldwin2004-03-111-3/+0
| | | | Notes: svn path=/head/; revision=126857
* In checkLabels(), deal with the fact that on ia64 we do not have aMarcel Moolenaar2004-01-301-0/+12
| | | | | | | disklabel. Notes: svn path=/head/; revision=125223
* Teach the Fixit environment how to deal with a dynamic root. SymlinkScott Long2003-12-211-6/+6
| | | | | | | | | | | /libexec to /mnt2/libexec, and execute /mnt2/rescue/ldconfig to add the /mnt2/lib and /mnt2/usr/lib library directories. Thanks to John Baldwin for working to track this down. Submitted by: jhb Notes: svn path=/head/; revision=123707
* Remove security profiles from sysinstall. Currently, security profileRobert Watson2003-11-281-11/+4
| | | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=123032
* Various NFS-related bug fixes (mostly related to using variable_get()Dag-Erling Smørgrav2003-10-191-0/+2
| | | | | | | | | instead of variable_cmp() to test boolean rc.conf variables). Submitted by: hmp Notes: svn path=/head/; revision=121245
* Add a new variable 'skipPCCARD'. This variable will cause sysinstallWarner Losh2003-08-201-0/+1
| | | | | | | | | | | | to ignore all PC Card devices. Submitted by: Anders Nordby PR: bin/37650 MFC After: 2 weeks Notes: svn path=/head/; revision=119167
* Remove the vestiges of the old pre-"X_AS_PKG" way we used to handled theDavid E. O'Brien2003-08-191-23/+0
| | | | | | | | | installing XFree86 (version 3.3.6 and before). Reviewed by: jhb Notes: svn path=/head/; revision=119152
* Instead of unconditionally refusing to install if no swap partitionsDavid Schultz2003-08-101-3/+4
| | | | | | | are specified, prompt the user with a yes/no box. Notes: svn path=/head/; revision=118709
* Teach sysinstall to recognize if acpi was turned off from the bootloader,Scott Long2003-05-311-0/+9
| | | | | | | | | and then ask the user if this should be made permanent. Approved by: re Notes: svn path=/head/; revision=115435
* Add __amd64__ ifdefs to enable the bootblock handling code, slices, etc.Peter Wemm2003-05-241-1/+1
| | | | | | | | Approved by: re (murray) Obtained from: obrien Notes: svn path=/head/; revision=115293
* Reword the infamouse mouse dialog to ask if you have a PS/2, serial, orJohn Baldwin2003-05-131-1/+1
| | | | | | | | | | | bus mouse instead of if you have a non-USB mouse. Requested by: many Prodded by: dougb Approved by: re (scottl) Notes: svn path=/head/; revision=114979
* Throw the switch--change to UFS2 as our default file system format forRobert Watson2003-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=113751
* s/to try and retry/to retry/Ceri Davies2003-02-191-1/+1
| | | | | | | | | | PR: misc/48226 Submitted by: Gary W. Swearingen <swear@attbi.com> MFC After: 2 days Approved by: murray (mentor) Notes: svn path=/head/; revision=111142
* - Rename installFixupBin to installFixupBase to finish up the 'bin' toJohn Baldwin2003-01-171-16/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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 Notes: svn path=/head/; revision=109434
* Reformulate how sysinstall handles file system options in the labelRobert Watson2002-12-031-13/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=107565
* Rename installX11package() to installPackage() and tweak it so that itJohn Baldwin2002-12-031-5/+3
| | | | | | | | | can be used to install any arbitrary package. Approved by: re Notes: svn path=/head/; revision=107560
* ia64 specific.Marcel Moolenaar2002-12-021-3/+6
| | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=107525
* ia64: make link /boot->efi/boot relative.Marcel Moolenaar2002-11-301-1/+6
| | | | | | | Approved by: re (murray) Notes: svn path=/head/; revision=107421
* - Use WITH_SLICES to conditionalize the fdisk editor during install insteadJohn Baldwin2002-11-271-6/+14
| | | | | | | | | | | | | | | | | | | of an explicit list of architecture defines. - Tweak the message prior to the label editor in the !WITH_SLICES case to make it slightly less awkward since this is the first dialog we see after starting an install. - Only offer to customize syscons settings if WITH_SYSCONS. - Offer to enable Linux compat if WITH_LINUX. Before we only did this for i386. - On the alpha, offer to enable OSF/1 compat after asking about Linux compat. - Only offer to configure moused(8) if WITH_MICE is defined. Tested on: i386, alpha, sparc64 Approved by: re Notes: svn path=/head/; revision=107340
* Create a link /boot -> /<efi>/boot, where <efi> is the mountpointMarcel Moolenaar2002-11-181-0/+15
| | | | | | | | | | | of the EFI file system. This makes the EFI partition non-optional. I don't think that the links are actually correct, given that all the mount points are under /mnt when sysinstall is run as init. (ie a non-upgrade). Thus: I think I need to go in once more, but at least this doesn't get lost... Notes: svn path=/head/; revision=107050
* Add conditional code specific to ia64 to allow newfs(8)-ing FATMarcel Moolenaar2002-11-141-1/+11
| | | | | | | | | | | | | | partitions marked as being of type efi. This change adds code to 1. actually run the newfs command at mount time (install.c), 2. display the newfs state on screen (label.c) 3. allow toggling of the newfs state (label.c) Even though newfs(8)-ing FAT partitions can be of use on i386 machines in general, it has been opted to minimize impact for now. Notes: svn path=/head/; revision=106885
* Also test for type efi everywhere we currently test for type fat.Marcel Moolenaar2002-11-131-1/+1
| | | | | | | | | | With this change there's no a priori difference between EFI and FAT partitions. With this change and the corresponding change to libdisk, we can create EFI partitions, just like regular FAT partitions. Notes: svn path=/head/; revision=106839
* Confirmed kill: "Bogon #1" is dead, killed by DEVFS.Poul-Henning Kamp2002-10-251-38/+0
| | | | Notes: svn path=/head/; revision=105927
* Comment out more MAKEDEV bogosity ("BOGON #1" as Jordan put it :-)Poul-Henning Kamp2002-10-251-2/+2
| | | | Notes: svn path=/head/; revision=105926
* Fix cut&paste mistake.Poul-Henning Kamp2002-10-231-2/+2
| | | | Notes: svn path=/head/; revision=105798
* Remove more private MAKEDEV kludges.Poul-Henning Kamp2002-10-221-3/+3
| | | | Notes: svn path=/head/; revision=105714
* Give a real error on failure to mount DEVFS.Poul-Henning Kamp2002-10-221-19/+5
| | | | Notes: svn path=/head/; revision=105706
* Pick up a prototyp from libdisk.h instead of having our own.Poul-Henning Kamp2002-10-221-1/+0
| | | | Notes: svn path=/head/; revision=105682