Comment 9 for bug 474258

Revision history for this message
Steve Langasek (vorlon) wrote :

I agree with Johnny's analysis here; any crypttab setup done via the Ubuntu installer should use UUIDs, not partition names, since the latter are not guaranteed to be stable.

I disagree with the original suggestion to check the partition type, as I don't think that's a reliable check in general. It could prevent this issue for some users, but for others it would just cause silent failures to enable crypted swap at boot. And if crypttab were using UUIDs to begin with, this should be a non-issue.

I'm sorry it's taken so long for this bug to come to come to anyone's attention; unfortunately I don't think anyone was tracking cryptsetup bug reports at the time it was filed, and afterwards it seems to have been lost in the mass of untriaged bugs. Now that it's on our radar, we should be able to fix this in much less than two years... :/

Surbhi, do you think you could take a look at this to make sure the installer is using UUIDs anywhere it touches /etc/crypttab, and possibly fix cryptsetup to migrate /etc/crypttab from partition names to UUIDs on upgrade? (There's code about that's been used to do this in various other packages before, for /etc/fstab and the like.) This probably also needs checking to make sure UUIDs *can* be used for crypted random swap; it's possible that the UUID gets wiped when using randomly-keyed crypt for swap.