- Package:
- debian-installer
- Source:
- debian-installer
- Description:
- Debian Installer documentation
- Submitter:
- allan grossman
- Date:
- 2024-11-26 20:24:01 UTC
- Severity:
- normal
- Tags:
Dear Maintainer,
* What led up to the situation?
Installing Debian using automatic partitioning
* What exactly did you do (or not do) that was effective (or
ineffective)?
Used default automatic partitioning when installing Debian
* What was the outcome of this action?
Resulting swap space is insufficient to support hibernation
* What outcome did you expect instead?
I expected for d-i automatic partitioning to reserve enough swap space
to support hibernation. Kernel documentation at
https://docs.kernel.org/admin-guide/pm/sleep-states.html#hibernation
suggests that default hibernation image size is 2/5 of installed RAM
so most users installing Debian using automatic partitioning will not
be able to hibernate their machine.
Hi, Am 25. November 2024 13:33:31 MEZ schrieb allan grossman <wizard10000@gmail.com>: Which installation did you use? Which URL, from which date? Could you please sent us the installer log files, you can find them in /var/log/installer on the installed system. Holger
Am 25. November 2024 14:56:05 MEZ schrieb Holger Wansing <hwansing@mailbox.org>: Which installation image
It's been probably three months ago, I used the default netinstall image and upgraded it to Unstable.
Hi Allan Am 25. November 2024 16:17:40 MEZ schrieb allan <wizard10000@gmail.com>: there have been changings to fix exactly this issue (amongst others) and the package with these changings has been uploaded on Oct 08, 2024. So, could you try again with a recent image? Thanks Holger
I'm afraid those logs are no longer available.
Hi Allan, Am 25. November 2024 17:25:21 MEZ schrieb allan <wizard10000@gmail.com>: That's no problem. We need you to do another test with a recent image anyway (as I already wrote in another mail). Holger
I'm not able to install on another machine but I did include a screenshot of the default "Guided Partitioning - Use Entire Disk" before actually making changes to a disk. I just did this ten minutes ago using the current netinstall image and as you can see from the attachment d-i wants to create a 1GB swap partition.
Hi, allan <wizard10000@gmail.com> wrote (Tue, 26 Nov 2024 08:18:22 -0600): However: 20G is a rather small disk these days for a workstation with a graphical deskop. For example, when I test it with a 35G harddrive, I get 2G of swap partition. How much RAM has your machine? Holger
I did it on QEMU/KVM and allocated 8GB. Still, if default hibernation image is up to 2/5 of installed RAM a 1GB swap partition could be insufficient. I think the algorithm that allocates swap space might need a look. I can't prove it because the installation no longer exists but I saw that same 1GB swap partition about three months ago when installing to a 240GB external drive on a machine with 8GB RAM.
This screenshot is another VM install I just started - I allocated 12GB RAM and 100GB disk - note swap is still set at 1GB - thanks :)
Hi, allan <wizard10000@gmail.com> wrote (Tue, 26 Nov 2024 09:56:43 -0600): That rule of thumb is new to me. I know the rule, that swap should be as big as RAM. And this was used, to define the new logic for calculation of partitions. Testing this case, I get 8,6 GB of swap. So above rule is followed. And hibernation should work. Holger
Reference - https://docs.kernel.org/admin-guide/pm/sleep-states.html#hibernation Gonna quote the relevant part here but you're welcome to check for yourself :) image_size This file controls the size of hibernation images. It can be written a string representing a non-negative integer that will be used as a best-effort upper limit of the image size, in bytes. The hibernation core will do its best to ensure that the image size will not exceed that number, but if that turns out to be impossible to achieve, a hibernation image will still be created and its size will be as small as possible. In particular, writing ‘0’ to this file causes the size of hibernation images to be minimum. Reading from it returns the current image size limit, which is set to around 2/5 of the available RAM size by default.
Hi, allan <wizard10000@gmail.com> wrote (Tue, 26 Nov 2024 10:06:35 -0600): I guess you used the old installation image from 3 months ago for this test... Holger
I'm afraid not - I downloaded it from debian.org's homepage this morning..
allan <wizard10000@gmail.com> wrote (Tue, 26 Nov 2024 12:32:16 -0600): So this bug would need to be tagged 'unreproducible' since it looks completely different here: 5,5GB of swap on a QEMU VM with 12GB of RAM and 100GB harddrive.
Please give the full URL to what you downloaded instead of letting other people *guess* what you DL-ed.
Excellent, that clears up the confusion. There have been updates in (Unstable and) Testing which is what Holger was referring to. But ofc don't changes aren't available in Stable.
Ah - that makes sense. I'm just glad it got fixed before Trixie's release :) Thanks to you and to Holger!
This is a stable image. Please download a recent daily or weekly build testing/sid image from <https://cdimage.debian.org/cdimage/> My comment on some earlier posts: The new swap size by testing/sid installer is the lower of approximately 5% of available disk size and 100% of RAM size. So it is still limited to 1GB on a 20GB disk, and 8GB on a 160GB disk. (...) IIRC, the hibernation image size cannot exceed half of the RAM size (it must be able to contain a copy of the other half and still fit into memory). Note that the swap area does not contain only the hibernation image. It also contains swapped out data, which were swapped out as part of regular virtual memory operation or to reduce the size of the hibernation image. There is no rule to calculate the swap size for hibernation, it depends on the use case (memory usage and how much swap is used before the system goes to hibernation).