Re: blkid: Bug in LUKS detection?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 29, 2009 at 07:36:08PM +0200, Thomas Bächler wrote:
> ERROR: ambivalent result detected (2 filesystems)!
>
> What is the best solution here? 

 Use the latest version of cryptsetup.

 cryptsetup 1.0.7 changelog:
 - Wipe start of device (possible fs signature) before LUKS-formatting. 

> Is there a tool that wipes out the old magic numbers from ext2/3/4? 

 (I'd like to add SBMAGIC, SBMAGIC_LEN, SBMAGIC_OFFSET values to
 libblkid, then should be pretty simple to wipe all signatures in mkfs
 programs or create a new wipefs(8) tool or so.)


 Now, if you really hate your data you can try to use with dd(1) ... 

 extN magic number is \x53\xef at offset 1080:

 $ blkid -p ~/ext2.img 
 /home/kzak/ext2.img: LABEL="COOL" UUID="ed409e8e-44cc-4c2e-a31a-cd98f54eff36" VERSION="1.0" TYPE="ext2" USAGE="filesystem" 

 $ hexdump -C -s 1080 -n 2 ~/ext2.img
 00000438  53 ef                                             |S.|

 $ dd if=/dev/zero of=~/ext2.img bs=1 seek=1080 count=2 conv=notrunc
 2+0 records in
 2+0 records out
 2 bytes (2 B) copied, 0.000123413 s, 16.2 kB/s

 $ hexdump -C -s 1080 -n 2 ~/ext2.img
 00000438  00 00                                             |..|
 0000043a


 ... but think twice. Really.
 

    Karel


-- 
 Karel Zak  <kzak@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux