All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] /sbin/cryptsetup: not found on boot after Grub repair - manual mounting works
@ 2016-05-21 14:14 Aaron
  2016-05-21 18:45 ` Arno Wagner
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Aaron @ 2016-05-21 14:14 UTC (permalink / raw)
  To: dm-crypt

Hello,

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.
http://paste.ubuntu.com/16443425/
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 
output:
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 
address
Command failed
cryptsetup: WARNING: failed to determine cipher modules to load for 
sda6_crypt

I asked for help here: 
https://answers.launchpad.net/ubuntu/+source/cryptsetup/+question/293750 
but nobody has had any ideas so far.

Any ideas would be greatly, greatly appreciated.

Kind regards,

Aaron

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dm-crypt] /sbin/cryptsetup: not found on boot after Grub repair - manual mounting works
  2016-05-21 14:14 [dm-crypt] /sbin/cryptsetup: not found on boot after Grub repair - manual mounting works Aaron
@ 2016-05-21 18:45 ` Arno Wagner
  2016-05-21 18:58 ` Hugh Bragg
  2016-05-22  1:34 ` Sven Eschenberg
  2 siblings, 0 replies; 8+ messages in thread
From: Arno Wagner @ 2016-05-21 18:45 UTC (permalink / raw)
  To: dm-crypt

Hi,

I have no idea what Ubuntu does in the initramfs, but
this sounds like your initramfs was rebuilt without 
the cryptsetup binary. Just another reason why I 
do not like the initramfs: Everything gets hard to debug.
I have done an LUKS-unlocking initramfs manually though
for a server-installation that boots from memory-stick.

Maybe reinstaling the package that does booting from 
encrypted root on Ubuntu will fix this. Alternatively, 
you may try to add it to your initramfs manually, including
all libraries it uses. That may be a bit tricky though.

As for diagnostics, there are some explanations on the web
how to unpack an initramfs. You could check whether
there is an /sbin/cryptestup in there. That is probably
the easiest first step.

Regards,
Arno

On Sat, May 21, 2016 at 16:14:04 CEST, Aaron wrote:
> Hello,
> 
> 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.
> http://paste.ubuntu.com/16443425/
> 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
> output:
> 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
> address
> Command failed
> cryptsetup: WARNING: failed to determine cipher modules to load for
> sda6_crypt
> 
> I asked for help here: https://answers.launchpad.net/ubuntu/+source/cryptsetup/+question/293750
> but nobody has had any ideas so far.
> 
> Any ideas would be greatly, greatly appreciated.
> 
> Kind regards,
> 
> Aaron
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt

-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno@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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dm-crypt] /sbin/cryptsetup: not found on boot after Grub repair - manual mounting works
  2016-05-21 14:14 [dm-crypt] /sbin/cryptsetup: not found on boot after Grub repair - manual mounting works Aaron
  2016-05-21 18:45 ` Arno Wagner
@ 2016-05-21 18:58 ` Hugh Bragg
  2016-05-22  1:34 ` Sven Eschenberg
  2 siblings, 0 replies; 8+ messages in thread
From: Hugh Bragg @ 2016-05-21 18:58 UTC (permalink / raw)
  To: dm-crypt

It sounds like you need to update-grub
Assuming your grub configurations haven't changed since the original 
build, you're probably looking for something like this:
https://askubuntu.com/questions/145241/how-do-i-run-update-grub-from-a-livecd
Hugh
On 22/05/16 00:14, Aaron wrote:
> Hello,
>
> 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.
> http://paste.ubuntu.com/16443425/
> 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 output:
> 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 
> address
> Command failed
> cryptsetup: WARNING: failed to determine cipher modules to load for 
> sda6_crypt
>
> I asked for help here: 
> https://answers.launchpad.net/ubuntu/+source/cryptsetup/+question/293750 
> but nobody has had any ideas so far.
>
> Any ideas would be greatly, greatly appreciated.
>
> Kind regards,
>
> Aaron
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dm-crypt] /sbin/cryptsetup: not found on boot after Grub repair - manual mounting works
  2016-05-21 14:14 [dm-crypt] /sbin/cryptsetup: not found on boot after Grub repair - manual mounting works Aaron
  2016-05-21 18:45 ` Arno Wagner
  2016-05-21 18:58 ` Hugh Bragg
@ 2016-05-22  1:34 ` Sven Eschenberg
  2016-05-25 18:25   ` Aaron
  2 siblings, 1 reply; 8+ messages in thread
From: Sven Eschenberg @ 2016-05-22  1:34 UTC (permalink / raw)
  To: dm-crypt

Hi there,

This seems to be the relevant part:
device-mapper: table ioctl on sda6_crypt failed: No such device or address
Command failed
cryptsetup: WARNING: failed to determine cipher modules to load for
sda6_crypt

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.

Regards

-Sven

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:
> Hello,
>
> 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.
> http://paste.ubuntu.com/16443425/
> 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 output:
> 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 address
> Command failed
> cryptsetup: WARNING: failed to determine cipher modules to load for
> sda6_crypt
>
> I asked for help here:
> https://answers.launchpad.net/ubuntu/+source/cryptsetup/+question/293750
> but nobody has had any ideas so far.
>
> Any ideas would be greatly, greatly appreciated.
>
> Kind regards,
>
> Aaron
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dm-crypt] /sbin/cryptsetup: not found on boot after Grub repair - manual mounting works
  2016-05-22  1:34 ` Sven Eschenberg
