Changeset 3997
- Timestamp:
- 05/28/09 12:20:29 (10 months ago)
- Location:
- pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts
- Files:
-
- 3 modified
-
PCBSD.FindUpdateParts.sh (modified) (1 diff)
-
PCBSD.MountUpgrade.sh (modified) (1 diff)
-
PCBSD.SysConfig.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.FindUpdateParts.sh
r3996 r3997 104 104 fi # End of if /mnt/PCBSD 105 105 106 # If we are on ZFS, cleanup after the mount 106 107 if [ ! -z "${ZROOT}" ] 107 108 then 108 109 umount ${FSMNT}/bootdir 110 /bin/sh /tmp/TempUMount 111 umount ${FSMNT} 112 rm /tmp/TempUMount 113 114 # Remount the bootdir to /mnt 115 mount ${PART}a ${FSMNT} 116 117 # Copy over our ZFS cache data 118 cp /boot/zfs/* ${FSMNT}/boot/zfs/ 119 120 # Unmount the /bootdir partition again 121 umount ${FSMNT} 122 else 123 # Unmount FS 124 /bin/sh /tmp/TempUMount 125 umount ${FSMNT} 126 rm /tmp/TempUMount 109 127 fi 110 128 111 # Unmount FS112 /bin/sh /tmp/TempUMount113 umount ${FSMNT}114 rm /tmp/TempUMount115 129 116 if [ ! -z "${ZROOT}" ]117 then118 zpool export -f ${ZROOT}119 fi120 121 130 fi # End of if ${i}a 122 131 -
pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh
r3996 r3997 32 32 # Mount the bootdir now 33 33 mount ${PART}a ${FSMNT}/bootdir 34 echo "${ZROOT}" > /tmp/upgradeZFS 34 echo "${ZROOT}" >/tmp/upgradeZFS 35 echo "${PART}a" >/uzip/ZFS-bootpart 36 echo "/dev/${ZROOT}" >/uzip/ZFS-root 35 37 fi 36 38 -
pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.SysConfig.sh
r3995 r3997 170 170 ZFSBOOTPART="`cat /uzip/ZFS-bootpart`" 171 171 172 # Setup our loader.conf entries for ZFS 173 echo 'zfs_load="YES"' >> ${FSMNT}/boot/loader.conf 174 echo "vfs.root.mountfrom=\"zfs:${BASENAME}/root\"" >> ${FSMNT}/boot/loader.conf 175 echo 'vm.kmem_size="512M"' >>${FSMNT}/boot/loader.conf 176 echo 'vm.kmem_size_max="512M"' >>${FSMNT}/boot/loader.conf 177 178 # Enable zfs in /etc/rc.conf 179 echo 'zfs_enable="YES"' >> ${FSMNT}/etc/rc.conf 180 181 # Copy over the /etc/hostid from our install CD to the HD 182 cp /etc/hostid ${FSMNT}/etc/hostid 183 184 # Move the kernel to /bootdir so we can bootup properly 185 mv -f ${FSMNT}/boot ${FSMNT}/bootdir/ 186 187 # Create our link to /boot on the ZFS partition 188 ln -s /bootdir/boot ${FSMNT}/boot 189 172 if [ ! -e "/tmp/upgradeZFS" ] 173 then 174 175 # Setup our loader.conf entries for ZFS 176 echo 'zfs_load="YES"' >> ${FSMNT}/boot/loader.conf 177 echo "vfs.root.mountfrom=\"zfs:${BASENAME}/root\"" >> ${FSMNT}/boot/loader.conf 178 echo 'vm.kmem_size="512M"' >>${FSMNT}/boot/loader.conf 179 echo 'vm.kmem_size_max="512M"' >>${FSMNT}/boot/loader.conf 180 181 # Enable zfs in /etc/rc.conf 182 echo 'zfs_enable="YES"' >> ${FSMNT}/etc/rc.conf 183 184 # Copy over the /etc/hostid from our install CD to the HD 185 cp /etc/hostid ${FSMNT}/etc/hostid 186 187 # Move the kernel to /bootdir so we can bootup properly 188 mv -f ${FSMNT}/boot ${FSMNT}/bootdir/ 189 190 # Create our link to /boot on the ZFS partition 191 ln -s /bootdir/boot ${FSMNT}/boot 192 fi 190 193 191 194 # Reset our mount points for any extra ZFS partitions … … 240 243 done 241 244 242 if [ -e "/tmp/upgradeZFS" ]243 then244 ZROOT=`cat /tmp/upgradeZFS`245 umount ${FSMNT}/bootdir246 fi247 248 245 umount -f ${FSMNT} >/dev/null 249 250 if [ ! -z "${ZROOT}" ]251 then252 zpool export -f ${ZROOT}253 fi254 246 255 247 fi
