GPU-Passthrough-Manager icon indicating copy to clipboard operation
GPU-Passthrough-Manager copied to clipboard

Dracut update fails due to incorrect shell/shell commands

Open LBates2000 opened this issue 3 months ago • 0 comments

  1. git clone does not create a working local copy, as your github repo does not seem to be complete/updated. I had to manually pull down/copy the older files and the newer ones from the repo and the release and combine/overwrite them in the same directory to get all the required files.
  2. Even though you explicitly have #!/bin/bash in /tools/vfiomgr.sh, you're calling the script with 'sh' in GPUPM.cpp: system("sh ./tools/vfiomgr.sh && ./tools/Reboot"); // Run VFIO driver script

This throws the following errors since line 4's syntax is incorrect for 'sh'

vfiomgr.sh: 4: Bad substitution
vfiomgr.sh: 19: source: not found
vfiomgr.sh: 21: update_dracut_image: not found

Suggested fix for #2: Since 'sh' is available on dracut systems, you could replace

#!/bin/bash

# Get this script's directory
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
...
source $SCRIPT_DIR/dracut-utils

with

#!/bin/sh

# Get this script's directory
SCRIPT_DIR=$( cd "$( dirname -- "$0" )" > /dev/null 2>&1 && pwd )
...
. $SCRIPT_DIR/dracut-utils

(Tested on Ubuntu 25.10)

  1. GPUPM throws a "Not Responding" dialog when waiting for system images to be rebuilt with update-initramfs/dracut -f. Might want to add a check for completion for the long-running processes.

LBates2000 avatar Oct 16 '25 14:10 LBates2000