# Kernel cmdline

## jpp_

Hello, i think this question belongs here, because is about the cmdline in kernel, i need some guidance, thanks in advance and sorry for my poor English.

I'm trying to assign the vfio-pci driver to a port in a sata controller, the problem is,this sata controller has two ports (in different s iommu groups, but same ids)

so i cannot do it like i already do to my vga, because i need one to the host and the other to the vm.

Here the cmdline:

```

CONFIG_CMDLINE="root=PARTUUID=b93xxxxxxxxxxxxx options vfio-pci.ids=10de:13c0,10de:0fbb,8086:1d20

```

now, how can i load a sh file there? or the contents of it?

This one:

/sbin/sata2.sh

```
#!/bin/sh

DEVS="0d:00.0"

for DEV in $DEVS; do

    echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override

done

modprobe -i vfio-pci

```

I have no boot loader or initramfs, i load the kernel from the bios (uefi)

Also, how can i know the id of the disk connected to 0d:00.0?

Any help would be appreciated.

Thanks

----------

## szatox

Kernel CMD line collects arguments provided by bootloader and presents then to the user. So, if you really want to put that script in kernel's command line, you have to configure your bootloader to do that. 

I just hope you don't expect kernel to execute any script provided this way. This is not how it works.

Better just make that script another service that will be started by init, or even make it a part of init (if you write init scripts yourself).

----------

