Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 243216 - sys-fs/cryptsetup-1.0.6-r2 doesn't ask for passphrase at startup
Summary: sys-fs/cryptsetup-1.0.6-r2 doesn't ask for passphrase at startup
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: Inclusion
: 244497 245266 273029 (view as bug list)
Depends on: 273039
Blocks: 259253
  Show dependency tree
 
Reported: 2008-10-22 13:34 UTC by Lars
Modified: 2015-04-12 20:24 UTC (History)
8 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars 2008-10-22 13:34:20 UTC
I want to enter the passphrase to decrypt my data partition. No Keyfile needed, only Passphrase from console. With the actual version of cryptsetup there is no prompt, when dm-crypt starts.


Reproducible: Always




I compared dm-crypt-start.sh from 1.0.6-r1 and 1.0.6-r2 and in 1.0.6-r2 all /dev/console is missing.
When I replaced dm-crypt-start.sh from 1.0.6-r2 with the version of 1.0.6-r1 all went fine!
Comment 1 Wormo (RETIRED) gentoo-dev 2008-10-22 18:17:17 UTC
Thanks for reporting this issue; assigning report to ebuild maintainers.
Comment 2 SpanKY gentoo-dev 2008-10-26 04:04:18 UTC
please review the documentation for how to submit a bug.  you need to include `emerge --info` in every report.
Comment 3 Lars 2008-10-26 15:54:15 UTC
Portage 2.2_rc12 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.27-gentoo-081019 x86_64)
=================================================================                                            
System uname: Linux-2.6.27-gentoo-081019-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-glibc2.2.5   
Timestamp of tree: Sun, 26 Oct 2008 15:30:01 +0000                                                           
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]                         
ccache version 2.4 [enabled]                                                                                 
app-shells/bash:     3.2_p39                                                                                 
dev-java/java-config: 1.3.7, 2.1.6-r1                                                                        
dev-lang/python:     2.5.2-r8                                                                                
dev-util/ccache:     2.4-r8                                                                                  
dev-util/cmake:      2.6.2                                                                                   
sys-apps/baselayout: 2.0.0                                                                                   
sys-apps/openrc:     0.3.0-r1                                                                                
sys-apps/sandbox:    1.2.18.1-r3                                                                             
sys-devel/autoconf:  2.13, 2.63                                                                              
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1                                                 
sys-devel/binutils:  2.18-r3                                                                                 
sys-devel/gcc-config: 1.4.0-r4                                                                               
sys-devel/libtool:   2.2.6a                                                                                  
virtual/os-headers:  2.6.26                                                                                  
ACCEPT_KEYWORDS="amd64 ~amd64"                                                                               
CBUILD="x86_64-pc-linux-gnu"                                                                                 
CFLAGS="-march=core2 -O2 -pipe -mfpmath=sse -msse -msse2 -msse3"                                             
CHOST="x86_64-pc-linux-gnu"                                                                                  
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"     
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=core2 -O2 -pipe -mfpmath=sse -msse -msse2 -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
LINGUAS="de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa amarok amd64 berkdb bindist bzip2 cairo cdr cli cracklib crypt cups custom-optimization dbus dri dv dvd dvdr dvdread encode exif extrafilters fbcon fbcondecor ffmpeg firefox foomaticdb fortran gd gdbm gif glibc-omitfp gnutls gphoto2 gpm gtk gzip hal iconv id3 id3tagimagemagick innodb java java6 jpeg jpeg2k kde kdehiddenvisibility kdm kipi lame libssh2 lm_sensors logitech-mouse lzo midi mjpeg mmx mmxext mp2 mp3 mpeg mplayer mudflap multilib mysql mysqli ncurses nls nptl nptlonly nsplugin nvidia ogg openal opengl openmp pam pcre perl pic png ppds pppd python qt3 qt3support qt4 quicktime raw readline reflection samba sdl session spl sqlite sqlite3 sse sse2 ssl startup-notification svg sysfs tcpd theora truetype unicode userlocales vorbis x264 x86emu xfs xine xinetd xml xorg xpm xscreensaver xulrunner xvid yv12 zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Neil Bothwick 2008-11-07 08:14:30 UTC
Exact same problem here on three systems, ~amd64 and ~x86.

