Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/bsdinstall/scripts/auto
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | error() { | ||||
if [ $? -ne 0 ]; then | if [ $? -ne 0 ]; then | ||||
exit 1 | exit 1 | ||||
else | else | ||||
exec $0 | exec $0 | ||||
fi | fi | ||||
} | } | ||||
hline_arrows_tab_enter="Press arrows, TAB or ENTER" | hline_arrows_tab_enter="Press arrows, TAB or ENTER" | ||||
msg_gpt_active_fix="Your hardware is known to have issues booting in BIOS mode from GPT partitions that are not set active. Would you like the installer to apply this workaround for you?" | msg_gpt_active_fix="Your hardware is known to have issues booting in CSM/Legacy/BIOS mode from GPT partitions that are not set active. Would you like the installer to apply this workaround for you?" | ||||
msg_lenovo_fix="Your model of Lenovo is known to have a BIOS bug that prevents it booting from GPT partitions without UEFI. Would you like the installer to apply a workaround for you?" | msg_lenovo_fix="Your model of Lenovo is known to have a BIOS bug that prevents it booting from GPT partitions without UEFI. Would you like the installer to apply a workaround for you?" | ||||
msg_no="NO" | msg_no="NO" | ||||
msg_yes="YES" | msg_yes="YES" | ||||
# dialog_workaround | # dialog_workaround | ||||
# | # | ||||
# Ask the user if they wish to apply a workaround | # Ask the user if they wish to apply a workaround | ||||
# | # | ||||
▲ Show 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | |||||
if f_interactive; then | if f_interactive; then | ||||
sys_maker=$( kenv -q smbios.system.maker ) | sys_maker=$( kenv -q smbios.system.maker ) | ||||
f_dprintf "smbios.system.maker=[%s]" "$sys_maker" | f_dprintf "smbios.system.maker=[%s]" "$sys_maker" | ||||
sys_model=$( kenv -q smbios.system.product ) | sys_model=$( kenv -q smbios.system.product ) | ||||
f_dprintf "smbios.system.product=[%s]" "$sys_model" | f_dprintf "smbios.system.product=[%s]" "$sys_model" | ||||
sys_version=$( kenv -q smbios.system.version ) | sys_version=$( kenv -q smbios.system.version ) | ||||
f_dprintf "smbios.system.version=[%s]" "$sys_version" | f_dprintf "smbios.system.version=[%s]" "$sys_version" | ||||
sys_mb_maker=$( kenv -q smbios.planar.maker ) | |||||
f_dprintf "smbios.planar.maker=[%s]" "$sys_mb_maker" | |||||
sys_mb_product=$( kenv -q smbios.planar.product ) | |||||
f_dprintf "smbios.planar.product=[%s]" "$sys_mb_product" | |||||
# | |||||
# Laptop Models | |||||
# | |||||
case "$sys_maker" in | case "$sys_maker" in | ||||
"LENOVO") | "LENOVO") | ||||
case "$sys_version" in | case "$sys_version" in | ||||
"ThinkPad X220"|"ThinkPad T420"|"ThinkPad T520") | "ThinkPad X220"|"ThinkPad T420"|"ThinkPad T520") | ||||
dialog_workaround "$msg_lenovo_fix" | dialog_workaround "$msg_lenovo_fix" | ||||
retval=$? | retval=$? | ||||
f_dprintf "lenovofix_prompt=[%s]" "$retval" | f_dprintf "lenovofix_prompt=[%s]" "$retval" | ||||
if [ $retval -eq $DIALOG_OK ]; then | if [ $retval -eq $DIALOG_OK ]; then | ||||
export ZFSBOOT_PARTITION_SCHEME="GPT + Lenovo Fix" | export ZFSBOOT_PARTITION_SCHEME="GPT + Lenovo Fix" | ||||
export WORKAROUND_LENOVO=1 | export WORKAROUND_LENOVO=1 | ||||
fi | fi | ||||
;; | ;; | ||||
esac | esac | ||||
;; | ;; | ||||
"Dell Inc.") | "Dell Inc.") | ||||
case "$sys_model" in | case "$sys_model" in | ||||
"Latitude E7440") | "Latitude E7440"|"Latitude E7240") | ||||
dialog_workaround "$msg_gpt_active_fix" | |||||
retval=$? | |||||
f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" | |||||
if [ $retval -eq $DIALOG_OK ]; then | |||||
export ZFSBOOT_PARTITION_SCHEME="GPT + Active" | |||||
export WORKAROUND_GPTACTIVE=1 | |||||
fi | |||||
;; | |||||
esac | |||||
;; | |||||
esac | |||||
# | |||||
# Motherboard Models | |||||
# | |||||
case "$sys_mb_maker" in | |||||
"Intel Corporation") | |||||
case "$sys_mb_product" in | |||||
"DP965LT") | |||||
dialog_workaround "$msg_gpt_active_fix" | dialog_workaround "$msg_gpt_active_fix" | ||||
retval=$? | retval=$? | ||||
f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" | f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" | ||||
if [ $retval -eq $DIALOG_OK ]; then | if [ $retval -eq $DIALOG_OK ]; then | ||||
export ZFSBOOT_PARTITION_SCHEME="GPT + Active" | export ZFSBOOT_PARTITION_SCHEME="GPT + Active" | ||||
export WORKAROUND_GPTACTIVE=1 | export WORKAROUND_GPTACTIVE=1 | ||||
fi | fi | ||||
;; | ;; | ||||
▲ Show 20 Lines • Show All 169 Lines • Show Last 20 Lines |