Siduction Forum

Siduction Forum => Installation - Support => Topic started by: oneself on 2014/08/28, 23:25:11

Title: Cannot boot: cryptsetup not found [solved]
Post by: oneself on 2014/08/28, 23:25:11
Hi,

I have a boot partition which is not encrypted and the rest of my partitions are encrypted.  I've update my system this morning and now I cannot boot up.  I get the following messages:

Code: [Select]
/scripts/local-top/cryptroot: /scripts/local-top/cryptroot: line 1: line 1: /lib/cryptsetup/askpass: not found/sbin/cryptsetup: not found

I've tried reinstalling cryptsetup, the kernel, and grub, but nothing seems to work. Is there anything I can do other than reinstalling the whole thing?

Thank you.
Title: Re: Cannot boot: cryptsetup not found
Post by: bluelupo on 2014/08/29, 07:42:23
Hi oneself,
can you me show your /etc/crypttab? Do you start encrypted partitions with a shellscript (/scripts/local-top/cryptroot can show me too)?
Title: Re: Cannot boot: cryptsetup not found
Post by: oneself on 2014/08/29, 14:50:05
Hi,


Thank you for your help.


My crypttab seems to be empty:

Code: [Select]

# cat crypttab
# <target name> <source device> <key file> <options>


My system used to automatically mount my encrypted partitions during boot (one of those is my root partition).  When I boot up using a usb key and mount my root partition manually, it doesn't seem to have a "/scripts" directory.  So, I'm not sure where /scripts/local-top/cryptroot is coming from.  I see the message referring to it during a failed boot.

Title: Re: Cannot boot: cryptsetup not found
Post by: oneself on 2014/08/29, 19:00:10
I did some reading about crypttab, and so I tried adding my root device:



Code: [Select]
vgc-root UUID=bf25e44e-8fa9-4468-9db7-0fd0dd8d9970 none luks


I then ran "update-initramfs -u -k all" to regenerate my initramfs.  I rebooted and I'm still getting the same thing.


After booting I get dropped into an initramfs shell.  I tried looking around an I can see a  /scripts/local-top/cryptroot script in there.  It's pretty long, and I can't really do anything much from that shell.  So, it's difficult to post the entire thing.  However, it should be the default one that comes with the system.  Since I have not changed it.  It looks like it's looking for /sbin/cryptsetup, which makes sense, but that file is missing from the initramfs I have.   Not sure why that is.
Title: Re: Cannot boot: cryptsetup not found
Post by: oneself on 2014/08/29, 22:29:04
I have reinstalled my entire system.  After running apt-get dist-update, the same exact problem.


This is crazy.
Title: Re: Cannot boot: cryptsetup not found
Post by: melmarker on 2014/08/29, 23:58:54
No - we call that reproducable 8)
Title: Re: Cannot boot: cryptsetup not found
Post by: oneself on 2014/08/30, 00:43:51
Hehe  :D
Title: Re: Cannot boot: cryptsetup not found
Post by: oneself on 2014/08/30, 03:09:34
So, I managed to get around this by not allowing apt-get to upgrade cryptsetup and cryptsetup-bin (using apt-mark hold).


I wish there was any easier way to downgrade a package if it goes bad.
Title: Re: Cannot boot: cryptsetup not found [solved]
Post by: melmarker on 2014/08/30, 03:31:41
there is a easier way if things are broken - all your packages are in your package cache unless you run apt-get clean
if things go mad you 'only' have to identify the broken package and downgrade it with dpkg or so - big disadvantage is - you are nearly lost, if other packages depend on the new package.

one thing one should learn for playing with sid without stress is to backup, restore and chroot - in case of cryptsetup one should check if a rebuild of initramfs is needed. (only a wild guess) - there are some open bugs in the debian tracker, if noone of the open or solved bugs fits for you you should consider to write a bug against the cryptsetup package, eventually we can help with this. (not me, crypto is not really my business)

Edit: For cryptsetup and running encryption asking bluelupo for help could be a good idea.
Title: Re: Cannot boot: cryptsetup not found [solved]
Post by: oneself on 2014/08/30, 18:11:30
I update my system frequently, and I think this sort of thing happens every few months.  A bad package will slip in and cause havoc.  So, I would really love to learn some more tips and tricks to deal with this eventuality.  It looks like apt-get downloads packages to /var/cache/apt/archives.  So, you're saying I can using dpkg -i to try and downgrade a package?


I used to use Gentoo before switching to Siduction, one nice feature it had was that they kept multiple versions of each package around, in case you needed to downgrade, including one super stable.  Is there any way to pull packages from Debian's stable branch in cases when the package is no longer available in the local cache?


You mention backup and restore, could you elaborate?  How do you keep your system going?
Title: Re: Cannot boot: cryptsetup not found [solved]
Post by: melmarker on 2014/08/30, 18:19:17
there is no need to keep old versions local - the apt-cache can be a solution for partial downloads.
the better, because consistent solution is http://snapshots.debian.org, i mentioned the dependencies, right :)

RE backups and restore - if times go rough its a good plan to have a backup -  if things are badly broken. One can try to downgrade, but a recent backup is often the faster idea.

And no - i don't do backups, my only interesting things are in our repos and git (mirrored). Keep the system running: Fix the disturbing packages and use a lot of swearwords.
Title: Re: Cannot boot: cryptsetup not found [solved]
Post by: absolut on 2014/08/30, 21:35:34
i would like to point out that a recent dist-upgrade specifically (!) pointed out that cryptsetup partitions might be affected! for me, there was an information window displaying this message, and i had to manually quit it to proceed with the dist-upgrade.

did you get this info? did you read it?

particularly, there was a link to the cryptsetup FAQ pages, namely
8.3 Gcrypt after 1.5.3 breaks Whirlpool
https://code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions#8._Issues_with_Specific_Versions_of_cryptsetup
Title: Re: Cannot boot: cryptsetup not found [solved]
Post by: oneself on 2014/08/30, 22:53:33
Thank you for pointing this out.  I definitely missed that.  There are many announcements when one dist-upgrades.  I skim through them, and I must've missed it or not realized I would be affected.
Title: Re: Cannot boot: cryptsetup not found [solved]
Post by: piper on 2014/08/31, 03:25:00
Quote from: melmarker
And no - i don't do backups, my only interesting things are in our repos and git (mirrored). Keep the system running: Fix the disturbing packages and use a lot of swearwords.
+1 especially on the swearwords :)


Always read what apt says before you press "q"  on that "information window displaying any message"

Yes, you have to physically press the "q" button