Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel cmdline
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
juampii
n00b
n00b


Joined: 23 Oct 2009
Posts: 57
Location: Argentina

PostPosted: Tue Mar 21, 2017 4:25 pm    Post subject: Kernel cmdline Reply with quote

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:
Code:

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
Code:
#!/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
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1747

PostPosted: Tue Mar 21, 2017 7:16 pm    Post subject: Reply with quote

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).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum