Encrypted device cannot be found during boot, mounting fails
Hey there i tryed to mount my dm_crypted device during boot, but it does not work.
This is my(partially) /var/log/bot with uncommented "set -x"(debug output) in " /lib/cryptsetup/cryptdisks.functions" and correct /etc/crypttab This is my crypttab, everything gets unlocked expect from sdb1_crypt: Code:
#<name> <device> <pass> <options> Code:
#System 1. grub 2. initram 3. Debian asks for "/"-partition password 4. Debian SHOULD ask for sdb1-partition password 5. swap gets "mounted" with random passphrase 6. booting continues What i did: I ran update-"initramfs -u -k all -v" I fixed my /etc/crypttab, a "#" was missing at the beginning I can mount the device with cryptsetup / mount after boot. The system cannot find /dev/sdb during boot, but later i can mount it. can i let cryptodisks later when all drives are availible? Iīm running debian 6.0.6 kernel 2.6.3.2-5-amd64 x86_64 Version of cryptsetup is 2:1.1.3-4squeeze2 |
Firstly you don't need to have the / partition (sdb3_crypt) in /etc/crypttab, since you give it in the kernel parameters or somewhere in the initrd. And you don't need to set luks in the options, cryptsetup detects it automatically.
The biggest problem could be the timeout. Why do you set it anyway and why to 0? Maybe that's the main reason. Another reason could be the none in the password field. I don't know Debian but in some distros you need to set the password field to ASK, in some you need to leave it empty, if you want to be asked for the password at boot time. You have to look it up for your distro. |
So i removed / from crypttab, the system still boots. I removed all options, cryptsetup tells me that options are missing, so i set them to "default". I tried to set the pw to none, to ASK, and "", and i tried to user blkid / UUID. Everything failed with "device * does not exist. I really want to mount the hard drive during boot, it worked with openSUSE, so should it work with debian!
|
I hope you haven't removed the options for the swap partition (sda2_crypt).
Which device does not exist? And have you tried to just removing the timeout from the options and keeping luks in the options and none in the password field? Like this: Code:
sdb1_crypt /dev/sdb1 none luks |
no the swap is where it is supposed to be! Iīll try luks as option now, brb. It says that what is logged in the /var/log/boot logfile, linked in the first post:
Code:
device /dev/sdb1/ does not exist Code:
device /dev/disks/by-uuid/the_uuid_of_sdb1 does not exist EDIT: with that line: Code:
sdb1_crypt /dev/sdb1 none luks Code:
cat /var/log/boot EDIT3: After next reboot, still the same error... EDIT4: Got it. When debian does an fsck before cryptdisks-early and before this message: Code:
[sdb] Assuming drive cache: write through EDIT5: fixing it via /boot didnīt work, i use / now, it is slower, but it works. I cought the process with my camera: Click How can i tell the system to use write through as drive cache, and not blocking the partition during the encryption?? |
Quote:
Quote:
Quote:
Is it an internal or an external harddisk? If it's an internal one, is it recognized by your BIOS? Is your harddisk failing? If it's recognized by your BIOS and not failing then it could probably be an issue with Debian's initscripts or a misconfigured initrd, if it's an external harddisk it's probably a bug in udev (timeout, udev rules triggered too early, wrong udev rules, etc.). If you can rule out a hardware issue I'd suggest asking on a Debian forum or mailing list, and not asking about a non working encryption, but a not detected harddisk. |
It is an external USB 2.0 2TB hard drive. It is definitely working, i did several i/o test yesterday.
|
Then it looks pretty much like an issue with udev and/or Debian's init system, which I don't know. There's either a wrong udev rule, a udev timeout (the harddisk responds too late or udev waits not long enough), cryptsetup is called before udev is settled or the udev rules are triggered or something like that.
|
All times are GMT -5. The time now is 12:10 AM. |