You are not logged in.

#1 2014-09-27 09:19:54

BinaryMan
Member
Registered: 2011-07-19
Posts: 14

[Solved] Failed kernel upgrade, LUKS, and data corruption

Over the last several hours, I ran into a bit of an issue that I wanted to post here for some modicum of documentation, lest less experienced people encounter the same issue. That and I've been using Linux for about a decade and I've been a bit on the lazy side on contributing back to the community, whether it's answering questions or publicly documenting issues I've encountered and fixed/worked around.

This all started after rebooting my system, after updating the packages on it. The drive is encrypted with LUKS and this issue initially presented itself by not giving me the encrypt hook prompt to type in the passphrase. After dealing with an unrelated string of issues in trying to get this system booted into a LiveCD environment (I usually use DriveDroid on my cellphone, which wasn't being detected by the BIOS and I then encountered every issue imaginable on one of my other computers in trying to get an actual LiveCD burnt), I was able to decrypt the partition, mount it, and chroot in.

The first thing I did was make sure the package updates was successful, which it hadn't been. Running `packer -Syu` showed me that many of the packages that should have been updated weren't. Okay, seems like a straightforward enough fix. Except that after rebooting once the packages were done being installed, I still encountered the same issue.

So, back in the LiveCD environment, I start thinking to myself how to approach this issue. Seeing how the cryptsetup prompt to enter my passphrase isn't being displayed, my first thought was to rebuild the initramfs via `mkinitcpio -p linux`, which was spot on. This command generated several dozen "ERROR: module not found" errors. I ran that through Google, without many results and none of them useful.

At this point, I'm pretty much at square one again. After thinking on this for a couple of minutes, I decide to try reinstalling the kernel via `packer -S linux`, which was also dead on. I have no idea how this happened, but when I ran the command (which calls pacman) it detected that the cached package that was still on the hard drive was corrupt and asked if I wanted to delete the package. After deleting it, it was downloaded again from the internet (mirror.rit.edu), successfully installed, and the hook that calls mkinitcpio after a kernel update ran without any errors. After rebooting, I was able to enter the partition's passphrase and log back in without issue.

So, with all this layed out, I typed all this out to help give people that may come across this post a general troubleshooting workflow and to point out two things to keep in mind (assuming that the package was corrupt to begin with, which I have no way of confirming):

- Somehow, the corrupted kernel package was not detected as corrupt the first time it was installed and caused this issue.
- Even though TCP has built-in error checking (https://en.wikipedia.org/wiki/Transmiss … _detection), it can't be relied on.

While this is probably the exception to the rule and will probably never occur again, I still felt it was worth mentioning.

Last edited by BinaryMan (2014-09-27 09:20:30)

Offline

#2 2014-09-27 09:26:38

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Failed kernel upgrade, LUKS, and data corruption

Not a Pacman issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-09-27 17:50:42

BinaryMan
Member
Registered: 2011-07-19
Posts: 14

Re: [Solved] Failed kernel upgrade, LUKS, and data corruption

Seeing how pacman installed a corrupted package, I beg to differ.

No matter, this reminded me why I normally don't bother to document anything. Please delete this thread if it's going to be dismissed and filed under 'Newbie Corner'. I'll be sure to not post anything again.

Offline

#4 2014-09-27 18:40:52

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Failed kernel upgrade, LUKS, and data corruption

BinaryMan wrote:

Seeing how pacman installed a corrupted package, I beg to differ.

BinaryMan wrote:

packer -Syu


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB