Custom Initramfs/Hibernation

Hibernation (suspend to disk) is a special case. If you intend to use it in your Custom Initramfs, you need to be aware of the pitfalls, or you will suffer from utter and complete data loss. If you intend to use this, you should have a really good understanding of how Linux works, particularly how its various storage layers play together. Alternatives are available. You could Suspend to RAM, which does not involve initramfs at all. Or you could just shutdown properly...

This article assumes you already have written your custom and fully operational and now wish to add Hibernation support to it. If you are not using a Custom Initramfs, or for a less specific introduction to the topic, see Suspend and hibernate instead.