You are not logged in.

#1 2010-11-23 17:39:14

gemon
Member
Registered: 2010-11-23
Posts: 20

kernel 2.6.35.8 recompile + util-linux-ng recompile = mess

hello everybody,
It's my first post to submit an issue so please be kind with me...I'm also new to linux.
I started from the hardest part, i.e. recompiling the linux kernel. That was needed because I'm making some exercises and learning, and I'm doing it from a qemu vm inside windows xp. That's why i need a very small kernel, which boots very quickly.

as an exercise, I'm also trying to compile util-linux-ng 2.18-3 from sources. reasons for this are
- I want to learn how the compile process works, in deeper detail
- I need to know how to patch the toolset, as I'd like to use loop-aes, even though I know there's no support for it

when first I compiled the util-linux-ng package after patching as per loop-aes readme, I thought it was a problem of loop-aes itself. So I tried to compile it without any loop-aes influence.
After tar jxvf I cd'd to the dir and just typed ./configure and then make. Compilation runs successfully, afaik, but when I try to launch the swapon command in the mount, that is what happens:

[root@myhost mount] ./swapon
lt-swapon: 'lt-swapon' is unsupported program name (must be 'swapon' or 'swapoff').

Any ideas what am I doing wrong?

As the subject says, please note that I recompiled my kernel, of course with CONFIG_BLK_DEV_LOOP=n and others, but other configurations does not look like influencing util-linux-ng. Can they?

Thanks in advance
Gemon

Offline

#2 2011-01-21 17:39:14

gemon
Member
Registered: 2010-11-23
Posts: 20

Re: kernel 2.6.35.8 recompile + util-linux-ng recompile = mess

sorry for bumping but...I tried a complete new linux box from scratch and I received exactly the same error. The problem is when I try to follow the following instructions to install the patched versions of the util-linux-ng commands...

from loop-aes readme

For either version of util-linux:

    cd mount
    install -m 4755 -o root mount umount /bin
    install -m 755 losetup swapon /sbin
    rm -f /sbin/swapoff && ( cd /sbin && ln -s swapon swapoff )
    rm -f /usr/share/man/man8/{mount,umount,losetup,swapon,swapoff}.8.gz
    install -m 644 mount.8 umount.8 losetup.8 /usr/share/man/man8
    install -m 644 swapon.8 swapoff.8 /usr/share/man/man8
    rm -f /usr/share/man/man5/fstab.5.gz
    install -m 644 fstab.5 /usr/share/man/man5
    mandb
    cd ../..

apparently, after those commands, when I do swapoff -a that's what I receive:

[root@box mount]# swapoff -a
lt-swapon: 'lt-swapon' is unsupported program name (must be 'swapon' or 'swapoff').

while mount/umount looks like they're working...

I know loop-aes is not supported but this seems to be util-linux-ng compile issue...or something I do wrong relative to that compilation
Any clue?

TIA
Gemon

Offline

#3 2011-02-09 15:52:34

ixz
Member
Registered: 2011-02-09
Posts: 2

Re: kernel 2.6.35.8 recompile + util-linux-ng recompile = mess

Hey

It's not mess.
> First, don't kill yourself when you read my bad english ;-)
> Second... look at this:


test:~# whereis swapon
swapon: /sbin/swapon.old /sbin/swapon /usr/share/man/man8/swapon.8

where:
swapon.old -> my old swapon before util-linux-ng installed with loop-aes
swapon -> new binary

swapon that you have is script warper, but if you read this script you can see how it work. Anyway it's usless so go to /sbin/.libs and look there

test:/sbin/.libs# ls -la
-rwxr-xr-x 1 root root 136468 2011-02-08 16:48 losetup
-rwxr-xr-x 1 root root  89485 2011-02-08 16:35 lt-swapon -> it's your binary that say there is problem.

do then

mv /sbin/swapon /sbin/.libs/swapon.script (just for backup)
cp /sbin/.libs/lt-swapon /sbin/swapon
cp /sbin/.libs/lt-swapoff /sbin/swapoff

it will be working.

you should be happy that you don't have liblary problems with mount/umount ;) my libs from system are diffrent from those in util-linux-ng and i had to relink those files. good bless that there are scripts in util-linux-ng ;) to do that. but it take me 2 days to find time and find this stuff ;)

anyway

loop-aes and util-linux-ng work ;)

Offline

Board footer

Powered by FluxBB