Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#5968 - /etc/rc.sysinit and encrypted fs

Attached to Project: Arch Linux
Opened by Michael (e) - Saturday, 09 December 2006, 12:54 GMT
Last edited by Tobias Powalowski (tpowa) - Saturday, 09 December 2006, 13:16 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To Thomas Bächler (brain0)
Architecture not specified
Severity Critical
Priority Normal
Reported Version 0.7.2 Gimmick
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Bug in /etc/rc.sysinit. I use encrypted /home (via LUKS) on LVM volume. I use /etc/crypttab. I use password that contains spaces, for example "my password".
1. encrypted fs initializes before LVM. I fixed that at attached rc.sysinit.
2. rc.sysinit handles passwords with spaces incorrectly: it think that password is 2 separate columns. I write a workaround for that (I use '*' instead of ' ' as delimiter in /etc/crypttab) - see rc.sysinit. I think I should use TAB delimiter instead '*' but I don't know how to do it.
So new /etc/crypttab should looks like:
home*/dev/vghome/lvhome*"my password"
This task depends upon

Closed by  Thomas Bächler (brain0)
Sunday, 17 December 2006, 22:10 GMT
Reason for closing:  Fixed
Comment by Michael (e) - Tuesday, 12 December 2006, 06:41 GMT
Some cosmetical changes
Comment by Michael (e) - Tuesday, 12 December 2006, 06:42 GMT
Added correct closing of encrypted partitions at /etc/rc.shutdown
Comment by Thomas Bächler (brain0) - Saturday, 16 December 2006, 16:39 GMT
About your changes:
Initializing lvm2 before encryption is a good idea.

However your second change breaks backwards compatibility badly. I almost solved it now, but still use the old file layout, it will be commited in initscripts 0.8.

I don't see why closing the volumes is necessary (apart from the fact that your patch it wrong), everything works fine without closing.
Comment by Michael (e) - Saturday, 16 December 2006, 16:46 GMT
If we don't close the encrypted volumes then lvm2 will not close too. I don't know is it necessary or not but I suggest that is better than leave them opened.
Comment by Thomas Bächler (brain0) - Saturday, 16 December 2006, 23:27 GMT
I fixed the problem. Only thing not working now is passphrases starting with / (because it now assumes that a a keyfile should be used). Some minor backwards incompatibility is there as well, as special characters inside a passphrase have to be escaped now (like "foo\"bar" if the passphrase is foo"bar, or "foo\\bar" if the passphrase is foo\bar. I think this is acceptable, the code is now clean and friendly.

I also added your rc.shutdown suggestion, but if it fails it fails silently.

This will be part of initscripts 0.8.
Comment by Michael (e) - Sunday, 17 December 2006, 04:36 GMT
OK, thanks.

Loading...