Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   apt-get update, apt-get upgrade, and now system fails to boot (http://www.linux-archive.org/debian-user/681650-apt-get-update-apt-get-upgrade-now-system-fails-boot.html)

Claudius Hubig 07-09-2012 03:40 PM

apt-get update, apt-get upgrade, and now system fails to boot
 
Hello David,

David Christensen <dpchrist@holgerdanske.com> wrote:
> Loading Linux 3.2.0-0.bpo.2-amd64 ...
> Loading initial ramdisk ...
> Loading, please wait...
> Gave up waiting for root device. Common problems:
> - Boot args (cat /proc/cmdline)
> - Check rootdelay= (did the system wait long enough?)
> - Check root= (did the system wait for the right device?)
> - Missing modules (cat /proc/modules; ls /dev)
> ALERT! /dev/mapper/sda2_crypt does not exist. Dropping to a shell!

> Any suggestions?

a) Check whether your initrd is, in general, capable of mounting the
root device. Check whether the ‘cryptsetup’ command is available. If
it is available, try the following:

# cryptsetups luksOpen /dev/sda2 sda2_crypt

It should ask for the encryption passphrase. If that works, check
if /dev/mapper/sda2_crypt exists and if so, try to log out of the
busybox shell. It should then continue booting.

b) If that doesn’t work - either because cryptsetup is not available
or because a module is missing from the initrd, boot into your old
kernel. Then try to rebuild the initrd (update-initramfs, IIRC) with
the verbose flag and check if it adds the cryptsetup binary and
associated kernel modules. If it did, try to reboot.

c) If the modules are not added to the initrd or if the cryptsetup
binary is not added to the initrd, check if you can add the
associated modules to /etc/initramfs-tools/modules. Additionally, you
might want to change MODULES=dep to MODULES=most in initramfs.conf
and test if that works. You might also want to check whether the
packages mentioned at the link provided by Camaleón (lvm2, cryptsetup)
are installed, but they _should_ be installed.

Best regards,

Claudius
--
Do not drink and drive.
http://chubig.net telnet nightfall.org 4242

David Christensen 07-11-2012 12:24 AM

apt-get update, apt-get upgrade, and now system fails to boot
 
On 07/09/2012 08:40 AM, Claudius Hubig wrote:

Thanks for the reply. :-)


David Christensen<dpchrist@holgerdanske.com> wrote:

Loading Linux 3.2.0-0.bpo.2-amd64 ...
Loading initial ramdisk ...
Loading, please wait...
Gave up waiting for root device. Common problems:
- Boot args (cat /proc/cmdline)
- Check rootdelay= (did the system wait long enough?)
- Check root= (did the system wait for the right device?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/mapper/sda2_crypt does not exist. Dropping to a shell!


a) Check whether your initrd is, in general, capable of mounting the
root device. Check whether the ‘cryptsetup’ command is available.


Yes.



If it is available, try the following:
# cryptsetups luksOpen /dev/sda2 sda2_crypt
It should ask for the encryption passphrase.


(initramfs) cryptsetups luksOpen /dev/sda2 sda2_crypt
/proc/misc: No entry found for device-mapper found
Is device-mapper driver missing from kernel?
Enter passphrase for /dev/sda2:



If that works, check if /dev/mapper/sda2_crypt exists


(initramfs) ls /dev/mapper
control sda2_crypt



and if so, try to log out of the
busybox shell. It should then continue booting.


(initramfs) exit

The system boots.



b) If that doesn’t work - either because cryptsetup is not available
or because a module is missing from the initrd, boot into your old
kernel. Then try to rebuild the initrd (update-initramfs, IIRC) with
the verbose flag and check if it adds the cryptsetup binary and
associated kernel modules. If it did, try to reboot.

c) If the modules are not added to the initrd or if the cryptsetup
binary is not added to the initrd, check if you can add the
associated modules to /etc/initramfs-tools/modules. Additionally, you
might want to change MODULES=dep to MODULES=most in initramfs.conf
and test if that works. You might also want to check whether the
packages mentioned at the link provided by Camaleón (lvm2, cryptsetup)
are installed, but they _should_ be installed.


2012-07-10 17:13:27 root@i72600s ~
# l /boot
./ grub/
../ initrd.img-2.6.32-5-amd64
System.map-2.6.32-5-amd64 initrd.img-3.2.0-0.bpo.2-amd64
System.map-3.2.0-0.bpo.2-amd64 lost+found/
config-2.6.32-5-amd64 vmlinuz-2.6.32-5-amd64
config-3.2.0-0.bpo.2-amd64 vmlinuz-3.2.0-0.bpo.2-amd64

