[dm-crypt] help mounting partitions in an encrypted disk after first reboot

Arno Wagner arno at wagner.name
Tue Jun 20 00:48:30 CEST 2017


Hi Sven,

On Tue, Jun 20, 2017 at 00:04:36 CEST, Sven Eschenberg wrote:
> Hi Arno,
> 
> as an addition, kpartx (not partx) should be able to do that aswell.  It
> will however not tell the kernel about partitions on a device, but rather
> setup dm mappings for each partition.

Interesting. That may be useful in some scenarios, exspecially
for experiments and temporary mounts. Seems also to be used
by some (most?) life-CDs for the disks found.

> Just wanted to add this in.  And I am somehwat surprised that partprobe
> actually works this way.  That makes me wonder, why the kernel does detect
> partitions on physical disks, but not on other block devices (be it the
> current case, or NBDs, iSCSI BDs or whatever)?  Does the kernel simply
> decide to only scan 'real' block devices by itself.  Because it does so
> even after boot, when a disk comes up by hotplugging etc.  .

I think the kernel does not do any partition detection except
on boot. When you hotplug a disk, udev may be what actually 
does the partition detection on it, probably using a similar
mechanism as partprobe or kpartx.

I may be off here, but so far partprobe has worked well for me,
due care stipulated (i.e. do not start to change mounted or
mapped partitions and the like).

Regards,
Arno

-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno at wagner.name
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -- Plato

If it's in the news, don't worry about it.  The very definition of 
"news" is "something that hardly ever happens." -- Bruce Schneier


More information about the dm-crypt mailing list