How to activate ‘hibernate’ in Korora/Fedora

Hibernate or suspend to disk in computing can be known as powering down computer and retaining its state. In the hibernate state, the operating system save the contents of RAM into a hard disk or non-volatile things then power down the machine.

Sometimes when we seriously working on something suddenly a serious things occurs (like have to move to another place, need to do something important, etc.). Of course in this moment we doesn’t want to lose what we have done and have to keep our working state. When this things happen, we can use the hibernate function to retain our works which is still in RAM into a hard disk. After the serious things is finished we can get back to work and all the conditions of the computer will return exactly at the point of the hibernation.

To be able the hibernate function worked, you must have swap partition and is enabled. The swap partition is created when you asked to create partitions during the installation process of Fedora/Korora. The common way to determine how many partitions you need is by make 3 separate partitions. One is for / (root), the second partition is /home for your home directory and the last partition is /swap. The size of each partition is depends on what you want to do with your system. Normally, the / (root) partition can be in size of 40 GB which is more than enough, the /swap partition is 2 times of your RAM size, and the rest is for your /home partition.

Why only 3? In my opinion the answer is simple.

The / (root) partition is the place for all program and system configuration including the library files that needed by the system and applications that come with Fedora/Korora. The /home partition is a place for your home directory and your data including some application or specific desktop configuration files. The /swap partition is a place for swapping process or moving some application that runs in the memory into the swap partition to make more space in the memory when a new application is run and need more memory space.

By using 3 separate partition, when you want to use another Linux distribution or re-install the Fedora/Korora Linux because of something is happen and you doesn’t want to lose your data files, you only need to wipe and then install your Linux in the / (root) partition, so your data files is safe. That’s it.

To make the hibernate function run, make sure your swap partition is enabled in /etc/fstab (see the image below).

swap-fstab

Then open your grub configuration file and add ‘resume=/dev/disk/by-uuid/3feee6f0-53bb-4f54-abf8-f09e3bce7a96‘ or if you remember where the swap partition is mounted you can use it like this ‘resume=/dev/sda3‘ (in my computer, the swap partition is mounted on /dev/sda3) in the GRUB_CMDLINE_LINUX options after or before the rhgb quiet value (see the image below). To make modify the grub configuration easy, use the grub-customizer applications. If you don’t have it, install it from the fedora repository by execute ‘sudo dnf install -y grub-customizer‘.

Grub settings

Don’t forget to save the changes you made and rebuild the grub again with command, grub2-mkconfig -o /boot/grub2/grub.cfg. If you use grub-customizer application, the rebuild process is done automatically with the save process. Then after rebooting your computer, you will have the hibernate button functioning or if you want to test the hibernate function, just execute this command in the terminal ‘systemctl hibernate‘ as root user or using sudo.

Advertisements

4 thoughts on “How to activate ‘hibernate’ in Korora/Fedora

    • Thank you for read and give comment on my article.
      Yes, I’m not using UEFI and able to turned it off from BIOS.
      In fact, I have a problem that cause my computer can’t boot with the UEFI stuff even I’m doing the installation right.

      Like

      • Yes, I tried may be almost three or four times installing Fedora and three times installing Korora. I think the problem is in the BIOS or related with that. Because when the installation process is almost reach the end state and reach the grub part, its shows an error message which told me that the installer can’t install or made changes in the boot order stuff or something related with the UEFI.
        In the BIOS, I can see the Korora/Fedora boot order but when I boot my computer and chose that options, nothing happen. So, I decide to use the old way and forget about the UEFI for a while. Oh, btw, I’m using Asus K43TA laptop.

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s