2012-07-10 17:13:28 root@i72600s ~
# update-initramfs -k all -u -v
Available versions: 3.2.0-0.bpo.2-amd64 2.6.32-5-amd64
Execute: /usr/sbin/update-initramfs -u -k "3.2.0-0.bpo.2-amd64" -b /boot -v
Keeping /boot/initrd.img-3.2.0-0.bpo.2-amd64.dpkg-bak
update-initramfs: Generating /boot/initrd.img-3.2.0-0.bpo.2-amd64
Adding module
/lib/modules/3.2.0-0.bpo.2-amd64/kernel/drivers/usb/usb-common.ko

...
Adding binary /sbin/rmmod
Calling hook busybox
Adding binary /bin/busybox
Adding library /lib/libm.so.6
Calling hook cryptroot
cryptsetup: WARNING: target sda2_crypt uses a key file, skipped
Copying module directory kernel/arch/x86/crypto
Adding module /lib/modules/3.2.0-0.bpo.2-amd64/kernel/crypto/cryptd.ko
...
Calling hook dmsetup
Building cpio /boot/initrd.img-3.2.0-0.bpo.2-amd64.new initramfs
Execute: /usr/sbin/update-initramfs -u -k "2.6.32-5-amd64" -b /boot -v
Keeping /boot/initrd.img-2.6.32-5-amd64.dpkg-bak
update-initramfs: Generating /boot/initrd.img-2.6.32-5-amd64
Adding module /lib/modules/2.6.32-5-amd64/kernel/fs/nls/nls_base.ko
...
Calling hook cryptroot
cryptsetup: WARNING: target sda2_crypt uses a key file, skipped
Copying module directory kernel/arch/x86/crypto
Adding module /lib/modules/2.6.32-5-amd64/kernel/crypto/aes_generic.ko
Adding module
/lib/modules/2.6.32-5-amd64/kernel/arch/x86/crypto/aes-x86_64.ko

...
Calling hook dmsetup
Building cpio /boot/initrd.img-2.6.32-5-amd64.new initramfs



The warning "target sda2_crypt uses a key file, skipped" doesn't make
sense -- /dev/sda2 does not use a key file:


2012-07-10 17:18:38 root@i72600s ~
# cat /etc/crypttab
sda2_crypt UUID=c020df80-6439-4e9e-a70e-0ff303d61180 none,discard luks
s1f042hh_crypt UUID=d63e063d-c4f6-4a8f-8270-872a4cf51a3d
/root/.luks-keyfile luks



Reboot -- same problem.


Any other suggestions?


TIA,

David


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4FFCC7B1.1070202@holgerdanske.com">http://lists.debian.org/4FFCC7B1.1070202@holgerdanske.com

Claudius Hubig 07-11-2012 01:46 AM

apt-get update, apt-get upgrade, and now system fails to boot
 
Hello David,

David Christensen <dpchrist@holgerdanske.com> wrote:
> The warning "target sda2_crypt uses a key file, skipped" doesn't make
> sense -- /dev/sda2 does not use a key file:
>
> 2012-07-10 17:18:38 root@i72600s ~
> # cat /etc/crypttab
> sda2_crypt UUID=c020df80-6439-4e9e-a70e-0ff303d61180 none,discard luks
> s1f042hh_crypt UUID=d63e063d-c4f6-4a8f-8270-872a4cf51a3d
> /root/.luks-keyfile luks
>
>
> Reboot -- same problem.

So the problem is apparently in the building of the initrd and its
detection of ‘necessary’ modules…could you try without the "discard"
option in crypttab? "none luks" works quite fine over here. If that
fixes the problem, we’d at least have a clue where to start.

Best regards,

Claudius
--
Classical music is the kind we keep thinking will turn into a tune.
-- Kin Hubbard, "Abe Martin's Sayings"
http://chubig.net telnet nightfall.org 4242

David Christensen 07-12-2012 12:22 AM

apt-get update, apt-get upgrade, and now system fails to boot
 
On 07/10/2012 06:46 PM, Claudius Hubig wrote:

So the problem is apparently in the building of the initrd and its
detection of ‘necessary’ modules


That sounds plausible. Unfortunately, I don't have knowledge of of
initramfs system. Looking at it's /etc tree and a few man pages, I
might be able to manually add dmcrypt-mount (?) to the shopping list of
included modules, but automatic inclusion by the initramfs build system
would be preferred.




could you try without the "discard" option in crypttab?


2012-07-11 17:13:44 root@i72600s ~
# vi /etc/crypttab

2012-07-11 17:13:53 root@i72600s ~
# cat /etc/crypttab
sda2_crypt UUID=c020df80-6439-4e9e-a70e-0ff303d61180 none luks
s1f042hh_crypt UUID=d63e063d-c4f6-4a8f-8270-872a4cf51a3d
/root/.luks-keyfile luks



Reboot -- same problem.


David


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4FFE18BB.20308@holgerdanske.com">http://lists.debian.org/4FFE18BB.20308@holgerdanske.com


All times are GMT. The time now is 12:37 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.