Add "Extract Only" functionality to pc-sysinstall. This allows disk setup to
be done manually, pc-sysinstall is pointed to a mount-point for installation. PR: bin/154685 Submitted by: kmoore Approved by: kib (mentor)
This commit is contained in:
parent
e6ffa21488
commit
bed7dbd1d3
@ -409,6 +409,7 @@ write_image()
|
||||
fi
|
||||
};
|
||||
|
||||
# Setup and install on a new disk / partition
|
||||
install_fresh()
|
||||
{
|
||||
# Lets start setting up the disk slices now
|
||||
@ -458,6 +459,39 @@ install_fresh()
|
||||
echo_log "Installation finished!"
|
||||
};
|
||||
|
||||
# Extract the system to a pre-mounted directory
|
||||
install_extractonly()
|
||||
{
|
||||
# We are ready to begin extraction, lets start now
|
||||
init_extraction
|
||||
|
||||
# Check if we have any optional modules to load
|
||||
install_components
|
||||
|
||||
# Check if we have any packages to install
|
||||
install_packages
|
||||
|
||||
# Do any localization in configuration
|
||||
run_localize
|
||||
|
||||
# Save any networking config on the installed system
|
||||
save_networking_install
|
||||
|
||||
# Now add any users
|
||||
setup_users
|
||||
|
||||
# Now run any commands specified
|
||||
run_commands
|
||||
|
||||
# Set a hostname on the install system
|
||||
setup_hostname
|
||||
|
||||
# Set the root_pw if it is specified
|
||||
set_root_pw
|
||||
|
||||
echo_log "Installation finished!"
|
||||
};
|
||||
|
||||
install_image()
|
||||
{
|
||||
# We are ready to begin extraction, lets start now
|
||||
@ -478,7 +512,7 @@ install_upgrade()
|
||||
# Do any localization in configuration
|
||||
run_localize
|
||||
|
||||
# ow run any commands specified
|
||||
# Now run any commands specified
|
||||
run_commands
|
||||
|
||||
# Merge any old configuration files
|
||||
|
@ -67,11 +67,10 @@ fi
|
||||
export CFGF
|
||||
|
||||
# Start by doing a sanity check, which will catch any obvious mistakes in the config
|
||||
file_sanity_check "installMode disk0 installType installMedium packageType"
|
||||
file_sanity_check "installMode installType installMedium packageType"
|
||||
|
||||
# We passed the Sanity check, lets grab some of the universal config settings and store them
|
||||
check_value installMode "fresh upgrade"
|
||||
check_value bootManager "bsd none"
|
||||
check_value installMode "fresh upgrade extract"
|
||||
check_value installType "PCBSD FreeBSD"
|
||||
check_value installMedium "dvd usb ftp rsync image"
|
||||
check_value packageType "uzip tar rsync split"
|
||||
@ -108,6 +107,16 @@ case "${INSTALLMODE}" in
|
||||
fi
|
||||
;;
|
||||
|
||||
extract)
|
||||
# Extracting only, make sure we have a valid target directory
|
||||
get_value_from_cfg installLocation
|
||||
FSMNT="${VAL}" ; export FSMNT
|
||||
if [ -z "$FSMNT" ] ; then exit_err "Missing installLocation=" ; fi
|
||||
if [ ! -d "$FSMNT" ] ; then exit_err "No such directory: $FSMNT" ; fi
|
||||
|
||||
install_extractonly
|
||||
;;
|
||||
|
||||
upgrade)
|
||||
install_upgrade
|
||||
;;
|
||||
|
@ -36,8 +36,8 @@ RSYNCTRIES="3"
|
||||
export RSYNCTRIES
|
||||
|
||||
# Set our mount-points
|
||||
CDMNT="/cdmnt-install"
|
||||
FSMNT="/mnt"
|
||||
CDMNT=${CDMNT-/cdmnt-install}
|
||||
FSMNT=${FSMNT-/mnt}
|
||||
UZIP_DIR="/usr"
|
||||
BOOT_PART_MOUNT="/boot-mount"
|
||||
export FSMNT CDMNT UZIP_DIR BOOT_PART_MOUNT
|
||||
|
@ -12,9 +12,9 @@ installed system
|
||||
When hostname= is not present, pc-sysinstall will auto-generate
|
||||
a hostname such as freebsd-XXXX or pcbsd-XXXX
|
||||
|
||||
# installMode=(fresh or upgrade)
|
||||
# installMode=(fresh/upgrade/extract)
|
||||
|
||||
Set the type of install we are doing, fresh or upgrade.
|
||||
Set the type of install we are doing.
|
||||
|
||||
Fresh installs will format and mount the target disks before
|
||||
extracting the install images to the system. Using this mode
|
||||
@ -27,6 +27,19 @@ The conf/exclude-from-upgrade file can be used to specify
|
||||
additional files to exclude from overwriting during the
|
||||
install process.
|
||||
|
||||
Extract will skip any disk setup, and perform an installation
|
||||
to the directory specified by "installLocation=". This location
|
||||
should be a directory with your pre-mounted file-systems ready
|
||||
for file extraction. When using the "extract" option, /etc/fstab
|
||||
on the installed system will *not* be automatically configured.
|
||||
|
||||
# installLocation=
|
||||
|
||||
Used only when installMode is set to extract.
|
||||
|
||||
This is set to the location you want to extract your system to,
|
||||
and should already be mounted properly.
|
||||
|
||||
# installInteractive=(yes or no)
|
||||
|
||||
Set if the installer is running in interactive mode, and
|
||||
@ -320,7 +333,7 @@ Run the specified command within chroot of the installed system
|
||||
# runScript=
|
||||
|
||||
runScript will copy the specified script into FSMNT, and run it in chroot of the system
|
||||
Usefull when you have a 3rd party script on the DVD / USB, and you want to copy it into
|
||||
Useful when you have a 3rd party script on the DVD / USB, and you want to copy it into
|
||||
the installed system and run
|
||||
|
||||
# runExtCommand=
|
||||
@ -330,7 +343,7 @@ The variable $FSMNT is set to the mount-point of your installed system
|
||||
|
||||
|
||||
########################################################################
|
||||
# PC-BSD SPECIFC OPTIONS
|
||||
# PC-BSD SPECIFIC OPTIONS
|
||||
########################################################################
|
||||
|
||||
Options for time-zones and NTP on the installed system
|
||||
|
Loading…
x
Reference in New Issue
Block a user