Harden NVIDIA boot logging on live ISO
This commit is contained in:
@@ -17,7 +17,7 @@ mkdir -p "$(dirname "$log_file")"
|
|||||||
serial_sink() {
|
serial_sink() {
|
||||||
local tty="$1"
|
local tty="$1"
|
||||||
if [ -w "$tty" ]; then
|
if [ -w "$tty" ]; then
|
||||||
cat > "$tty"
|
cat > "$tty" 2>/dev/null || true
|
||||||
else
|
else
|
||||||
cat > /dev/null
|
cat > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -59,11 +59,24 @@ load_module() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
load_host_module() {
|
||||||
|
mod="$1"
|
||||||
|
if modprobe "$mod" >/dev/null 2>&1; then
|
||||||
|
log "host module loaded: $mod"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
case "$nvidia_mode" in
|
case "$nvidia_mode" in
|
||||||
normal|full)
|
normal|full)
|
||||||
if ! load_module nvidia; then
|
if ! load_module nvidia; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
# nvidia-modeset on some server kernels needs ACPI video helper symbols
|
||||||
|
# exported by the generic "video" module. Best-effort only; compute paths
|
||||||
|
# remain functional even if display-related modules stay absent.
|
||||||
|
load_host_module video || true
|
||||||
load_module nvidia-modeset || true
|
load_module nvidia-modeset || true
|
||||||
load_module nvidia-uvm || true
|
load_module nvidia-uvm || true
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user