Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 177100 - sys-apps/baselayout-2 no longer loads dm-crypt volumes
Summary: sys-apps/baselayout-2 no longer loads dm-crypt volumes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Benjamin Smee (strerror) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 134489
Blocks:
  Show dependency tree
 
Reported: 2007-05-04 22:42 UTC by Mike Auty (RETIRED)
Modified: 2007-08-17 22:01 UTC (History)
3 users (show)

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


Attachments
/etc/init.d/dmcrypt rcscript (dmcrypt,471 bytes, text/plain)
2007-05-04 22:43 UTC, Mike Auty (RETIRED)
Details
/lib/rcscripts/addons/dm-crypt-start.sh (dm-crypt-start.sh,7.25 KB, text/plain)
2007-05-04 22:43 UTC, Mike Auty (RETIRED)
Details
/lib/rcscripts/addons/dm-crypt-stop.sh (dm-crypt-stop.sh,1021 bytes, text/plain)
2007-05-04 22:44 UTC, Mike Auty (RETIRED)
Details
/etc/init.d/dmcrypt rcscript - version 2 (dmcrypt,751 bytes, text/plain)
2007-05-05 11:00 UTC, Mike Auty (RETIRED)
Details
/etc/init.d/dmcrypt rcscript - version 3 (dmcrypt,555 bytes, text/plain)
2007-05-16 19:36 UTC, Mike Auty (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Auty (RETIRED) gentoo-dev 2007-05-04 22:42:12 UTC
As requested in http://www.mail-archive.com/gentoo-dev@lists.gentoo.org/msg20846.html, I'm attaching patched scripts for mounting dmcrypt swap and other encrypted volumes.

Sadly it still can't be started after urandom, because it must be started before checkfs (and apparently checkfs won't start properly if urandom is started before it).  Sorry...  5:(  It may eventually be possible with multiple start-up services, such as one for swap, one for pre-lvm and one for post-lvm.  That should allow urandom to be started after checkfs, but before the dmcrypt-swap starts, since swap doesn't need to be checked.

Anyway, the new rcscript is called dmcrypt (to try and stay in keeping with the addon name).  To stick with the "/etc/init.d/name means /etc/conf.d/name" idea, /etc/conf.d/cryptfs has now been changed to /etc/conf.d/dmcrypt.

Finally, I've only really tested this with swap, but it appears to work.  Hope it helps/is a start...  5:)

Files to follow
Comment 1 Mike Auty (RETIRED) gentoo-dev 2007-05-04 22:43:26 UTC
Created attachment 118184 [details]
/etc/init.d/dmcrypt rcscript
Comment 2 Mike Auty (RETIRED) gentoo-dev 2007-05-04 22:43:51 UTC
Created attachment 118185 [details]
/lib/rcscripts/addons/dm-crypt-start.sh
Comment 3 Mike Auty (RETIRED) gentoo-dev 2007-05-04 22:44:13 UTC
Created attachment 118186 [details]
/lib/rcscripts/addons/dm-crypt-stop.sh
Comment 4 Jose daLuz 2007-05-05 01:12:09 UTC
It also fails to mount lvm volumes. My /dev/vg1 symlinks are never created. I can manually mount the files in /dev/mapper after boot. 

If this is unrelated, please let me know and I will file a separate bug.

Portage 2.1.2.5 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.21-gentoo x86_64)
=================================================================
System uname: 2.6.21-gentoo x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System release 1.13.0_alpha12
Timestamp of tree: Fri, 04 May 2007 23:20:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.32
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.20-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -ggdb"
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/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=k8 -O2 -pipe -ggdb -ffriend-injection"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=""
FEATURES="ccache distlocks fixpackages parallel-fetch sandbox sfperms splitdebug strict"
GENTOO_MIRRORS="http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://gentoo.osuosl.org/ "
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=120"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/wrobel /usr/portage/local/layman/gnome-experimental /usr/portage/local/layman/xeffects /usr/portage/local/layman/sunrise /usr/local/overlays/myoverlay /usr/local/overlays/bmg-main"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X a52 aac alsa amd64 amr bash-completion berkdb bitmap-fonts bzip2 cairo cdda cdr cli cracklib crypt css cups dbus debug dri dts dvd dvdr eds emboss encode esd fam ffmpeg firefox flac fortran gdbm gif glitz gnome gpm gstreamer gtk gtk2 hal iconv ipv6 isdnlog java jpeg kde kdehiddenvisibility ldap libg++ libnotify mad midi mikmod mono mp3 mpeg ncurses nls nptl nptlonly ogg opengl pam pcre perl pic png ppds pppd python qt3 qt4 quicktime readline reflection ruby samba sdl session spell spl sqlite ssl tcpd theora tiff truetype truetype-fonts type1-fonts unicode usb userlocales vcd vorbis x264 xml xorg xv xvid zlib" ALSA_CARDS="emu10k1 intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="vesa nvidia"
Unset:  CTARGET, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 5 Mike Auty (RETIRED) gentoo-dev 2007-05-05 09:24:16 UTC
Hiya Jose, sadly that is unrelated.  Baselayout-2 now requires each of the volumes type (lvm, raid, dm-crypt, etc) to have their own init script and this one only covers dm-crypt.  You can read more about the decision at http://www.mail-archive.com/gentoo-dev@lists.gentoo.org/msg20842.html.
Comment 6 Mike Auty (RETIRED) gentoo-dev 2007-05-05 10:53:14 UTC
Jose, it appears you're after bug 175983.  5:)
Comment 7 Mike Auty (RETIRED) gentoo-dev 2007-05-05 11:00:52 UTC
Created attachment 118221 [details]
/etc/init.d/dmcrypt rcscript - version 2

Slightly corrected rc-script that removes dependencies for baselayout-1 (as yoinked from bug 175983) just to be on the safe side, and also now shuts down the dm-crypt stuff as well...
Comment 8 Jose daLuz 2007-05-05 12:45:51 UTC
(In reply to comment #6)
> Jose, it appears you're after bug 175983.  5:)
> 
Thanks very much, I'll follow that bug instead.
Comment 9 Mike Auty (RETIRED) gentoo-dev 2007-05-16 19:36:59 UTC
Created attachment 119463 [details]
/etc/init.d/dmcrypt rcscript - version 3

Slightly fixed up version that now includes a stop function (because otherwise dm-crypt-stop.sh is a bit pointless, I'm not sure why I didn't include one initially) and also fixes an issue in the warning for baselayout-1 users that was using a baselayout-2 variable, pointed out to me by Hoffie.  5:)
Comment 10 Thomas Meyer 2007-08-06 18:58:31 UTC
Any news on this bug? Now that baselayout-2 is on the horizon...

And please change summary to "sys-apps/baselayout-2.0.0_rc2 no longer loads dm-crypt volumes".
Comment 11 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2007-08-14 16:07:03 UTC
in cvs. make sure you emerge cryptsetup and NOT cryptsetup-luks. You'll also have to do the "rc-update add dmcrypt boot" etc.
Comment 12 Thomas Meyer 2007-08-14 21:00:20 UTC
ok. Thanks. BUT the addons scripts should search
for the cryptsetup binary in /sbin and not in
/bin/cryptsetup...

then everything is working fine again.
Comment 13 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2007-08-17 22:01:01 UTC
yeah i fixed that in cvs the day after, just remerge to get the correct /sbin reference.