From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pw0-f50.google.com (mail-pw0-f50.google.com [209.85.160.50]) by mail.saout.de (Postfix) with ESMTP for ; Mon, 6 Sep 2010 14:58:10 +0200 (CEST) Received: by pwi4 with SMTP id 4so1350300pwi.37 for ; Mon, 06 Sep 2010 05:58:09 -0700 (PDT) From: Aaron Lewis Date: Mon, 6 Sep 2010 20:57:53 +0800 References: <201009062034.05071.aaron.lewis1989@gmail.com> <20100906124812.GA13044@tansi.org> In-Reply-To: <20100906124812.GA13044@tansi.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2035068.03tnqmjOxD"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201009062057.58524.aaron.lewis1989@gmail.com> Subject: Re: [dm-crypt] wrong partition type with blkid command ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de Cc: Arno Wagner --nextPart2035068.03tnqmjOxD Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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. >=20 > 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 =3D { .name =3D "crypto_LUKS", .usage =3D BLKID_USAGE_CRYPTO, .probefunc =3D probe_luks, .magics =3D { { .magic =3D "LUKS\xba\xbe", .len =3D 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 no= t. OK , thanks for the quick reply ;-)=20 What do you think this problem could be ? I really don't know how to detect= =20 partition type without magic number ..=20 >=20 > Arno >=20 > On Mon, Sep 06, 2010 at 08:33:58PM +0800, Aaron Lewis wrote: > > Hi, > >=20 > > blkid told me the type of an encrypted partition is "ext4" , while > >=20 > > cryptsetup works fine. > >=20 > > * blkid /dev/sda8 > > /dev/sda8: LABEL=3D"ROOT" UUID=3D"92d7eb3f-617d-4d63-8d1c-86b99ddeb5e4" > > TYPE=3D"ext4" > >=20 > > ( TYPE should be crypto_LUKS ) > >=20 > > I've went through util-linux's source code , all magic code are defined > > here: shlibs/blkid/src/superblocks/luks.c > >=20 > > I should not modify partition directly , should be some tools could help > > , anyone know ? > >=20 > > Many thanks ! > >=20 > >=20 > >=20 > >=20 > > _______________________________________________ > > dm-crypt mailing list > > dm-crypt@saout.de > > http://www.saout.de/mailman/listinfo/dm-crypt =2D-=20 Best Regards, Aaron Lewis - PGP: 0x4A6D32A0 =46ingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0 irc: A4R0NL3WI5 on freenode --nextPart2035068.03tnqmjOxD Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEABECAAYFAkyE5VYACgkQvf41sEptMqDERgCfQgdC7w97UGsfvox5a5PiThSS /p4AoKY/f1o6hUVZ2xfhOeASm3uC82M2 =zxsH -----END PGP SIGNATURE----- --nextPart2035068.03tnqmjOxD--