Revision a340cf5e
Added by Scott Ullrich almost 16 years ago
usr/local/www/diag_nanobsd.php | ||
---|---|---|
107 | 107 |
$AOLD_UFS_ID="1"; |
108 | 108 |
$ABOOTFLASH="{$ABOOT_DRIVE}s{$AOLDSLICE}"; |
109 | 109 |
} |
110 |
exec("sysctl kern.geom.debugflags=16"); |
|
110 | 111 |
exec("gpart set -a active -i {$ASLICE} {$BOOT_DRIVE}"); |
111 | 112 |
exec("/usr/sbin/boot0cfg -s {$ASLICE} -v /dev/{$BOOT_DRIVE}"); |
112 | 113 |
exec("/bin/mkdir /tmp/{$AGLABEL_SLICE}"); |
... | ... | |
119 | 120 |
EOF; |
120 | 121 |
file_put_contents("/tmp/{$AGLABEL_SLICE}/etc/fstab", $fstab); |
121 | 122 |
exec("/sbin/umount /tmp/{$AGLABEL_SLICE}"); |
123 |
exec("sysctl kern.geom.debugflags=0"); |
|
122 | 124 |
$savemsg = "The boot slice has been set to {$ABOOT_DRIVE} {$AGLABEL_SLICE}"; |
123 | 125 |
} |
124 | 126 |
|
... | ... | |
133 | 135 |
EOF; |
134 | 136 |
for ($i = 0; $i < ob_get_level(); $i++) { ob_end_flush(); } |
135 | 137 |
ob_implicit_flush(1); |
138 |
exec("sysctl kern.geom.debugflags=16"); |
|
136 | 139 |
exec("dd if=/dev/zero of=/dev/{$TOFLASH} bs=1m count=1"); |
137 | 140 |
exec("/bin/dd if=/dev/{$BOOTFLASH} of=/dev/{$TOFLASH} bs=64k"); |
138 | 141 |
exec("/sbin/tunefs -L {$GLABEL_SLICE} /dev/{$COMPLETE_PATH}"); |
... | ... | |
148 | 151 |
$savemsg = "The slice has been duplicated.<p/>If you would like to boot from this newly duplicated slice please set it using the bootup information area."; |
149 | 152 |
exec("/sbin/umount /tmp/{$GLABEL_SLICE}"); |
150 | 153 |
} |
154 |
exec("sysctl kern.geom.debugflags=0"); |
|
151 | 155 |
} |
152 | 156 |
|
153 | 157 |
if ($savemsg) |
Also available in: Unified diff
Add debugmode sysctls