@ 2016-05-25 18:25   ` Aaron
  2016-05-25 19:25     ` Sven Eschenberg
  0 siblings, 1 reply; 8+ messages in thread
From: Aaron @ 2016-05-25 18:25 UTC (permalink / raw)
  To: dm-crypt

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:
https://answers.launchpad.net/ubuntu/+source/cryptsetup/+question/293750

Thanks again!

Aaron

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
> address
> Command failed
> cryptsetup: WARNING: failed to determine cipher modules to load for
> sda6_crypt
>
> 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.
>
> Regards
>
> -Sven
>
> 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:
>> Hello,
>>
>> 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.
>> http://paste.ubuntu.com/16443425/
>> 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
>> output:
>> 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
>> address
>> Command failed
>> cryptsetup: WARNING: failed to determine cipher modules to load for
>> sda6_crypt
>>
>> I asked for help here:
>> https://answers.launchpad.net/ubuntu/+source/cryptsetup/+question/293750
>> but nobody has had any ideas so far.
>>
>> Any ideas would be greatly, greatly appreciated.
>>
>> Kind regards,
>>
>> Aaron
>> _______________________________________________
>> dm-crypt mailing list
>> dm-crypt@saout.de
>> http://www.saout.de/mailman/listinfo/dm-crypt
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dm-crypt] /sbin/cryptsetup: not found on boot after Grub repair - manual mounting works
  2016-05-25 18:25   ` Aaron
@ 2016-05-25 19:25     ` Sven Eschenberg
  2016-05-25 22:17       ` Arno Wagner
  0 siblings, 1 reply; 8+ messages in thread
From: Sven Eschenberg @ 2016-05-25 19:25 UTC (permalink / raw)
  To: dm-crypt

You are welcome.

Blame it on bad documentation. 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 desaster.


Regards

-Sven

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:
> https://answers.launchpad.net/ubuntu/+source/cryptsetup/+question/293750
>
> Thanks again!
>
> Aaron
>
> 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
>> address
>> Command failed
>> cryptsetup: WARNING: failed to determine cipher modules to load for
>> sda6_crypt
>>
>> 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.
>>
>> Regards
>>
>> -Sven
>>
>> 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:
>>> Hello,
>>>
>>> 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.
>>> http://paste.ubuntu.com/16443425/
>>> 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
>>> output:
>>> 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
>>> address
>>> Command failed
>>> cryptsetup: WARNING: failed to determine cipher modules to load for
>>> sda6_crypt
>>>
>>> I asked for help here:
>>> https://answers.launchpad.net/ubuntu/+source/cryptsetup/+question/293750
>>> but nobody has had any ideas so far.
>>>
>>> Any ideas would be greatly, greatly appreciated.
>>>
>>> Kind regards,
>>>
>>> Aaron
>>> _______________________________________________
>>> dm-crypt mailing list
>>> dm-crypt@saout.de
>>> http://www.saout.de/mailman/listinfo/dm-crypt
>> _______________________________________________
>> dm-crypt mailing list
>> dm-crypt@saout.de
>> http://www.saout.de/mailman/listinfo/dm-crypt
>
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dm-crypt] /sbin/cryptsetup: not found on boot after Grub repair - manual mounting works
  2016-05-25 19:25     ` Sven Eschenberg
@ 2016-05-25 22:17       ` Arno Wagner
  2016-05-25 23:13         ` Sven Eschenberg
  0 siblings, 1 reply; 8+ messages in thread
From: Arno Wagner @ 2016-05-25 22:17 UTC (permalink / raw)
  To: dm-crypt

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
> desaster.

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. 

Regards,
Arno
 
