Skip to content

Commit

Permalink
init: allow force loading of extra modules via the kernel command-line
Browse files Browse the repository at this point in the history
Fixes #186
  • Loading branch information
nmeum authored and anatol committed Sep 30, 2022
1 parent 1d4a336 commit 969320c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/manpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ Some parts of booster boot functionality can be modified with kernel boot parame
If debug level is enabled then kmsg throttling gets disabled automatically.
* `booster.debug` an obsolete option that is equivalent to `booster.log=debug,console`.
* `quiet` Set booster init verbosity to minimum. This option is ignored if `booster.debug` or `booster.log` is set.
* `modules` a comma-separated list of extra kernel modules which should be force loaded.
* `init=$PATH` path to user-space init binary. If not specified then default value `/sbin/init` is used.

## NOTES
Expand Down
6 changes: 6 additions & 0 deletions init/cmdline.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,13 @@ func parseParams(params string) error {
if err != nil {
return fmt.Errorf("root=%s: %v", value, err)
}
case "modules":
if (value == "") {
break
}

modules := strings.Split(value, ",")
config.ModulesForceLoad = append(config.ModulesForceLoad, modules...)
case "resume":
var err error
cmdResume, err = parseDeviceRef(value)
Expand Down

0 comments on commit 969320c

Please sign in to comment.