FS#22666 - [initscripts] encrypted swap stops working after upgrading to 2011

Attached to Project: Arch Linux
Opened by David Bluecame (david.bluecame) - Sunday, 30 January 2011, 12:07 GMT
Last edited by Thomas Bächler (brain0) - Sunday, 27 February 2011, 10:58 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
encrypted swap using crypttab defaults stop working after upgrading from initscripts 2010-07 to 2011-01


This task depends upon

Closed by  Thomas Bächler (brain0)
Sunday, 27 February 2011, 10:58 GMT
Reason for closing:  Fixed
Comment by Thomas Bächler (brain0) - Sunday, 30 January 2011, 12:43 GMT Comment by Jens Adam (byte) - Wednesday, 02 February 2011, 21:51 GMT
I fixed it with removing the "-p" parameter from blkid in line 154.
Comment by Thomas Bächler (brain0) - Thursday, 03 February 2011, 00:39 GMT
That is a very bad idea. It will pull data from the cache instead of checking the actual device.
Comment by Jens Adam (byte) - Thursday, 03 February 2011, 06:40 GMT
Have you tried it?
blkid /dev/sda1 (my encrypted swap) -> no output, return code 2.
blkid -p /dev/sda1 -> PART_ENTRY_SCHEME="dos" PART_ENTRY_NUMBER="1" (or similar, I'm not at that box atm), return code 0.
Comment by Thomas Bächler (brain0) - Thursday, 03 February 2011, 09:36 GMT
Now that just sucks. I need -p to make sure only the partition is probed, not the cache. This has some undocumented side effects.
1) Partition tables are probed - this is good: blkid -p /dev/sda -> return code 0, this prevents me from overwriting a partitioned device, killing all its partitions.
2) Apparently, if no file system is found, the partition table type is determined - this has nothing to do with the contents of the block device, but with where it is on a bigger one.
This is complete crap, and the behaviour cannot be altered via blkid options (-u has no effect).
Comment by Thomas Bächler (brain0) - Thursday, 03 February 2011, 12:41 GMT Comment by Thomas Bächler (brain0) - Thursday, 03 February 2011, 12:43 GMT
Tobias, any issues with patching util-linux-ng with these patches? They seem to apply cleanly.
Comment by Jens Adam (byte) - Thursday, 03 February 2011, 15:27 GMT
Wow, that was quick. A nice showcase of how working with upstream should look like. :)
Comment by Thomas Bächler (brain0) - Thursday, 03 February 2011, 20:55 GMT
Please try util-linux-ng 2.18-4 from testing. This should fix it.

Loading...