Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #61890
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Ben Hutchings <ben@decadent.org.uk> |
| Newsgroups | linux.debian.bugs.dist, linux.debian.kernel |
| Subject | Bug#906664: initramfs-tools: Add partition table support to get_fstype |
| Date | Wed, 22 Aug 2018 22:30:02 +0200 |
| Message-ID | <wpHVo-3v7-11@gated-at.bofh.it> (permalink) |
| References | <wovjz-1pq-3@gated-at.bofh.it> <wp2pc-4cN-7@gated-at.bofh.it> <wp7RT-7iJ-7@gated-at.bofh.it> <wovjz-1pq-3@gated-at.bofh.it> <wp7RT-7iJ-7@gated-at.bofh.it> |
| X-Original-To | Nazar Mokrynskyi <nazar@mokrynskyi.com>, cryptsetup@packages.debian.org |
| X-Mailbox-Line | From debian-bugs-dist-request@lists.debian.org Wed Aug 22 20:27:08 2018 |
| Old-Return-Path | <debbugs@buxtehude.debian.org> |
| X-Spam-Flag | NO |
| X-Spam-Score | -2.299 |
| Reply-To | Ben Hutchings <ben@decadent.org.uk>, 906664@bugs.debian.org |
| Resent-To | debian-bugs-dist@lists.debian.org |
| Resent-Cc | Debian kernel team <debian-kernel@lists.debian.org> |
| X-Debian-Pr-Message | followup 906664 |
| X-Debian-Pr-Package | initramfs-tools |
| X-Debian-Pr-Keywords | wontfix |
| X-Debian-Pr-Source | initramfs-tools |
| X-Spam-Bayes | score:0.0000 Tokens: new, 15; hammy, 150; neutral, 224; spammy, 0. spammytokens: hammytokens:0.000-+--H*c:pgp-sha512, 0.000-+--H*F:D*decadent.org.uk, 0.000-+--H*RU:sk:shadbol, 0.000-+--H*r:sk:shadbol, 0.000-+--HX-SA-Exim-Scanned:sk:shadbol |
| Content-Type | multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-aohfjpuPs+inlGhqT99R" |
| X-Mailer | Evolution 3.28.5-1 |
| MIME-Version | 1.0 |
| X-Sa-Exim-Connect-IP | 148.252.241.226 |
| X-Sa-Exim-Mail-From | ben@decadent.org.uk |
| X-Sa-Exim-Scanned | No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false |
| X-Debian-Message | from BTS |
| X-Mailing-List | <debian-bugs-dist@lists.debian.org> archive/latest/1480847 |
| List-ID | <debian-bugs-dist.lists.debian.org> |
| List-URL | <https://lists.debian.org/debian-bugs-dist/> |
| Approved | robomod@news.nic.it |
| Lines | 118 |
| Organization | linux.* mail to news gateway |
| Sender | robomod@news.nic.it |
| X-Original-Cc | 906664@bugs.debian.org |
| X-Original-Date | Wed, 22 Aug 2018 21:22:19 +0100 |
| X-Original-Message-ID | <a3a0b411e4538eed56f471b0c9ad7572fd95d4b8.camel@decadent.org.uk> |
| X-Original-References | <153468237179.2109.17235396617938097509.reportbug@localhost.localdomain> <f1b83f75b974f68ef09929b5170af559e89104f4.camel@decadent.org.uk> <d5744da2-03cc-7945-87bb-72c770831ec7@mokrynskyi.com> <153468237179.2109.17235396617938097509.reportbug@localhost.localdomain> <d5744da2-03cc-7945-87bb-72c770831ec7@mokrynskyi.com> |
| Xref | csiph.com linux.debian.bugs.dist:914201 linux.debian.kernel:61890 |
Cross-posted to 2 groups.
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Tue, 2018-08-21 at 08:38 +0300, Nazar Mokrynskyi wrote: > 21.08.18 02:57, Ben Hutchings пише: [...] > > LVM inside LUKS (I don't know why you call it multi-layer LVM) is well > > supported in Debian, so I find this statement surprising. > > I know it is supported and expressed this awareness initially. > I call it multi-layer because it has concepts of VGs, PVs and LVs, > which are not straightforward to use, I know this is not technically > correct, sorry about that. > For instance, I was recently moving my fully encrypted Ubuntu (LVM on > top of LUKS) from 500GB HDD to 256GB SSD. > It was a painful and risky operation with no support from graphical > utilities. I did it successfully, but I'd like to not doing this ever > again. > Which is why I found regular partition table much easier to use - I > can just open it with GParted, shrink partitions, move them to the > beginning of the disk and `dd` as much of it as I need. Easy. Yes, shrinking is easy to get wrong with the command line tools. On the other hand, moving to new physical media is generally easier and safer with LVM: you add the new PV to the group, use pvmove to move all volumes, and then remove the old PV. This can be interrupted without losing data. > > What's more, Linux block drivers have to opt in to supporting > > partitions, and dm-crypt doesn't do that. So the kernel doesn't look > > for a partition table on a dm-crypt device. > > The primary issue for me is that LUKS container can contain a valid > partition table and I can add a hook for initramfs to recornize it, > but because cryptsetup integration checks for known partitions an > doesn't find any, it closes LUKS container immediately with "unknown > fstype, bad password or options?". > This is extemely inconvenient and requires me to edit initramfs's > files, wich will be reverted on upgrades, and I'd like to avoid it by > having native support so this use case. So this should be dealt with in cryptsetup-initramfs. > > > However, there are 2 issues with this described here: > > > https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1786688 > > > > > > The first issue is that after decryption of LUKS container there is a > > > filesystem check and `get_fstype` function returns `undefined` for > > > any partition table. > > > > > > I'd like it to return `pttable` or something similar instead, so that > > > after decryption it will not lock container back with "unknown > > > fstype, bad password or options?". > > > > [...] > > > > I think the current behaviour of get_fstype is correct. It doesn't > > print any error message; it just tells the caller whether a filesystem > > was detected and if so what type it is. It's up to the caller whether > > to treat a failure as fatal, or to check for a partition table as well. > > Well, I think technically LVM is not a file system either, but > `get_fstype` returns `lvm` for it. That's true, but it's kind of accidental rather than something we specifically intended to support. > Why not returning `pttable` too, indicating that it is not a garbage > inside of it? > Or do you suggest that cryptsetup integration needs to be adjusted > instead? I think cryptsetup should be adjusted. Looking at the local-top script from cryptsetup-initramfs, it seems to depend rather too closely on details of both initramfs-tools and lvm2. - Why does it try to activate a volume group directly? lvm2's scripts should do that. - I don't think it should probe the contents of the encrypted volume at all. That would mean that a wrong password for a non-LUKS device won't be specifically detected and reported. But LUKS is strongly recommended, and I don't think this makes the non-LUKS user experience significantly worse. Ben. -- Ben Hutchings You can't have everything. Where would you put it?
Back to linux.debian.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Bug#906664: initramfs-tools: Add partition table support to get_fstype Nazar Mokrynskyi <nazar@mokrynskyi.com> - 2018-08-19 14:50 +0200
Processed: Re: Bug#906664: initramfs-tools: Add partition table support to get_fstype "Debian Bug Tracking System" <owner@bugs.debian.org> - 2018-08-21 02:10 +0200
Bug#906664: initramfs-tools: Add partition table support to get_fstype Ben Hutchings <ben@decadent.org.uk> - 2018-08-21 02:10 +0200
Bug#906664: initramfs-tools: Add partition table support to get_fstype Nazar Mokrynskyi <nazar@mokrynskyi.com> - 2018-08-21 08:00 +0200
Bug#906664: initramfs-tools: Add partition table support to get_fstype Ben Hutchings <ben@decadent.org.uk> - 2018-08-22 22:30 +0200
Bug#906664: [pkg-cryptsetup-devel] Bug#906664: initramfs-tools: Add partition table support to get_fstype Guilhem Moulin <guilhem@debian.org> - 2018-08-23 12:40 +0200
Bug#906664: [pkg-cryptsetup-devel] Bug#906664: initramfs-tools: Add partition table support to get_fstype Guilhem Moulin <guilhem@debian.org> - 2018-08-23 12:50 +0200
csiph-web