1

I have Ubuntu 18.04 Server. I find the behaviour of GRUB is strange.

When I uncomment line in /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on"

intel_iommu isn't loaded in the kernel.

And when I uncomment line:

GRUB_CMDLINE_LINUX="intel_iommu=on"

intel_iommu is loaded in the kernel.

My config:

GRUB_DEFAULT=0
#GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
#GRUB_CMDLINE_LINUX_DEFAULT="maybe-ubiquity"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on"
GRUB_CMDLINE_LINUX=""
#GRUB_CMDLINE_LINUX="intel_iommu=on"

I know that GRUB_CMDLINE_LINUX_DEFAULT is loaded when is normal mode only. Contrarywise GRUB_CMDLINE_LINUX is loaded when is normal mode or recovery mode.

Do it seems my ubuntu load in recovery mode?

Why intel_iommu do not load with GRUB_CMDLINE_LINUX_DEFAULT?

Where can I look for a log of GRUB loading?

EDIT:

After that, I didn't forget about sudo update-grub.

UPDATE:

1. When so:

GRUB_CMDLINE_LINUX_DEFAULT="maybe-ubiquity"
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on"
#GRUB_CMDLINE_LINUX=""
GRUB_CMDLINE_LINUX="intel_iommu=on"

Result:

# sudo virt-host-validate
...
QEMU: Checking if IOMMU is enabled by kernel                               : PASS
...

dmesg | grep -E "IOMMU"

[ 0.000000] DMAR: IOMMU enabled [ 0.000000] DMAR-IR: IOAPIC id 8 under DRHD base 0xfed91000 IOMMU 1

cat /etc/modules

/etc/modules: kernel modules to load at boot time.

This file contains the names of kernel modules that should be loaded

at boot time, one per line. Lines beginning with "#" are ignored.

2. And when so:

#GRUB_CMDLINE_LINUX_DEFAULT="maybe-ubiquity"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on"
GRUB_CMDLINE_LINUX=""
#GRUB_CMDLINE_LINUX="intel_iommu=on"

Result:

# sudo virt-host-validate
...
QEMU: Checking if IOMMU is enabled by kernel                               : WARN (IOMMU appears to be disabled in kernel. Add intel_iommu=on to kernel cmdline arguments)
...

dmesg | grep -E "IOMMU"

[ 0.000000] DMAR-IR: IOAPIC id 8 under DRHD base 0xfed91000 IOMMU 1

cat /etc/modules

/etc/modules: kernel modules to load at boot time.

This file contains the names of kernel modules that should be loaded

at boot time, one per line. Lines beginning with "#" are ignored.

Bob
  • 208
  • After any update to grub or initramfs you need to run the appropriate update afterwards or the changes never take affect. – SimpliFixed Sep 30 '20 at 17:13
  • @Melebius I do 'sudo update-grub' but unfortunately it does not help me. I have no variants. – Bob Oct 02 '20 at 09:51
  • @SimpliFixed I do all update but it happens again. – Bob Oct 02 '20 at 09:56
  • With it disabled in /etc/grub/default, go look the the correct conf file and see if its enabled there: /boot/grub/grub.conf or /boot/grub2/grub.cfg, look for the kernel line also check dmesg and pipe it into grep and see if DMAR is listed – SimpliFixed Oct 02 '20 at 15:17
  • What motherboard do you have and what GPU? – SimpliFixed Oct 02 '20 at 15:22
  • @SimpliFixed When I uncomment the default with intel_iommu, intel_iommu is disappeared from '/boot/grub/grub.conf', DMAR and dmesg show me that intel_iommu don't load. I have ASUSTeK H97M-E, ASUSTeK GTX 950. – Bob Oct 03 '20 at 05:28
  • Do you see DMAR in dmesg with it not loaded in grub? Also search dmesg with grep for "IOMMU and also cat /etc/modules – SimpliFixed Oct 03 '20 at 20:11
  • @SimpliFixed I have updated post. – Bob Oct 05 '20 at 00:45
  • Is this a virtual box? How is QEMU being used? – SimpliFixed Oct 05 '20 at 16:05
  • @SimpliFixed It's problem at the real computer then I use it to run 2 VM. I use KVM. And 2 VM run properly when is uncommented GRUB_CMDLINE_LINUX at the real computer. 1 VM use passthrough GPU. – Bob Oct 06 '20 at 01:17

0 Answers0