Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 119657 - /etc/init.d/localmount: swapon possibly outputs error messages
Summary: /etc/init.d/localmount: swapon possibly outputs error messages
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-20 02:23 UTC by Thomas Heinz
Modified: 2006-01-20 12:11 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 Thomas Heinz 2006-01-20 02:23:23 UTC
During bootup, swapon is usually called two times: within /sbin/rc (runs first) and /etc/init.d/localmount. In my case, swap is already established by /sbin/rc. When running `/etc/init.d/localmount start`, I am getting the following error message:

swapon: loop device /dev/loop2 already in use

This is not a problem, just a cosmetic issue. As a fix, I suggest the following:

        # Swap on loopback devices, and other weirdnesses
        ebegin "Activating (possibly) more swap"
        /sbin/swapon -a &> /dev/null
        eend 0

within /etc/init.d/localmount.
Comment 1 SpanKY gentoo-dev 2006-01-20 03:59:07 UTC
no, that isnt going to happen

post your `emerge info` and your /etc/fstab
Comment 2 Thomas Heinz 2006-01-20 04:17:24 UTC
grep swap /etc/fstab yields:

/dev/evms/swap                          none                            swap            sw,loop=/dev/loop2,encryption=AES256                              0 0

As you can see, I am using loop-aes encrypted swap. For this purpose, I had to install a modified version of some util-linux tools (e.g. swapon) on my system (see http://loop-aes.sourceforge.net/loop-AES.README). In fact, the swapon error I mentioned is introduced by the loop-aes util-linux patch.

So you can easily argue that you won't change Gentoo's /etc/init.d/localmount if Gentoo does not officially support loop-aes which seems to be the case since there is no stable marked version of loop-aes. That's fine with me; after all it's just a minor cosmetic issue and I can easily fix it on my system. The correct fix would be to "correct" the loop-aes util-linux patch.

emerge --info yields:

Portage 2.0.53 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r2, 2.6.13-gentoo-r5 i686)
=================================================================
System uname: 2.6.13-gentoo-r5 i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.6.14
ccache version 2.3 [enabled]
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo http://gentoo.osuosl.org/"
LANG="de_DE@euro"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X Xaw3d a52 aac aalib accessibility acl acpi aim alsa apache2 apm arts audiofile avi bash-completion bcmath berkdb bitmap-fonts bluetooth bzip2 calendar caps cdb cdparanoia cdr cpdflib crypt cscope cups curl curlwrappers dbm dbus dedicated dga dio directfb doc dts dv dvb dvd dvdr dvdread eds emacs emboss encode esd ethereal examples exif expat fam fastcgi fbcon ffmpeg fftw flac flash flatfile foomaticdb fortran freetds ftp gd gdbm geoip gif ginac glut gmp gnome gnutls gphoto2 gpm gps gstreamer gtk gtk2 guile hal hardened hardenedphp howl hyperwave-api icc iconv icq idn ieee1394 imagemagick imap imlib innodb iodbc ipv6 jabber jack java javascript joystick jpeg kde kdeenablefinal kerberos krb4 ladcca lcms ldap leim lesstif libcaca libg++ libgda libwww lirc lm_sensors mad maildir matroska matrox mcal mcve memlimit mhash mikmod milter mime ming mmap mmx mng mono motif mozilla mp3 mpeg mpi msession msn mule mysql mysqli nas ncurses netcdf nls nocd nptl offensive ofx ogg oggvorbis openal opengl osc oscar oss pam pcntl pcre pda pdflib perl pfpro php plotutils png portaudio posix ppds python qdbm qt quicktime radius readline recode ruby samba sasl scanner sdl session sharedext sharedmem shorten simplexml skey slang slp smartcard sndfile snmp soap sockets socks5 sox speex spell spl sqlite ssl svg svga tcltk tcpd tetex theora threads tidy tiff tokenizer truetype truetype-fonts type1-fonts udev usb v4l vcd vhosts videos vorbis wddx win32codecs wmf wxwindows x86 xface xine xml xml2 xmlrpc xmms xpm xprint xsl xv xvid yahoo yaz zeo zlib linguas_de userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 3 SpanKY gentoo-dev 2006-01-20 04:49:13 UTC
> As you can see, I am using loop-aes encrypted swap. For this purpose, I had to
> install a modified version of some util-linux tools (e.g. swapon) on my system
> (see http://loop-aes.sourceforge.net/loop-AES.README). In fact, the swapon
> error I mentioned is introduced by the loop-aes util-linux patch.

why ?  Gentoo util-linux supports loop-aes now when you have USE=crypt

> So you can easily argue that you won't change Gentoo's /etc/init.d/localmount
> if Gentoo does not officially support loop-aes which seems to be the case 
> since there is no stable marked version of loop-aes.

i'm not going to change localmount because it isnt broken :)
we do have loop-aes support in Gentoo util-linux though so looking into that shouldnt be a problem

could you post a small set of steps so i can try and reproduce the warning over here ?
Comment 4 Thomas Heinz 2006-01-20 08:33:05 UTC
After emerging the latest Gentoo util-linux ebuild, everything is fine. Thanks for the information. In fact, I did not become aware of Gentoo's util-linux supporting loop-aes.
Comment 5 SpanKY gentoo-dev 2006-01-20 12:11:06 UTC
that works too ;)