Merge pull request #5 from philclifford/small-corrections

a couple of tiny bits of English/typo/white-space fixing
This commit is contained in:
HikariKnight 2022-03-13 02:50:08 +01:00 committed by GitHub
commit 2d9e3f18f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View file

@ -15,7 +15,7 @@ function set_KERNELSTUB () {
# Check if systemd-boot already has vfio parameters from before # Check if systemd-boot already has vfio parameters from before
KERNELSTUB_TEST=$(sudo kernelstub -p 2>&1 | grep "Kernel Boot Options" | perl -pe "s/.+Kernel Boot Options:\..+(vfio_pci.ids=.+ ).+/\1/") KERNELSTUB_TEST=$(sudo kernelstub -p 2>&1 | grep "Kernel Boot Options" | perl -pe "s/.+Kernel Boot Options:\..+(vfio_pci.ids=.+ ).+/\1/")
# If there are already vfio_pci parameters in kernelstub # If there are already vfio_pci parameters in kernelstub
if [[ "$KERNELSTUB_TEST" =~ vfio_pci.ids ]] ; if [[ "$KERNELSTUB_TEST" =~ vfio_pci.ids ]] ;
then then
@ -60,7 +60,7 @@ function set_GRUB () {
GRUB_CMDLINE_LINUX=$(cat "/etc/default/grub" | grep -P "^GRUB_CMDLINE_LINUX") GRUB_CMDLINE_LINUX=$(cat "/etc/default/grub" | grep -P "^GRUB_CMDLINE_LINUX")
perl -pi -e "s/${GRUB_CMDLINE_LINUX}/GRUB_CMDLINE_LINUX=\"${GRUB_CMDLINE} ${CMDLINE}\"/" "${SCRIPTDIR}/$DEFAULT/grub" perl -pi -e "s/${GRUB_CMDLINE_LINUX}/GRUB_CMDLINE_LINUX=\"${GRUB_CMDLINE} ${CMDLINE}\"/" "${SCRIPTDIR}/$DEFAULT/grub"
fi fi
echo "The script will now replace your default grub file with a new one. echo "The script will now replace your default grub file with a new one.
Then attempt to update grub and generate a new grub.cfg. Then attempt to update grub and generate a new grub.cfg.
@ -80,7 +80,7 @@ $SCRIPTDIR/backup/etc/default/grub
fi fi
echo "" echo ""
read -r -p "Please verify there was no errors generating the grub.cfg file, then press ENTER" read -r -p "Please verify there were no errors generating the grub.cfg file, then press ENTER"
} }
function show_FINISH () { function show_FINISH () {
@ -107,7 +107,7 @@ function show_FINISH () {
" "$CMDLINE" " "$CMDLINE"
fi fi
echo "Restart your system and run echo "Restart your system and run
\"$SCRIPTDIR/vfio-verify\" \"$SCRIPTDIR/vfio-verify\"
to check if your GPU is properly set up. to check if your GPU is properly set up.
@ -154,10 +154,10 @@ https://github.com/HikariKnight/vfio-setup-docs/wiki"
} }
function set_CMDLINE () { function set_CMDLINE () {
# Make a variable to tell if # Make a variable to tell if
local BOOTLOADER_AUTOCONFIG local BOOTLOADER_AUTOCONFIG
BOOTLOADER_AUTOCONFIG=0 BOOTLOADER_AUTOCONFIG=0
# If kernelstub is detected (program to manage systemd-boot) # If kernelstub is detected (program to manage systemd-boot)
if which kernelstub > /dev/null 2>&1 ; if which kernelstub > /dev/null 2>&1 ;
then then
@ -180,7 +180,7 @@ function set_CMDLINE () {
function main () { function main () {
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//") SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
set_CMDLINE set_CMDLINE
} }

View file

@ -63,7 +63,7 @@ This is a list of prerequisites you will be needing before starting with VFIO:
if both cards share the same device id (ex: both are identified as 1022:145c), then passthrough will if both cards share the same device id (ex: both are identified as 1022:145c), then passthrough will
not be possible unless you swap out one of the cards. not be possible unless you swap out one of the cards.
* A \"ghost display\" dummy plug for your second graphic card (or having it hooked to a separate input on your monitor). * A \"ghost display\" dummy plug for your second graphic card (or having it hooked to a separate input on your monitor).
* If you are planning to use the inegrated GPU on your CPU, make sure your monitor is connected to it and working/enabled before continuing. * If you are planning to use the integrated GPU on your CPU, make sure your monitor is connected to it and working/enabled before continuing.
* Preferably a motherboard verified to work with IOMMU and with good IOMMU groups. * Preferably a motherboard verified to work with IOMMU and with good IOMMU groups.
https://reddit.com/r/vfio is a good resource for this info. https://reddit.com/r/vfio is a good resource for this info.
(If you are unsure, you will find out while using this script) (If you are unsure, you will find out while using this script)
@ -129,7 +129,7 @@ then
# Create the dracut folder # Create the dracut folder
mkdir -p "$SCRIPTDIR/$DRACUT" mkdir -p "$SCRIPTDIR/$DRACUT"
# Create a dracut.conf.d file # Create a dracut.conf.d file
touch "$SCRIPTDIR/$DRACUT/10-vfio.conf" touch "$SCRIPTDIR/$DRACUT/10-vfio.conf"
fi fi
# Run ls-iommu so we can verify that IOMMU properly working # Run ls-iommu so we can verify that IOMMU properly working