I recently “tidied up” and removed unneeded partitions, and a few other helpful things. Unfortunately, afterwards the system (OS 42.3) wouldn’t hibernate … or, I think, it wouldn’t resume from hibernate.
Can you tell me where the hibernate target partition is set?
(I know where the resume partition is set … in grub2 via yast2 bootloader)
How can I know (or control) which swap partition it’s going to choose to use for resume so I can be certain it’s set correctly on the grub line? Or do I need to put all the swap partitions on the grub line?
Hi, apparently sdb5 is used first to store the hibernation image since you set pri=10 in fstab, so resuming from sda4 finds no image to read.
Setting GRUB to resume from sdb5 should fix things, or maybe you prefer to change swap priorities in fstab.
True, if either a non-commercial system or a non-scientific (laboratory) system, with only one disk drive.
IOW, more than 90 % of the “home” (or “student”) systems …
IMHO, not true for large commercial systems and large scientific (laboratory) systems, with multiple disk drives and/or RAID and, compute intensive applications …
Thanks. This may answer my current puzzlement, given the earlier statement about priorities. Hibernate isn’t using sdb5 but sda4 - I can tell by “adjusting” the grub/kernel resume partition:). The sizes of all the swap partitions are different:
I’m vaguely puzzled by the different partition sizes, none of which are 8GB, as they will all have been created as 8GB (or 8192 MB) within either gpart or fdisk, but that’s a question for another day. Probably down to sector alignment.
# fdisk -l /dev/sda
Disk /dev/sda: 57.3 GiB, 61492838400 bytes, 120103200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x15a32722
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 63 9389519 9389457 4.5G b W95 FAT32
/dev/sda2 9389520 72318959 62929440 30G 7 HPFS/NTFS/exFAT
/dev/sda3 89102160 120098159 30996000 14.8G f W95 Ext'd (LBA)
/dev/sda4 72318960 89102159 16783200 8G 82 Linux swap / Solaris
/dev/sda5 89102223 93305519 4203297 2G 7 HPFS/NTFS/exFAT
/dev/sda6 93305583 99610559 6304977 3G 7 HPFS/NTFS/exFAT
/dev/sda7 99610623 120098159 20487537 9.8G 7 HPFS/NTFS/exFAT
Partition table entries are not in disk order.
$ echo $(( 16783200 * 512 ))
8592998400
# fdisk -l /dev/sdb
Disk /dev/sdb: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x93d23bfd
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 4096 131071 126976 62M 6 FAT16
/dev/sdb2 131072 524287 393216 192M 83 Linux
/dev/sdb3 524288 96860159 96335872 46G 7 HPFS/NTFS/exFAT
/dev/sdb4 138801600 234436544 95634945 45.6G 5 Extended
/dev/sdb5 138805248 155572223 16766976 8G 82 Linux swap / Solaris
/dev/sdb6 155573523 234434559 78861037 37.6G 83 Linux
$ echo $(( 16766976 * 512 ))
8584691712
In physical reality it has 8 GB memory - 4 x 2GB cards.
I’d like to get the hibernate partition onto sdc, and remove sda as it has multiple old Windows installs, kept for incompatible software reasons after I migrated to Linux (they now fire up as VMs under vbox). I’ll increase the swap partition size on sdc to 12GB and reduce the one on sda (SSD) to 4GB. I also want to move sdb to GPT and boot to UEFI, but that’s a whole different can of worms.
Swap is needed solely for inefficient data analysis packages which insist on keeping the whole dataset in memory.
k for 1024 instead of 1000 (as is the normal ISO standard for all ISO standard units) is used since somewhere in the beginning of computers.
Nowadays one tries to use ki, Mi, etc. for the 1024, 1024*1024, etc. notations.
Dolphin e.g. show clearly in the Size column 130.9 KiB, etc. on my system.
As I said in my earlier post, tools that already exist very long may still use k for 1024. The problem is that one can not tell very easy what is used.
You only need one swap, unless you have a really odd requirement, and it is large enough (note the mem image is compressed)
Just don’t mount the others. Note if you manull edit the fstab then you also need to manually adjust the resume in grub. If you use yast disk management grub should be updated at the same time.
The 8G is taken as a rough hint by the partitioning software.
“/dev/sda” uses legacy partitioning. It is old-style, with partitions being aligned on cylinders or tracks – preferably cylinders. And “/dev/sda4” is a primary partition, so gets a full quota of cylinders. A logical partion ("/dev/sda5" or later on that drive) would typically get one track short of a set of cylinders. That’s because each logical partition requires an additional partition table, and usually a track was reserved for that.
“/dev/sdb” uses legacy partitioning, but new-style where boundaries are at MiB alignment rather than track alignment. That’s better suited to modern disks where the cylinder/track as seen by the logic is not related to the physical structure.
“/dev/sdb5” is a logical partition. That still requires an additional partition table. And most partitioning software well set aside 1MiB of disk space for that, though a few will just start it at the first available physical sector or the first available logical sector.
I can’t comment on “/dev/sdc” since you did not give detailed info for that.
Puzzled here too: how can you tell that hibernate is using sda4? According to your original post the system tries to resume from sda4, pointed to by the boot line, but doesn’t succeed: how can you tell that a system image is actually stored there?
From the above lines I see that only sdb5 is actually used, according to the priorities set.
Size of the swap partitions should not matter much under most conditions; this is what I see with 16 GB RAM and 8GB swap:
You have 16 gig RAM??? Hibernate will only use ONE (1) partition and 8 gig would not be enough you need single ~16 Gig swap. I’d expect the save to go to the first swap but resume is set in Grub resume stanza these two must agree
Ok got confused there. Though the memory image is compressed. compression percentages can vary thus you need a minimum swap the size of RAM at least until you get into huge memory images +12gig then you need to rethink
I think the multiple mounted swaps is just confusing the system and the OP in this case. Drop back to using only one swap. And be sure that grub resume points to that one and only swap. Removing the mounts via yast should sync grub also.