mirror of
https://github.com/rancher/os.git
synced 2025-07-02 01:31:48 +00:00
Mount raspberrypi boot partition
This commit is contained in:
parent
2f0d0a9585
commit
404f5b38da
@ -2,9 +2,11 @@ package fsmount
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/rancher/os/config"
|
"github.com/rancher/os/config"
|
||||||
|
"github.com/rancher/os/config/cmdline"
|
||||||
"github.com/rancher/os/pkg/init/bootstrap"
|
"github.com/rancher/os/pkg/init/bootstrap"
|
||||||
"github.com/rancher/os/pkg/log"
|
"github.com/rancher/os/pkg/log"
|
||||||
"github.com/rancher/os/pkg/util"
|
"github.com/rancher/os/pkg/util"
|
||||||
@ -34,6 +36,15 @@ func MountBoot(cfg *config.CloudConfig) (*config.CloudConfig, error) {
|
|||||||
return cfg, nil
|
return cfg, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rootDevice := cmdline.GetCmdline("root").(string)
|
||||||
|
|
||||||
|
if rootDevice != "" && strings.Contains(rootDevice, "mmcblk") {
|
||||||
|
if err := util.Mount("/dev/mmcblk0p1", config.BootDir, "vfat", ""); err != nil {
|
||||||
|
log.Debugf("Not mounting BOOT: %v", err)
|
||||||
|
return cfg, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if err := mountConfigured("boot", cfg.Rancher.State.BootDev, cfg.Rancher.State.BootFsType, config.BootDir); err != nil {
|
if err := mountConfigured("boot", cfg.Rancher.State.BootDev, cfg.Rancher.State.BootFsType, config.BootDir); err != nil {
|
||||||
log.Debugf("Not mounting BOOT: %v", err)
|
log.Debugf("Not mounting BOOT: %v", err)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user