fix(dracut): force load vfio modules earlier

this should make them load before any gpu drivers
This commit is contained in:
HikariKnight 2025-01-06 14:15:45 +01:00
parent 276cfd953a
commit 0efcf4ee19

View file

@ -22,10 +22,10 @@ func Set_Dracut() {
} }
// Write to logger // Write to logger
logger.Printf("Writing to %s:\nadd_drivers+=\" %s \"\n", dracutConf, strings.Join(vfio_modules(), " ")) logger.Printf("Writing to %s:\nforce_drivers+=\" %s \"\n", dracutConf, strings.Join(vfio_modules(), " "))
// Write the dracut config file // Write the dracut config file
fileio.AppendContent(fmt.Sprintf("add_drivers+=\" %s \"\n", strings.Join(vfio_modules(), " ")), dracutConf) fileio.AppendContent(fmt.Sprintf("force_drivers+=\" %s \"\n", strings.Join(vfio_modules(), " ")), dracutConf)
// Get the current kernel arguments we have generated // Get the current kernel arguments we have generated
kernel_args := fileio.ReadFile(config.Path.CMDLINE) kernel_args := fileio.ReadFile(config.Path.CMDLINE)