[dm-crypt] /sbin/cryptsetup: not found on boot after Grub repair - manual mounting works
arno at wagner.name
Thu May 26 00:17:34 CEST 2016
On Wed, May 25, 2016 at 21:25:15 CEST, Sven Eschenberg wrote:
> You are welcome.
Valid questions that come with a reasonable atempt to
give good information are always welcome.
> Blame it on bad documentation.
One of the things where FOSS is often not better than
commrcial software, unfortunately.
> Figuring this out just by reading the
> error message is a pretty tough one ;-). Simply put:
> update-initramfs expects to be run in a chroot that exactly matches
> the system after a normal boot (this is not limited to cryptsetup),
> otherwise automagic fails hard during detection and creates major
Indeed. Automagic becomes automess there. The idea to configure
the initramfs to exactly what is currently running in that chroot
is valid, but it should come with very clear warnings that
things are done this way.
> Am 25.05.2016 um 20:25 schrieb Aaron:
> >Thank you Sven, that was extremely helpful. Thank you also to Hugh and
> >Arno for their replies.
> >You were correct, this was caused by my mounting the encrypted
> >filesystem under a different name (the UUID), rather than sda6_crypt.
> >Full step-by-step commands of how I fixed this are here:
> >Thanks again!
> >On 22/05/16 02:34, Sven Eschenberg wrote:
> >>Hi there,
> >>This seems to be the relevant part:
> >>device-mapper: table ioctl on sda6_crypt failed: No such device or
> >>Command failed
> >>cryptsetup: WARNING: failed to determine cipher modules to load for
> >>It basically tells you your cryptodevice is missing and thus no info
> >>could be grabbed which in turn does not include cryptsetup etc. into
> >>your initramfs.
> >>When booting into the live system, unlock and mount your stuff before
> >>chrooting and make sure that all the mapper names are EXACTLY as
> >>expected by mkinitramfs (update-initramfs). ESP: Consult your crypttab
> >>file to find the name. Once the mapped device (as noted in crypttab)
> >>can be found running update-initramfs should work and include
> >>everything that is needed.
> >>P.S.: If I am not mistaken your mapping is supposed to be called
> >>sda6_crypt, while bootrepair gave it a UUID-based name. So you'll
> >>probably have to work this through manually, I guess.
> >>Am 21.05.2016 um 16:14 schrieb Aaron:
> >>>I would really appreciate any help to make my system boot properly
> >>>again. I can manually mount my encrypted partitions and they unlock
> >>>correctly, so I'm pretty sure that I haven't lost my data, but something
> >>>that used to work in the Ubuntu 16.04 boot process to unlock and boot
> >>>the partitions must have broken, as whenever I boot now, typing my
> >>>password no longer unlocks and boots Ubuntu. Instead it says:
> >>>“cryptsetup: cryptsetup failed, bad password or options?”
> >>>If I press escape and get to the console output, it says:
> >>>/scripts/local-top/cryptroot: line 1: /sbin/cryptsetup: not found over
> >>>and over.
> >>>In case the history is relevant, I recently had to reinstall Windows on
> >>>a dual-boot machine. That meant that I had to use boot repair to get my
> >>>Grub back. I now have what seems to be a working Grub, but when I boot
> >>>into Ubuntu and enter my password into the “Please unlock disk
> >>>sda6_crypt”, it fails as described.
> >>>was the output of the boot-repair reconfiguration of Grub.
> >>>I booted in with a live CD and chrooted into my installation. I did an
> >>>apt-get update and apt-get upgrade and I see the following in the
> >>>Processing triggers for initramfs-tools (0.122ubuntu8) ...
> >>>update-initramfs: Generating /boot/initrd.img-4.4.0-22-generic
> >>>device-mapper: table ioctl on sda6_crypt failed: No such device or
> >>>Command failed
> >>>cryptsetup: WARNING: failed to determine cipher modules to load for
> >>>I asked for help here:
> >>>but nobody has had any ideas so far.
> >>>Any ideas would be greatly, greatly appreciated.
> >>>Kind regards,
> >>>dm-crypt mailing list
> >>>dm-crypt at saout.de
> >>dm-crypt mailing list
> >>dm-crypt at saout.de
> >dm-crypt mailing list
> >dm-crypt at saout.de
> dm-crypt mailing list
> dm-crypt at saout.de
Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno at wagner.name
GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718
A good decision is based on knowledge and not on numbers. -- Plato
If it's in the news, don't worry about it. The very definition of
"news" is "something that hardly ever happens." -- Bruce Schneier
More information about the dm-crypt