[Pkg-cryptsetup-devel] Cannot mount crpyto partition - precheck for '/dev/hdb2' failed

David Härdeman david at hardeman.nu
Thu Aug 30 12:52:54 UTC 2007


On Thu, August 30, 2007 12:03, Matthias Kirschner wrote:
> I did a /etc/init.d/cryptdisks restart which results in:
>
> 	Stopping remaining crypto disks... crypto1(stopped)done.
> 	Starting remaining crypto disks... crypto1(starting)
> 	 - The device /dev/hdb2 contains a valid filesystem type minix.
> 	 the precheck for '/dev/hdb2' failed, skipping
> 	 done.

I do recall that ext2/ext3 signatures can look like minix signatures by
pure chance. I also know that fstype had the checks in reverse order some
time ago (don't know if the Etch version does), so it could misdetect
ext2/3 signatures as minix. Are you sure no accidental mke2fs or similar
has been executed on the encrypted device?

Similar things could probably happen with other signatures as well if a
block or two is corrupted. The problem with minix is that it uses only a
16 bit integer as a signature (and it has two different ones), so over the
course of a couple of hundred writes to the block where minix would
look...times a couple of thousand users of cryptsetup, the chances of a
misidentification increases. Since you're not using luks, cryptsetup
writes no signature of its own to the disk...

You could, as a first step, try to mount the device manually (using the
cryptsetup binary directly) or by hacking the init scripts to skip the
precheck. Be careful and do only read-only operations first to make sure
no data is harmed (and fsck is probably a good idea).

-- 
David Härdeman




More information about the Pkg-cryptsetup-devel mailing list