Redirect early boot logs to a file

I need to capture logs to a file early in the boot process. I’ve tried using file-logger but it initializes too late so it’s missing vital logs. Is there a way to redirect form start of boot?