source: overlays/install-overlay/etc/SetupInstall.sh @ 6e0ee8d

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2
Last change on this file since 6e0ee8d was 6e0ee8d, checked in by Kris Moore <kris@…>, 13 months ago

Improve the install process, skip integrity check, and mount usr.uzip
directly from media, in order to leave the maximum ammount of RAM
available for the install process

  • Property mode set to 100755
File size: 1.5 KB
Line 
1#!/bin/sh
2
3
4# Setup the /memfs memory device
5echo "Mounting /memfs"
6
7MDSIZE="2"
8echo "Creating ${MDSIZE}MB ramdisk..."
9/sbin/mdmfs -S -s ${MDSIZE}M -O space md2 /memfs
10
11echo "Mounting /usr"
12MDDEVICE="`/sbin/mdconfig -a -t vnode -o readonly -f /uzip/usr.uzip`.uzip"
13/sbin/mount -r /dev/$MDDEVICE /usr
14
15PATH="${PATH}:/usr/bin"
16export PATH
17
18# Load the extra klds we need
19/etc/rc.d/kld start
20
21# Check for optimus / video drivers
22/etc/pcbsd-video.sh
23
24# See if we have install / meta pkgs for the front-end to use
25if [ -e "/dist/no-meta-pkgs" ] ; then touch /tmp/no-meta-pkgs ; fi
26if [ -e "/dist/no-install-pkgs" ] ; then touch /tmp/no-install-pkgs ; fi
27if [ -e "/dist/no-fbsd-release" ] ; then touch /tmp/no-fbsd-release ; fi
28
29# Check if we have a pc-autoinstall.conf file
30if [ -e "/boot/pc-autoinstall.conf" ]
31then
32  # We have one, copy it over so that pc-sysinstall can parse it later during the bootup
33  cp /boot/pc-autoinstall.conf /tmp/pc-autoinstall.conf
34 
35  # Check if the config file is on disk as well
36  PCCFG=`grep "pc_config:" /tmp/pc-autoinstall.conf | grep -v "^#" | /bin/cut -d ':' -f 2 | tr -d ' '`
37
38  # Check that this isn't a http / ftp file we need to fetch later
39  echo "${PCCFG}" | grep -e "^http" -e "^ftp" > /dev/null 2>/dev/null
40  if [ "$?" != "0" ]
41  then
42    if [ -e "/${PCCFG}" ]
43    then
44      cp /${PCCFG} /tmp/pc-sysinstall.cfg
45    else
46      echo "ERROR: pc_config: ${PCCFG} isn't on the boot media! Automated install aborted!"
47      rm /tmp/pc-autoinstall.conf
48    fi
49  fi
50 
51fi
Note: See TracBrowser for help on using the repository browser.