Hi,
I've noticed that the code below fails to update the parameter GRUB_CMDLINE_LINUX_DEFAULT in my configuration.
|
GRUB=/etc/default/grub |
|
if [ -f "$GRUB" ]; then |
|
echo "IOMMU -> GRUB" |
|
if grep -q iommu "/etc/default/grub" |
|
then |
|
echo "IOMMU already enabled" |
|
else |
|
if grep -q GenuineIntel "/proc/cpuinfo" |
|
then |
|
echo "intel cpu detected" |
|
sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="/&intel_iommu=on /' /etc/default/grub |
|
echo "IOMMU enabled" |
|
else |
|
echo "amd cpu detected" |
|
sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="/&amd_iommu=on /' /etc/default/grub |
|
echo "IOMMU enabled" |
|
fi |
|
i=1 |
|
fi |
|
if grep -q rd.driver.pre=vfio-pci "/etc/default/grub" |
|
then |
|
echo "VFIO preload already enabled" |
|
else |
|
sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="/&rd.driver.pre=vfio-pci /' /etc/default/grub |
|
echo "VFIO preload enabled" |
|
i=1 |
|
fi |
|
if [ $i -gt 0 ]; then |
|
echo "Updating GRUB" |
|
grub-mkconfig -o /boot/grub/grub.cfg |
|
else |
|
echo "GRUB already configured" |
|
fi |
|
fi |
The reason is that the sed pattern is looking for double quotes, while in my /etc/default/grub I have the following line which uses single quotes instead:
GRUB_CMDLINE_LINUX_DEFAULT='nowatchdog nvme_load=YES loglevel=3'.
However, even using the GRUB_CMDLINE_LINUX_DEFAULT above, the gpu passthrough is working flawlessly.
Is there any reason why I should update the GRUB_CMDLINE_LINUX_DEFAULT parameter according the script above?
If useful, I'm using EndeavourOS.
Thanks!
Hi,
I've noticed that the code below fails to update the parameter
GRUB_CMDLINE_LINUX_DEFAULTin my configuration.GPU-Passthrough-Manager/tools/fts.sh
Lines 8 to 41 in 762720b
The reason is that the
sedpattern is looking for double quotes, while in my/etc/default/grubI have the following line which uses single quotes instead:GRUB_CMDLINE_LINUX_DEFAULT='nowatchdog nvme_load=YES loglevel=3'.However, even using the
GRUB_CMDLINE_LINUX_DEFAULTabove, the gpu passthrough is working flawlessly.Is there any reason why I should update the
GRUB_CMDLINE_LINUX_DEFAULTparameter according the script above?If useful, I'm using
EndeavourOS.Thanks!