openSUSE 12.3 installer formatting encrypted devices

Hi, this morning I wanted to replace my openSUSE 12.2 by openSUSE 12.3 doing a fresh installation from a USB-stick (using a recent image of a KDE-live system). I am using an encrypted partition to store the volumes of a LVM-volume group (root, home and swap). root should get reformatted (from btrfs back to ext4), but of course I chose to keep my home-partition, it should get reused without being formatted. I entered this setup in the graphical installation program (YaST installer). I had done that before, quite often, what should go wrong? I went on not noticing the entry “Set up encrypted DM device on /dev/sda2”. What does that mean? Will it create some entries in configuration files for handling the encrypted device? No, it means that it will try to reformat the entire encrypted partition using “cryptsetup luksFormat” thus wiping out all volumes stored there although it was only told to format a single volume. Of course my last backup was quite old… but I was lucky: When reinstalling I always mount my home-partition–for accessing my files but also for noting when the installation program tries to touch the volume. I could not imagine that this would happen and thought this would be a quite useless precautionary measure–but actually this saved my day and not only this day: The installer (or cryptsetup or some layer in-between) noticed that there was a mounted partition using this device and refused to format /dev/sda2. First I did not understand the error messages but then–when realising the situation–I was shocked. Nervously unmounting the partition would have caused a total loss.

Afterwards there were even more surprises: This is a known bug! It had been reported before the release of 12.3. According to the report it can even wipe out your data although you did not press the button to start the installation! And it also causes the formatting of luks-encrypted devices which are completely unrelated to the installation—they just have to be open (later I retried the installer, I had plugged in an external hard drive containing an open encrypted LVM containing ext4/btrfs-volumes, I did not select it in the installation, but the installer wanted to format the partition (and it still wanted to format the partition containing my root-volume, although there was no btrfs-volume left iirc)). The bug had been marked as critical and as a potential “ship stopper”–but then somebody decided that encountering this bug would be too unlikely! Well, they might not have known all situations where this bug can occur and the particular steps to reproduce described in the report may appear unlikely and the bug may have been there before without anybody complaining. But, seriously, they wanted to risk total data loss just because a particular situation seems to be unlikely–although it actually happened? And of course you never know for sure whether such a critical bug may affect more situations than you thought.

The bug has been fixed in the libstorage-codebase before the release. However, it was not contained in the release and the disk images provided at opensuse.org still contain the bug and might erroneously format some partitions. About two weeks after the release there have been updates to libstorage and yast2-storage. After having updated the packages in the live system the installation worked as expected and I am currently using it. But my confidence in openSUSE-releases has been shaken.

2 Responses to “openSUSE 12.3 installer formatting encrypted devices”

  1. Chaz6 Says:

    Heads up: your blog is broken

    Notice: Undefined index: q in /var/www/virtual/the-user.org/crawltrack/htdocs/crawltrack.php on line 556

    Notice: Undefined index: as_q in /var/www/virtual/the-user.org/crawltrack/htdocs/crawltrack.php on line 559

    Notice: Undefined index: as_epq in /var/www/virtual/the-user.org/crawltrack/htdocs/crawltrack.php on line 562

    Notice: Undefined index: as_oq in /var/www/virtual/the-user.org/crawltrack/htdocs/crawltrack.php on line 565

    Notice: Undefined index: as_eq in /var/www/virtual/the-user.org/crawltrack/htdocs/crawltrack.php on line 568

    Notice: Undefined index: as_occt in /var/www/virtual/the-user.org/crawltrack/htdocs/crawltrack.php on line 571

  2. The User Says:

    @Chaz6
    Thanks a lot for your remark.

Leave a Reply

XHTML: Use <blockquote cite="name"> for quotations, <pre lang="text    ∨ cpp-qt ∨ cpp ∨ bash ∨ other language"> for code, [latex] for formulas and <em> for em. Contact me if the comment does not get published, it may have accidentally been marked as spam.

Anti-Spam Quiz: