I tried adding:

GRUB_CMDLINE_LINUX="selinux=0"

to /etc/default/grub, then ran:

grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

That successfully added the following to grub.cfg:

if [ -z "${kernelopts}" ]; then
  set kernelopts="root=UUID=36a097ba-7577-4cc9-977e-df76c6590c48 ro selinux=0 "
fi

However, /boot/efi/EFI/fedora/grubenv didn't contain "selinux=0".  So I 
manually added that via:

grub2-editenv - set "kernelopts=BOOT_IMAGE=(hd1,msdos2)/vmlinuz-5.8.0-1.fc33.aarch64 
root=UUID=36a097ba-7577-4cc9-977e-df76c6590c48 ro selinux=0 "

But that doesn't seem to have any effect.  After booting, I still see:

# cat /proc/cmdline
BOOT_IMAGE=(hd1,msdos2)/vmlinuz-5.8.0-1.fc33.aarch64 
root=UUID=36a097ba-7577-4cc9-977e-df76c6590c48 ro

Where does the kernel get its command line on RPi?

        Steve

On 9/8/20 3:56 PM, Steven A. Falco wrote:
I'd like to add a kernel command line option (selinux=0) on a raspberry pi.

Normally, I'd edit /etc/default/grub and append that setting to the 
GRUB_CMDLINE_LINUX variable, then run grub2-mkconfig to regenerate the 
/boot/efi/EFI/fedora/grub.cfg file.

However, on the pi, /etc/default/grub doesn't have a GRUB_CMDLINE_LINUX 
variable defined.  Yet, I do see this line in /boot/efi/EFI/fedora/grub.cfg:

set kernelopts="root=UUID=36a097ba-7577-4cc9-977e-df76c6590c48 ro  "

To accomplish what I want, should I add a new GRUB_CMDLINE_LINUX variable to 
/etc/default/grub, for example:

GRUB_CMDLINE_LINUX="root=UUID=36a097ba-7577-4cc9-977e-df76c6590c48 ro selinux=0"

Or is there a more correct way to do this?

     Steve
_______________________________________________
arm mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]

Reply via email to