I'm using Ubuntu 18.04 and Windows 10 on my laptop (Samsung 9 Always). I'm switching back and forth between the two OSs. I became to wonder if I can save all the open applications and data before switching the OSs like making the system hibernate by saving its status into HDD or SSD. However, in reality, after making one OS hibernate, I cannot reboot the system into another one. Instead, the system always wakes up in the same OS without allowing me to choose a different OS.

Is there any possible way to make one OS hibernate with applications and data safely stored and make the system reboot another one?

  • Ubuntu has the option to save your session. Look in settings for "Session and startup" or something like that, go to "sessions" and hit the checkmark for "Save session for next boot". This will be remembered and from now on the default behaviour when you perform a regular shutdown. – confetti Oct 2 '18 at 10:47
  • Install one OS as a virtual machine in the other. – harrymc Oct 2 '18 at 12:56
  • DrMoishe Pippik's answer describes doing exactly what you ask. That approach has limitations and risks, as he describes. The cleanest way to accomplish what you want is with a virtual machine, as harrymc mentions in a comment, and that keeps everything live so there is no delay in switching from one to the other. You can even set it up so you can access files across OSes. Does your computer have (or can you add), enough memory to support both OSes (you can allocate a different amount of memory to each OS as needed to support what you use it for)? – fixer1234 Oct 2 '18 at 23:45

It is possible to hibernate Ubuntu, provided that there is sufficient swap space to store RAM and there's no partition formatted btrfs. This is fairly safe if you're the only person accessing the PC, because native Windows file operations should not affect the Linux swap partition (though third-party tools such as DiskGenius can).

The converse, however, is problematic, because Linux is able to read and write to any Windows partition, which might cause errors or leave the system damaged after Windows emerges from hibernation. By default, Ubuntu prevents mounting a "dirty" partition, i.e. one used for hiberfil.sys. Mounting can be forced in read-only mode using sudo mount -o ro /dev/partition-name /mount-point, which limits use of the partition, or it can be mounted read/write using ntfsfix, with the likelihood of harming Windows.

  • My dual-boot condition is quite simple and the two OSes do not have any file accesses to the other. That is, they are completely separated. Previously, I had a problem in Ubuntu not going into hibernation (i.e., 'sudo systemctl hibernate' didn't work). Now, it became to hibernate after I turned off the Fast Boot and Secure Boot options in BIOS. – Scott Seongwook Lee Oct 3 '18 at 5:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.