Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 230641 - sys-fs/cryptsetup-1.0.6 dies trying to mkswap for an encrypted swap partition if in boot runlevel
Summary: sys-fs/cryptsetup-1.0.6 dies trying to mkswap for an encrypted swap partition...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-03 14:51 UTC by Jeff Mitchell
Modified: 2015-04-12 20:43 UTC (History)
0 users

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 Jeff Mitchell 2008-07-03 14:51:05 UTC
I have dmcrypt setup to make an encrypted swap partition from a file.  I'm using baselayout-2 with the dmcrypt init script.  The issue is that if dmcrypt is run in the boot runlevel, mkswap dies with an error: "mkswap: unable to write signature page"

If I move it to the default runlevel, then everything is peachy.  What is confusing about this is that dmcrypt should be fairly self-contained here: it runs losetup (which is successful, as I can see it in losetup -a), then cryptsetup and mkswap.  Although this seems to be a dependency ordering issue, I'm not sure what other service it's really depending on.

Reproducible: Always

Steps to Reproduce:
Here's what I have in /etc/conf.d/dmcrypt:

swap=swap
loop_file='/swapfile'
source='/dev/loop1'

Note that there seem to be other issues too -- even when I move it to the default runlevel (so the swap is made successfully) it doesn't run swapon on the swap.  It also runs pre_mount commands (though I have none defined) and never runs post_mount commands (i.e. if I try to put a swapon in there).



Portage 2.1.4.4 (default/linux/x86/2008.0, gcc-4.2.4, glibc-2.6.1-r0, 2.6.25-tuxonice-r5 i686)
=================================================================
System uname: 2.6.25-tuxonice-r5 i686 Intel(R) Core(TM)2 Duo CPU T9500 @ 2.60GHz
Timestamp of tree: Tue, 24 Jun 2008 12:45:03 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="i686-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/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,--as-needed"
LINGUAS="en en_US"
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.namerica.gentoo.org/gentoo-portage"
USE="7zip X a52 aac aalib acl acpi aim alsa ao aspell audiofile avahi bash-completion berkdb branding bzip2 cdda cddb cdparanoia cdr cdrom cli cracklib crypt cups curl curlwrappers cvs cxx dbus device-mapper djvu dri dvd dvdr dvdread emacs encode exif exiv2 expat extrafilters fam fame fbcon fbsplash ffmpeg fftw flac fontconfig fortran ftp gd gdbm gif git glib glitz gnome gnutls gpm graphviz grub gs gsm gstreamer gtk hal hdri howl-compat iconv id3 id3tag imagemagick ipv6 isdnlog jabber java javascript jbig jpeg jpeg2k kde ladspa lame latex lcms libcaca libsamplerate libssh2 libvisual lm_sensors lzo mad md5sum mdnsresponder-compat midi mjpeg mmap mng mp3 mp4 mpeg mpeg2 mplayer mudflap multiuser musicbrainz mysql ncurses network nls nptl nptlonly nsplugin ntfs offensive ogg openexr opengl openmp oss otr pam pango pch pcre pdf perl plasma plotutils png pppd python qt3 qt3support qt4 quicktime readline reflection reiserfs ruby samba sdl session sndfile socks5 soundex spell spl sqlite3 ssl startup-notification subversion svg syslog tcl tcpd tetex theora threads tiff tk truetype unicode utils v4l v4l2 vcd video vidix vim vim-syntax visualization vorbis wmf wxwindows x264 x86 xcb xcomposite xine xinerama xinetd xml xmp xorg xscreensaver xsl xulrunner xv xvid xvmc yahoo zlib" ALSA_CARDS="hda_intel" 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" 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 synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-07-03 15:18:08 UTC
(Sorry, forgot to CC base-system on this bug)
Comment 2 Łukasz Damentko (RETIRED) gentoo-dev 2008-08-11 01:30:18 UTC
Reassigning back to herd since Benjamin has retired as a Gentoo developer (#89719).
Comment 3 SpanKY gentoo-dev 2015-04-12 20:43:17 UTC
please define a mkswap command to gather more info:
pre_mount='strace -f -o /tmp/log ${dev}'

then attach the log file