Skip to content

Commit

Permalink
#506 New installer breaks VMware boot media
Browse files Browse the repository at this point in the history
Reviewed by: Joshua M. Clulow <jmc@joyent.com>
  • Loading branch information
Jonathan Perkin committed Jun 29, 2016
1 parent 71407c5 commit 3eb73a0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 15 additions & 1 deletion overlay/generic/smartdc/lib/smartos_prompt_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,21 @@ promptpool()
local layout=""
local disks=
while [[ /usr/bin/true ]]; do
diskinfo -Hp > /var/tmp/mydisks
# Skip USB devices and the VMware boot image by default.
diskinfo -Hp | nawk '
$1 != "USB" {
diskinfo = $0;
bootdisk = 0;
cmd = "fstyp -v /dev/dsk/" $2 "p1 2>/dev/null";
while ((cmd | getline) > 0) {
if ($0 ~ /^Volume Label:/ && $3 == "SMARTOSBOOT")
bootdisk = 1;
}
close(cmd);
if (bootdisk)
next;
print diskinfo;
}' > /var/tmp/mydisks
disklayout -f /var/tmp/mydisks $layout > /var/tmp/disklayout.json
json error < /var/tmp/disklayout.json | grep . && layout="" && continue
prmpt_str="$(printdisklayout /var/tmp/disklayout.json)\n\n"
Expand Down
2 changes: 1 addition & 1 deletion tools/build_iso
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function bi_generate_usb_file
"${bi_lofidev/lofi/rlofi}"; then
fail "failed to partition ${bi_lofidev/lofi/rlofi}"
fi
echo "y" | pfexec mkfs -F pcfs -o fat=32 ${bi_lofidev/lofi/rlofi}:c
echo "y" | pfexec mkfs -F pcfs -o b=SMARTOSBOOT,fat=32 ${bi_lofidev/lofi/rlofi}:c
[[ $? -eq 0 ]] || fail "failed to format the usb image"
bi_emit_done

Expand Down

0 comments on commit 3eb73a0

Please sign in to comment.