Project

General

Profile

« Previous | Next » 

Revision e9f72992

Added by Scott Ullrich about 16 years ago

Use gpart to set the active partition slice

View differences:

etc/rc.firmware
125 125

  
126 126
	# mount /cf
127 127
	/etc/rc.conf_mount_rw
128

  
128 129
	# backup config
129 130
	/bin/mkdir -p /tmp/configbak
130 131
	cp -p /conf/* /tmp/configbak 2>/dev/null
......
202 203
	echo "/sbin/tunefs -L ${GLABEL_SLICE} /dev/$COMPLETE_PATH" >> /cf/upgrade_log.txt
203 204
	/sbin/tunefs -L ${GLABEL_SLICE} /dev/$COMPLETE_PATH >> /cf/upgrade_log.txt 2>&1
204 205

  
206
	# Set active boot source
205 207
	echo "" >> /cf/upgrade_log.txt
206 208
	echo "/usr/sbin/boot0cfg -s ${SLICE} -v /dev/${BOOT_DRIVE}" >> /cf/upgrade_log.txt
207 209
	/usr/sbin/boot0cfg -s ${SLICE} -v /dev/${BOOT_DRIVE} >> /cf/upgrade_log.txt 2>&1
208 210

  
211
	# Set active mount slice in fdisk
212
	echo "" >> /cf/upgrade_log.txt
213
	echo "gpart set -a active -i ${SLICE} ${BOOT_DRIVE}" >> /cf/upgrade_log.txt
214
	gpart set -a active -i ${SLICE} ${BOOT_DRIVE}
215

  
209 216
	# restore config
210 217
	cp -p /tmp/configbak/* /conf 2>/dev/null
211 218

  

Also available in: Unified diff