On Fri, 2020-04-17 at 13:21 -0700, Samuel Sieb wrote:
> On 4/17/20 9:13 AM, Patrick O'Callaghan wrote:
> > On Fri, 2020-04-17 at 15:37 +0000, Sreyan Chakravarty wrote:
> > > > On Thu, 2020-04-16 at 17:12 -0700, Samuel Sieb wrote:
> > > > 
> > > > It has to be a partition. A file can be on any kind of filesystem, so
> > > > how would the resume function know what to do?
> > > > 
> > > >  From systemd-hibernate-resume(8):
> > > > 
> > > > systemd-hibernate-resume@.service initiates the resume from 
> > > > hibernation. It is
> > > > instantiated with the device to resume from as the template argument.
> > > > 
> > > > systemd-hibernate-resume only supports the in-kernel hibernation 
> > > > implementation, known as
> > > > swsusp[1]. Internally, it works by writing the major:minor of specified 
> > > > device node to
> > > > /sys/power/resume.
> > > 
> > > If you see the documentation about swsusp here:
> > > https://www.kernel.org/doc/Documentation/power/swsusp.txt
> > > 
> > > It clearly states you can use a swap file.
> > > 
> > > Now I am confused as to why you say a swap file won't work.
> > 
> >  From bootparam(8):
> > 
> >        'resume=...'
> >                This tells the kernel the location of the suspend-to-disk 
> > data that you want the machine to resume from after hibernation.
> >     Usually, it is the same as your swap partition or file.  Example:
> > 
> >                     resume=/dev/hda2
> > 
> > There is no corresponding entry for resume_offset. I don't know if that's 
> > because Fedora doesn't support it.
> 
>  From the header of that man page, it's an "introduction to boot time 
> parameters", not an exhaustive summary.  As far as I can tell, it is 
> valid to use a swap file for hibernation.  That parameter is in the 
> kernel.  You just need to get the right offset to the file.
> 
> I've learned something new which might actually be useful at some point.

If that's the case then the man page for systemd-hibernate-resume is
wrong.

poc
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org

Reply via email to