Portage 2.2_rc13 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.26-tuxonice i686)
=================================================================
System uname: Linux-2.6.26-tuxonice-i686-Intel-R-_Celeron-R-_M_processor_900MHz-with-glibc2.0
Timestamp of tree: Fri, 07 Nov 2008 06:15:03 +0000
distcc 3.0 i686-pc-linux-gnu [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r8
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.19
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=pentium-m -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/env.d /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/init.d /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-Os -march=pentium-m -pipe"
DISTDIR="/mnt/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical"
FEATURES="buildpkg ccache distlocks metadata-transfer parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.heanet.ie/pub/gentoo/ ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp.easynet.nl/mirror/gentoo/"
LANG="en_GB"
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB"
MAKEOPTS="-j2"
PKGDIR="/mnt/portage/packages/krikkit"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/mnt/scratch"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/mnt/portage/layman/enlightenment /mnt/portage/local"
SYNC="rsync://desiato/gentoo"
USE="3dnow 3dnowext X a52 aac aalib acpi alsa audiofile berkdb bluetooth branding bzip2 cairo cddb cdr cli cracklib crypt cups curl dbus dri dvd dvdr encode exif fam ffmpeg flac gdbm gif gimp glsa gpg gphoto2 gpm gtk hal htmlhandbook iconv id3 imagemagick imap isdnlog java jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility kdeprefix libnotify libwww lm_sensors mad madwifi midi mmxext mp3 mp4 mpeg mplayer mudflap musicbrainz ncurses nptl nptlonly nsplugin offensive ogg opengl openmp oss pcre pdf png pppd python qt3 qt3support quicktime rdesktop readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd theora threads tiff truetype unicode usb v4l v4l2 vorbis wifi win32codecs x264 x86 xcomposite xml xorg xulrunner xv xvid zlib zsh-completion" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon nikon" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB" USERLAND="GNU" VIDEO_CARDS="intel vesa"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 5 Michael Gaber 2009-01-05 23:35:23 UTC
is there anything new or anyone working on this problem? it's quite unsatisfying to always have to log in as root first to set up my system before actually starting to use it.

btw: manually starting /etc/init.d/dmcrypt doesn't work either, also hangs after stating how cryptsetup will be called
Comment 6 Sven Wegener gentoo-dev 2009-04-15 22:30:14 UTC
*** Bug 244497 has been marked as a duplicate of this bug. ***
Comment 7 Sven Wegener gentoo-dev 2009-04-15 22:37:01 UTC
*** Bug 245266 has been marked as a duplicate of this bug. ***
Comment 8 Sven Wegener gentoo-dev 2009-04-15 22:48:19 UTC
You can fix it with this applied to /lib/rcscripts/addons/dm-crypt-start.sh, it
forces the while loop to use its own file descriptor and does not replace
stdin, which cryptsetup needs.

--- /lib/rcscripts/addons/dm-crypt-start.sh
+++ /lib/rcscripts/addons/dm-crypt-start.sh

@@ -255,7 +255,7 @@
        # Fix for baselayout-1.12.10 (bug 174256)
        [ -z ${SVCNAME} ] && SVCNAME="${myservice}"

-       while read targetline ; do
+       while read -u 3 targetline ; do
                # skip comments and blank lines
                [[ ${targetline}\# == \#* ]] && continue

@@ -283,7 +283,7 @@

                # Queue this setting for the next call to
dm_crypt_execute_${SVCNAME}
                eval "${targetline}"
-       done < /etc/conf.d/dmcrypt
+       done 3< /etc/conf.d/dmcrypt

        # If we have a target queued up, then execute it
        dm_crypt_execute_${SVCNAME}
Comment 9 Olivier Pelerin 2009-04-20 21:08:03 UTC
I've 
Comment 10 Olivier Pelerin 2009-04-20 21:09:14 UTC
I've the same issue with gpg keys. Does it apply here?
Comment 11 Nikoli 2009-04-20 21:45:48 UTC
Version 1.0.6-r1 was removed from portage, it was the only ebuild, that worked with openrc and passphrases, does 1.0.6-r2 works with them well now?
Comment 12 Olivier Pelerin 2009-04-21 05:09:50 UTC
No it does not.... 

I never get the passphrase page. I've modified the 1.5.1-r1 ebuild to drop the udev<126 dependency and it's fine in my environment.

Tonight I might try to upgrade again and modify the dm-crypt-start.sh
 to see if it makes it working
Comment 13 Marios Andreopoulos 2009-05-12 20:05:55 UTC
(In reply to comment #8)
> You can fix it with this applied to /lib/rcscripts/addons/dm-crypt-start.sh, it
> forces the while loop to use its own file descriptor and does not replace
> stdin, which cryptsetup needs.
> 
> --- /lib/rcscripts/addons/dm-crypt-start.sh
> +++ /lib/rcscripts/addons/dm-crypt-start.sh

I want to confirm this bug and verify that the patch from Sven works fine (although I made these two changes by hand).
Comment 14 Raouf Bencheraiet 2009-06-06 06:00:52 UTC
(In reply to comment #13)
> (In reply to comment #8)
> > You can fix it with this applied to /lib/rcscripts/addons/dm-crypt-start.sh, it
> > forces the while loop to use its own file descriptor and does not replace
> > stdin, which cryptsetup needs.
> > 
> > --- /lib/rcscripts/addons/dm-crypt-start.sh
> > +++ /lib/rcscripts/addons/dm-crypt-start.sh
> 
> I want to confirm this bug and verify that the patch from Sven works fine
> (although I made these two changes by hand).
> 

works perfectly, was able to luksOpen home partition on boot with passphrase (no need to log as root to unlock partition)  after applying patch (by hand) on a setup with GPG encrypted key files .. I'd says this was 'smoother' than the dvanture I have with genkernel to decrypt the root partition.
Comment 15 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-06-10 14:09:22 UTC
reported success, anyone able to work on this now? Major udev blocker, I would like to see this get fixed.
Comment 16 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-06-16 20:45:51 UTC
Patch in comment #8 has been applied. Spoke to Doug (Cardoe) in IRC before committing. thx all.
Comment 17 SpanKY gentoo-dev 2015-04-12 20:24:03 UTC
*** Bug 273029 has been marked as a duplicate of this bug. ***