blob: e0e9c71a443f2d88e90b63addd22b912dc4342eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# $OpenBSD: install.md,v 1.19 2011/04/17 20:57:10 krw Exp $
#
# machine dependent section of installation/upgrade script.
#
MDTERM=vt100
NCPU=$(sysctl -n hw.ncpufound)
((NCPU > 1)) && { DEFAULTSETS="bsd bsd.rd bsd.mp" ; SANESETS="bsd bsd.mp" ; }
md_installboot() {
if [[ -f /mnt/bsd.mp ]] && ((NCPU > 1)); then
echo "Multiprocessor machine; using bsd.mp instead of bsd."
mv /mnt/bsd /mnt/bsd.sp 2>/dev/null
mv /mnt/bsd.mp /mnt/bsd
fi
/sbin/disklabel -B $1
}
md_prep_disklabel() {
local _disk=$1 _f _op
md_installboot $_disk
disklabel -W $_disk >/dev/null 2>&1
_f=/tmp/fstab.$_disk
if [[ $_disk == $ROOTDISK ]]; then
while :; do
echo "The auto-allocated layout for $_disk is:"
disklabel -h -A $_disk | egrep "^# |^ [a-p]:"
ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
case $resp in
a*|A*) _op=-w ; AUTOROOT=y ;;
e*|E*) _op=-E ;;
c*|C*) break ;;
*) continue ;;
esac
disklabel $FSTABFLAG $_f $_op -A $_disk
return
done
fi
cat <<__EOT
You will now create a OpenBSD disklabel on the disk. The disklabel defines
how OpenBSD splits up the disk into OpenBSD partitions in which filesystems
and swap space are created. You must provide each filesystem's mountpoint
in this program.
__EOT
disklabel $FSTABFLAG $_f -E $_disk
}
md_congrats() {
}
md_consoleinfo() {
}
|