|
Bugzilla – Full Text Bug Listing |
| Summary: | systemd: doesn't mount my encrypted /home | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 12.1 | Reporter: | Vincent Untz <vuntz> |
| Component: | Basesystem | Assignee: | Karl Eichwalder <ke> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Major | ||
| Priority: | P5 - None | CC: | fcrozat, ke, lnussel, suse-beta |
| Version: | Factory | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
dmesg
dmesg with systemd debug info :-) |
||
|
Description
Vincent Untz
2011-09-06 13:39:36 UTC
Created attachment 449359 [details]
dmesg
Created attachment 449362 [details]
dmesg with systemd debug info :-)
Relevant fstab line: /dev/mapper/cr_sda3 /home ext4 acl,user_xattr,noauto 0 0 Could it be the noauto? So apparently, removing noauto is enough for this. An alternative is to change the flags to "...,noauto,comment=systemd.automount". As I certainly didn't add noauto myself, I can only assume we used to create encrypted partitions this way, and so on upgrade to 12.1, this will possibly be an issue people will hit. So it should at least get documented in the release notes that people should remove the noauto flag themselves. YaST can in theory correct such things on upgrade. It should be nofail instead of noauto though (boot.crypto can time out and you don't want to fall into single user mode then). The noauto is probably from a time when nofail wasn't supported. It needs to be clarified whether yast still adds 'noauto' nowadays. just for the record, boot.crypto isn't used at all under systemd (but similar feature in systemd can also timeout ;) I know but if the installation is not migrated to systemd just removing noauto would be wrong. nofail is needed to prevent emergency mode in boot.localfs then. boot.localfs is also disabled under systemd ;) To write a proper release notes entry (without doing research first), I need a summary, please ;) Karl, something like this would do it: "If you are using encrypted partitions, and you notice they are not automatically mounted with systemd, a likely cause is the 'noauto' flag in /etc/fstab for these partitions. Simply remove this flag. For instance, change the following line: /dev/mapper/cr_sda3 /home ext4 acl,user_xattr,noauto 0 0 to /dev/mapper/cr_sda3 /home ext4 acl,user_xattr 0 0 " /dev/mapper/cr_sda3 /home ext4 acl,user_xattr,nofail 0 2 If the example is changed to use "nofail", then the sentence
Simply remove this flag.
should be changed to
Simply replace the "noauto" flag with "nofail".
That said: I'd really welcome if this was fixed automatically by YaST or zypper dup. Shouldn't be too hard IMHO - the following sed command in %post of cryptsetup (or another package) should work: (Warning: untested!)
sed -i '/^\/dev/mapper/cr_/ s/,noauto,nofail/' etc/fstab
(In reply to comment #12) > dup. Shouldn't be too hard IMHO - the following sed command in %post of > cryptsetup (or another package) should work: (Warning: untested!) > sed -i '/^\/dev/mapper/cr_/ s/,noauto,nofail/' etc/fstab Argh, obviously untested :-/ sed -i '/^\/dev\/mapper\/cr_/ s/,noauto,/nofail/' etc/fstab Untested again, but at least the syntax should be correct now ;-) Once again, it too confusing to write a release notes entry. Please, fix the reported bug first; see comment 12 and 13. Once done, please provide an update RN entry and assign the bug to me again. (I hope that this procedure is ok with you.) Karl: is comment 10 not enough? (with the change mentioned by Luwdig and Christian in comments 11 & 12) I'm unsure what package would fix this on upgrades anyway -- the way you reassigned the bug, nothing will get fixed :/ (In reply to comment #15) > I'm unsure what package would fix this on upgrades anyway The boot.crypto initscript and /etc/crypttab are both owned by cryptsetup, which is maintained by Ludwig. I'm sure he's a better assignee than the screening team for this bug. Ludwig, what do you think about fixing this bug with sed on /etc/fstab in %post of cryptsetup? See comment #13 (In reply to comment #15) > Karl: is comment 10 not enough? (with the change mentioned by Luwdig and > Christian in comments 11 & 12) Literal diffs are always a PITA ;) But otherwise, you are right. Here is the merged version that I'm going to add to the RN: <title>Mounting Encrypted Partitions with systemd</title> <para> If encrypted partitions are not automatically mounted with systemd, the 'noauto' flag in <filename>/etc/fstab</filename> for these partitions could be the cause. Replacing this flag with 'nofail' will fix it. For instance, change the following line:</para> <screen>/dev/mapper/cr_sda3 /home ext4 acl,user_xattr,noauto 0 0</screen> <para> to </para> <screen>/dev/mapper/cr_sda3 /home ext4 acl,user_xattr 0 0</screen> (In reply to comment #16) > (In reply to comment #15) > > I'm unsure what package would fix this on upgrades anyway > > The boot.crypto initscript and /etc/crypttab are both owned by cryptsetup, > which is maintained by Ludwig. I'm sure he's a better assignee than the > screening team for this bug. > > Ludwig, what do you think about fixing this bug with sed on /etc/fstab in %post > of cryptsetup? See comment #13 I cloned the bug: bnc#724113 Done (sr to Factory). (In reply to comment #17) > Literal diffs are always a PITA ;) Yes, seems so ;-) > <screen>/dev/mapper/cr_sda3 /home ext4 > acl,user_xattr,noauto 0 0</screen> > <para> > to > </para> > <screen>/dev/mapper/cr_sda3 /home ext4 acl,user_xattr 0 > 0</screen> The last line should contain acl,user_xattr,nofail (the ",nofail" is missing). Thanks for spotting (no, I did not do this intentionally)! Now fixed in SVN: <sect3 id="crypto-part-systemd"> <!-- bnc#716136 --> <title>Mounting Encrypted Partitions with systemd</title> <para> If encrypted partitions are not automatically mounted with systemd, the <literal>noauto</literal> flag in <filename>/etc/fstab</filename> for these partitions could be the cause. Replacing this flag with <literal>nofail</literal> will fix it. For instance, change the following line:</para> <screen>/dev/mapper/cr_sda3 /home ext4 acl,user_xattr,noauto 0 0</screen> <para>to</para> <screen>/dev/mapper/cr_sda3 /home ext4 acl,user_xattr,nofail 0 0</screen> </sect3> now if you also change the last zero to 2 you get fsck too Thanks, fixed in SVN. To avoid confusion, I changed both entries (old and new): ... <screen>/dev/mapper/cr_sda3 /home ext4 acl,user_xattr,noauto 0 2</screen> <para>to</para> <screen>/dev/mapper/cr_sda3 /home ext4 acl,user_xattr,nofail 0 2</screen> </sect3> submitted again |