Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 391443 - sys-kernel/genkernel doesnt autodetect the key device if at other address than specified
Summary: sys-kernel/genkernel doesnt autodetect the key device if at other address tha...
Status: CONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-22 21:37 UTC by Thomas Bettler
Modified: 2015-08-20 15:47 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
initrd.scripts_fix-autohandling-of-wrong-but-existing-keydev.patch (initrd.scripts_fix_autohandling_of_wrong_but_existing_keydev.patch,2.38 KB, text/plain)
2011-11-22 21:37 UTC, Thomas Bettler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Bettler 2011-11-22 21:37:15 UTC
Created attachment 293439 [details]
initrd.scripts_fix-autohandling-of-wrong-but-existing-keydev.patch

If genkernel doesnt find *the expected* key device at the address specified, it needs manual intervention. However it would be perfect to autoprobe for the key device at other locations. It might have changed the address /dev/sdX for /dev/sdY due to a new device plugged in or other reasons disturbing the order.

genkernel already autoprobes for the key device if the specified device doesnt exist.

The proposed patch makes sys-kernel/genkernel fallback to autoprobe in the following cases:
1. The specified key device exists but fails to mount for any reason.
2. The specified key device exists, is mounted successfully, but without the expected key on it.

If autoprobing doesnt work neither, it still asks for user intervention...

I have written and tested thoroughly the proposed patch.
Comment 1 Thomas Bettler 2011-11-26 09:35:00 UTC
Sebastian, what do you think of this patch proposition?

I have tested the whole combination of cases thoroughly:
- key dev available (plugged in) / absent (plugged off)
- non available block dev / non mountable (i.e. swap) key dev / mountable but other dev (i.e. root) / key dev

In all the four cases with key dev available the autodetection works, decrypts device and starts the computer. 
In the other four cases where the key dev is plugged off, you will get a prompt asking for the device path. -> even if you enter a wrong path if only the key dev is available somewhere, partition is decrypted and the computer starts.
Comment 2 Thomas Bettler 2011-12-22 15:45:26 UTC
ping
Comment 3 Sebastian Pipping gentoo-dev 2011-12-22 15:53:57 UTC
(In reply to comment #2)
> ping

Zero time until January, sorry.
Comment 4 Thomas Bettler 2012-05-12 20:33:06 UTC
ping again... I would be very happy to see the proposed patch or any code for device autodetection going in. Please give it a chance. It works well for me, probably for others too.
Comment 5 Rick Farina (Zero_Chaos) gentoo-dev 2015-08-20 15:47:56 UTC
I know this has been ignored for a while now, but if you are willing to update the patch against genkernel git I'd really like to add this feature.