Summary: | sys-fs/cryptsetup - dmcrypt init script should use keymaps | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | lxg <mail2lx> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | alpiturchi, eras, gentoo, gentoo_bugs.nu_q5v, joakim.tjernlund, laurent, openrc |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=338082 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | 0001-Create-save-keymaps-and-save-ktermencoding-services.patch |
Description
lxg
2012-12-05 00:23:18 UTC
it's not really possible with the current init layout dmcrypt: before fsck keymaps: need localmount localmount: need fsck so if dmcrypt required keymaps, it couldn't also run before fsck, because keymaps needs fsck to run first the keymaps init probably should drop localmount ... we've made the requirement that /usr be available at early boot, which means there's no need for keymaps to require localmount. although that still wouldn't help keymaps: need termencoding termencoding: after bootmisc bootmisc: need localmount not sure why termencoding depends on bootmisc when the only thing it does is write to /dev nodes. probably should delete that dependency too. the 'use root' in termencoding also looks pointless. I just stumbled upon this problem after years of use. Can this be resolved? Also is there a recent change, that may have caused it appearing for me? Hello, I am affected as well with at least another user in the Gentoo forums (see https://forums.gentoo.org/viewtopic-p-8198852.html) I can do any troubleshooting steps, I tried to play with rc_need and the like but no luck Cheers, Laurent Have been bit by this too now, after some major updating. It has been working fine on my system before, loading the keymap before asking for the key for /home. It feels like a regression to me. This bug is also related to this: https://bugs.gentoo.org/651998 *** Bug 651998 has been marked as a duplicate of this bug. *** Created attachment 554326 [details, diff]
0001-Create-save-keymaps-and-save-ktermencoding-services.patch
If you are willing to test this, please apply this patch to OpenRC
0.39.2, then add save-keymaps and save-termencoding to your boot
runlevel, unmask and emerge the latest cryptsetup and reboot.
Let me know if things come up successfully.
Thanks,
William
(In reply to William Hubbs from comment #8) > If you are willing to test this, please apply this patch to OpenRC > 0.39.2, then add save-keymaps and save-termencoding to your boot > runlevel, unmask and emerge the latest cryptsetup and reboot. > > Let me know if things come up successfully. System was able to start with the patch applied and cryptsetup-2.0.5-r1: > rc sysinit logging started at Wed Nov 7 02:04:16 2018 > > > OpenRC 0.39.2 is starting up Gentoo Linux (x86_64) > > * /proc is already mounted > * Mounting /run ... > * /run/openrc: creating directory > * /run/lock: creating directory > * /run/lock: correcting owner > * Caching service dependencies ... > [ ok ] > * Mounting debug filesystem ... > [ ok ] > * Mounting persistent storage (pstore) filesystem ... > [ ok ] > * Mounting cgroup filesystem ... > [ ok ] > * Remounting devtmpfs on /dev ... > [ ok ] > * Mounting /dev/mqueue ... > [ ok ] > * Mounting /dev/shm ... > [ ok ] > * Creating list of required static device nodes for the current kernel ... > [ ok ] > * Setting up tmpfiles.d entries for /dev ... > [ ok ] > * Starting udev ... > [ ok ] > * Generating a rule to create a /dev/root symlink ... > [ ok ] > * Populating /dev with existing devices through uevents ... > [ ok ] > > rc sysinit logging stopped at Wed Nov 7 02:04:16 2018 > > > rc boot logging started at Wed Nov 7 02:04:16 2018 > > * Setting system clock using the hardware clock [UTC] ... > [ ok ] > * Mounting misc binary format filesystem ... > [ ok ] > * Loading custom binary format handlers ... > [ ok ] > * Setting terminal encoding [UTF-8] ... > [ ok ] > * Setting keyboard mode [UTF-8] ... > [ ok ] > * Loading key mappings [us] ... > [ ok ] > * Setting up dm-crypt mappings ... > * dataVault using: open /dev/sdc1 dataVault ... > [ ok ] > [ ok ] > * Checking local filesystems ... > root: clean, 191427/801248 files, 1862276/3204096 blocks > Boot: clean, 85/32768 files, 23355/131060 blocks > portage: clean, 163552/524288 files, 385274/2097152 blocks > distfiles: clean, 514/262144 files, 509827/1048576 blocks > fsSecureData: clean, 4011/655360 files, 94056/2620667 blocks > [ ok ] > * Remounting root filesystem read/write ... > [ ok ] > * Remounting filesystems ... > [ ok ] > * Updating /etc/mtab ... > * Creating mtab symbolic link > [ ok ] > * Activating swap devices ... > [ ok ] > * Mounting local filesystems ... > [ ok ] > * Configuring kernel parameters ... > [ ok ] > * Creating user login records ... > [ ok ] > * Wiping /tmp directory ... > [ ok ] > * Setting hostname to vm-gentoo-42... > [ ok ] > * Bringing up network interface lo ... > [ ok ] > * Setting up tmpfiles.d entries ... > [ ok ] > * Saving key mapping ... > [ ok ] > * Saving terminal encoding ... > [ ok ] > * Initializing random number generator ... > [ ok ] > > rc boot logging stopped at Wed Nov 7 02:04:30 2018 fyi: Please check indentation of save-termencoding. Missing tab in start()... https://github.com/openrc/openrc/commit/7eb3975543eafd44c6946ca5a76812aa0d7a7303 This will be added to OpenRC 0.40. Since sys-apps/openrc-0.40 was released 7 days ago, probably the following entry should be dropped from profiles/package.mask: # Brian Evans <grknight@gentoo.org> (05 Nov 2018) # Causes a dependency loop in the OpenRC script. Bug #651998 =sys-fs/cryptsetup-2.0.5-r1 The changes made between sys-fs/cryptsetup-2.0.5 and sys-fs/cryptsetup-2.0.5-r1 ebuilds were not included in recently added sys-fs/cryptsetup-2.0.6 ebuild. If these changes were correct, then sys-fs/cryptsetup-2.0.6-r1 with these changes restored should be added. I had the same problem with keymaps loading after dmcrypt so I upgraded to sys-apps/openrc-0.41.2 but that did not help: rc boot logging started at Wed Feb 27 16:09:46 2019 * Loading module vboxdrv ... [ ok ] * Loading module vboxnetflt ... [ ok ] * Loading module vboxnetadp ... [ ok ] * Loading module vboxpci ... [ ok ] * Setting system clock using the hardware clock [UTC] ... [ ok ] * Mounting misc binary format filesystem ... [ ok ] * Loading custom binary format handlers ... [ ok ] * Setting up dm-crypt mappings ... [ ok ] * Setting up the Logical Volume Manager ... [ ok ] * Checking local filesystems ... /sbin/fsck.xfs: XFS file system. fsck.fat 4.1 (2017-01-24) /dev/nvme0n1p1: 625 files, 57742/516190 clusters [ ok ] * Remounting root filesystem read/write ... [ ok ] * Remounting filesystems ... [ ok ] * Updating /etc/mtab ... * Creating mtab symbolic link [ ok ] * Activating swap devices ... [ ok ] * Mounting local filesystems ... [ ok ] * Configuring kernel parameters ... [ ok ] * Creating user login records ... [ ok ] * Wiping /tmp directory ... [ ok ] * Setting terminal encoding [UTF-8] ... [ ok ] * Setting console font [sun12x22] ... [ ok ] * Setting hostname to se-jocke-lx.infinera.com ... [ ok ] * Setting keyboard mode [UTF-8] ... [ ok ] * Loading key mappings [fi] ... [ ok ] * Bringing up network interface lo ... [ ok ] In /etc/conf.d/keymaps I added: rc_before="dmcrypt" Now it works, is this the correct way to add a dep. in openrc? (In reply to William Hubbs from comment #10) Since a commit was planned for openRC 0.40, and we are now at 0.42, is there any news? I added "after keymaps" to /etc/init.d/dmcrypt. It works for me, I was wondering if anything would block adding the keymap dependency into the /etc/init.d/dmcrypt initscript provided by sys-fs/cryptsetup? Other users have been reporting the issue: * Someone using gentoo on Raspberry Pi (2019-10-03) https://www.raspberrypi.org/forums/viewtopic.php?t=253479 * On the gentoo forums (2020-01-02): https://forums.gentoo.org/viewtopic-t-1106244-start-0.html While at it, apart from "after keymaps", dmcrypt should also be set "before localmount". If not, the parallel boot continues while the user types the password, messing with the display, and starting services before the crypted devices are available. |