> 
> Regards
> 
> -Sven
> 
> 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:
> >https://answers.launchpad.net/ubuntu/+source/cryptsetup/+question/293750
> >
> >Thanks again!
> >
> >Aaron
> >
> >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
> >>address
> >>Command failed
> >>cryptsetup: WARNING: failed to determine cipher modules to load for
> >>sda6_crypt
> >>
> >>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.
> >>
> >>Regards
> >>
> >>-Sven
> >>
> >>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:
> >>>Hello,
> >>>
> >>>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.
> >>>http://paste.ubuntu.com/16443425/
> >>>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
> >>>output:
> >>>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
> >>>address
> >>>Command failed
> >>>cryptsetup: WARNING: failed to determine cipher modules to load for
> >>>sda6_crypt
> >>>
> >>>I asked for help here:
> >>>https://answers.launchpad.net/ubuntu/+source/cryptsetup/+question/293750
> >>>but nobody has had any ideas so far.
> >>>
> >>>Any ideas would be greatly, greatly appreciated.
> >>>
> >>>Kind regards,
> >>>
> >>>Aaron
> >>>_______________________________________________
> >>>dm-crypt mailing list
> >>>dm-crypt@saout.de
> >>>http://www.saout.de/mailman/listinfo/dm-crypt
> >>_______________________________________________
> >>dm-crypt mailing list
> >>dm-crypt@saout.de
> >>http://www.saout.de/mailman/listinfo/dm-crypt
> >
> >_______________________________________________
> >dm-crypt mailing list
> >dm-crypt@saout.de
> >http://www.saout.de/mailman/listinfo/dm-crypt
> >
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt

-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno@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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dm-crypt] /sbin/cryptsetup: not found on boot after Grub repair - manual mounting works
  2016-05-25 22:17       ` Arno Wagner
@ 2016-05-25 23:13         ` Sven Eschenberg
  0 siblings, 0 replies; 8+ messages in thread
From: Sven Eschenberg @ 2016-05-25 23:13 UTC (permalink / raw)
  To: dm-crypt



Am 26.05.2016 um 00:17 schrieb Arno Wagner:
> 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.

Unfortunately, yes. I think the need of proper documentation and the 
effort needed to provide one is often strongly underestimated. You know, 
people tend to to say: Ah, that error is never gonna happen, I'll save 
the time for safety checks for now, maybe do it later - somewhen. 
Similarily they go: No need to document this, the user will never need 
that info. Because it is something the user will/should never be 
bothered with. Except, it will happen, eventually.

>
>> 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
>> desaster.
>
> 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.

The task of figuring out how to bring up '/' is indeed not trivial and 
the assumptions made are absolutely valid. But as you already stated, it 
is important to point this out precicsely at the right places and 
possibly implement safe fallbacks, whenever possible.

The error output could certainly be improved. I have to admit though, 
there was no run of update-initramfs with verbose output (I think). 
Maybe a verbose output might have cleared things up a little.

>
> Regards,
> Arno
>

Regards

-Sven


>>
>> Regards
>>
>> -Sven
>>
>> 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:
>>> https://answers.launchpad.net/ubuntu/+source/cryptsetup/+question/293750
>>>
>>> Thanks again!
>>>
>>> Aaron
>>>
>>> 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
>>>> address
>>>> Command failed
>>>> cryptsetup: WARNING: failed to determine cipher modules to load for
>>>> sda6_crypt
>>>>
>>>> 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.
>>>>
>>>> Regards
>>>>
>>>> -Sven
>>>>
>>>> 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:
>>>>> Hello,
>>>>>
>>>>> 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.
>>>>> http://paste.ubuntu.com/16443425/
>>>>> 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
>>>>> output:
>>>>> 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
>>>>> address
>>>>> Command failed
>>>>> cryptsetup: WARNING: failed to determine cipher modules to load for
>>>>> sda6_crypt
>>>>>
>>>>> I asked for help here:
>>>>> https://answers.launchpad.net/ubuntu/+source/cryptsetup/+question/293750
>>>>> but nobody has had any ideas so far.
>>>>>
>>>>> Any ideas would be greatly, greatly appreciated.
>>>>>
>>>>> Kind regards,
>>>>>
>>>>> Aaron
>>>>> _______________________________________________
>>>>> dm-crypt mailing list
>>>>> dm-crypt@saout.de
>>>>> http://www.saout.de/mailman/listinfo/dm-crypt
>>>> _______________________________________________
>>>> dm-crypt mailing list
>>>> dm-crypt@saout.de
>>>> http://www.saout.de/mailman/listinfo/dm-crypt
>>>
>>> _______________________________________________
>>> dm-crypt mailing list
>>> dm-crypt@saout.de
>>> http://www.saout.de/mailman/listinfo/dm-crypt
>>>
>> _______________________________________________
>> dm-crypt mailing list
>> dm-crypt@saout.de
>> http://www.saout.de/mailman/listinfo/dm-crypt
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-05-25 23:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-21 14:14 [dm-crypt] /sbin/cryptsetup: not found on boot after Grub repair - manual mounting works Aaron
2016-05-21 18:45 ` Arno Wagner
2016-05-21 18:58 ` Hugh Bragg
2016-05-22  1:34 ` Sven Eschenberg
2016-05-25 18:25   ` Aaron
2016-05-25 19:25     ` Sven Eschenberg
2016-05-25 22:17       ` Arno Wagner
2016-05-25 23:13         ` Sven Eschenberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.