def METHOD_NAME(self):
    with MountContext(label='ONIE-BOOT', log=self.log) as octx:
        pat = "%s/onie/initrd.img*" % octx.dir
        l = glob.glob(pat)
        if not l:
            raise ValueError("cannot find ONIE initrd")
        initrd = l[0]
        with InitrdContext(initrd=initrd, log=self.log) as ictx:
            # copy the Switch Light grubenv out of its GRUB directory
            dst = os.path.join(ictx.dir, "tmp/grubenv")
            with MountContext(label='SL-BOOT', log=self.log) as sctx:
                src = os.path.join(sctx.dir, "grub/grubenv")
                self.copy2(src, dst)
            # use the ONIE runtime's GRUB tools to read it
            grubEnv = ChrootGrubEnv(ictx.dir, mounted=True,
                                    bootDir="/",
                                    path="/tmp/grubenv",
                                    log=self.log)
            buf = getattr(grubEnv, 'boot_config_default', None)
    if buf is None:
        raise ValueError("Cannot recover filesystem(s) -- missing boot_config_default.")
    if buf == "":
        raise ValueError("Cannot recover filesystem(s) -- empty boot_config_default.")
    try:
        buf = buf.decode('base64', 'strict')
    except binascii.Error:
        raise ValueError("Cannot recover filesystem(s) -- corrupted boot_config_default.")
    if "SWI=flash" in buf:
        raise ValueError("Cannot recover filesystem(s) -- local SWI cannot be recovered.")
    with MountContext(label='FLASH', log=self.log) as ctx:
        dst = os.path.join(ctx.dir, 'boot-config')
        with open(dst, "w") as fd:
            self.log.debug("+ cat > %s", dst)
            fd.write(buf)
    return 0