From: Aaron Lewis <aaron.lewis1989@gmail.com>
To: dm-crypt@saout.de
Cc: Arno Wagner <arno@wagner.name>
Subject: Re: [dm-crypt] wrong partition type with blkid command ?
Date: Mon, 6 Sep 2010 20:57:53 +0800 [thread overview]
Message-ID: <201009062057.58524.aaron.lewis1989@gmail.com> (raw)
In-Reply-To: <20100906124812.GA13044@tansi.org>
[-- Attachment #1: Type: Text/Plain, Size: 1826 bytes --]
Hi, Arno Wagner
> If you create a raw dm-crypt partition with cryptsetup, there
> is no valiadation at all, i.e. you can do this on a non-encrypted
> partition and not get an error message.
>
> Ir is extremely unlikely for encrypted data to just match the
> magic number, so something else is likely wrong here.
Hmm , checked util source code:
const struct blkid_idinfo luks_idinfo =
{
.name = "crypto_LUKS",
.usage = BLKID_USAGE_CRYPTO,
.probefunc = probe_luks,
.magics =
{
{ .magic = "LUKS\xba\xbe", .len = 6 },
{ NULL }
}
};
And also did a header dump in hex , magic code is correct anyway.
I'm just very curious , two luks partitions , one correct , the other is not.
OK , thanks for the quick reply ;-)
What do you think this problem could be ? I really don't know how to detect
partition type without magic number ..
>
> Arno
>
> On Mon, Sep 06, 2010 at 08:33:58PM +0800, Aaron Lewis wrote:
> > Hi,
> >
> > blkid told me the type of an encrypted partition is "ext4" , while
> >
> > cryptsetup works fine.
> >
> > * blkid /dev/sda8
> > /dev/sda8: LABEL="ROOT" UUID="92d7eb3f-617d-4d63-8d1c-86b99ddeb5e4"
> > TYPE="ext4"
> >
> > ( TYPE should be crypto_LUKS )
> >
> > I've went through util-linux's source code , all magic code are defined
> > here: shlibs/blkid/src/superblocks/luks.c
> >
> > I should not modify partition directly , should be some tools could help
> > , anyone know ?
> >
> > Many thanks !
> >
> >
> >
> >
> > _______________________________________________
> > dm-crypt mailing list
> > dm-crypt@saout.de
> > http://www.saout.de/mailman/listinfo/dm-crypt
--
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4R0NL3WI5 on freenode
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2010-09-06 12:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-06 12:33 [dm-crypt] wrong partition type with blkid command ? Aaron Lewis
2010-09-06 12:48 ` Arno Wagner
2010-09-06 12:57 ` Aaron Lewis [this message]
2010-09-06 12:57 ` Milan Broz
2010-09-06 13:08 ` [dm-crypt] [SOLVE] " Aaron Lewis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201009062057.58524.aaron.lewis1989@gmail.com \
--to=aaron.lewis1989@gmail.com \
--cc=arno@wagner.name \
--cc=dm-crypt@saout.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox