FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 02-09-2009, 07:39 AM
Johan Blåbäck
 
Default Segfaulting cryptsetup in init

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi,

I'm setting up this old computer of mine and why not encrypt it. I have
done this on several computers before, but never have I gotten these
kind of errors.

When booting, cryptsetup segfaults. I can find no obvious reason why, I
have tried to recompile cryptsetup using different arch, but still the
same. It is build statically, USE=-dynamic is set and ldd just says "no
dynamic executable". But when trying to debug I copied the cryptsetup,
that is not working in the init, to a usb-device and tried to decrypt my
disk using a livecd, and this went fine.

So to summarize:
init - cryptsetup segfaults
in livecd env - cryptsetup ok
in gentoo system - cryptsetup ok

the other programs in the init seems to run as they should; busybox and lvm.

Any ideas on how to continue debugging or is there someone with the answer?

- --
For security reasons, all text in this mail is double-rot13 encrypted.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmP67wACgkQ82oqndqg+400+gCgzLWM4mTtKW KUT3mTiE2mFHAz
pWAAn3PR5SNCg3s9HHNGCSMjFjB13PIz
=3nqB
-----END PGP SIGNATURE-----
 
Old 02-09-2009, 10:20 AM
Sebastian Günther
 
Default Segfaulting cryptsetup in init

* Johan Blåbäck (johan.bluecreek@gmail.com) [09.02.09 09:40]:
> hi,
>
> I'm setting up this old computer of mine and why not encrypt it. I have
> done this on several computers before, but never have I gotten these
> kind of errors.
>
> the other programs in the init seems to run as they should; busybox and lvm.
>
> Any ideas on how to continue debugging or is there someone with the answer?
>

Forgot to compile the Crypto Algorithms in the kernel instead of as
modules? Since lvm runs, the lvm is obviously no module.

HTH
Sebastian

--
" Religion ist das Opium des Volkes. " Karl Marx

SEB@STI@N GÜNTHER mailto:samson@guenther-roetgen.de
 
Old 02-09-2009, 02:48 PM
Mike Kazantsev
 
Default Segfaulting cryptsetup in init

On Mon, 09 Feb 2009 09:39:24 +0100
Johan Blåbäck <johan.bluecreek@gmail.com> wrote:

> I'm setting up this old computer of mine and why not encrypt it. I have
> done this on several computers before, but never have I gotten these
> kind of errors.

You'll get segfault if you're trying to do something like luksOpen on a
non-existing device.

At least that was the reason for me, once, when I've tried to
luksOpen /dev/sda2 instead of /dev/sda3, or something like that.

Had it figured out by putting strace to initrd and running "strace
cryptsetup luksOpen ..." instead of just cryptsetup - gave me something
like "open('/dev/sdaX', ...) = -1 ENXIO (No such device or address)", so
I had to double-check and found the mistake to be that trivial.

--
Mike Kazantsev // fraggod.net
 
Old 02-09-2009, 04:18 PM
Johan Blåbäck
 
Default Segfaulting cryptsetup in init

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mike Kazantsev wrote:
> On Mon, 09 Feb 2009 09:39:24 +0100
> Johan Blåbäck <johan.bluecreek@gmail.com> wrote:
>
>> I'm setting up this old computer of mine and why not encrypt it. I have
>> done this on several computers before, but never have I gotten these
>> kind of errors.
>
> You'll get segfault if you're trying to do something like luksOpen on a
> non-existing device.
>
> At least that was the reason for me, once, when I've tried to
> luksOpen /dev/sda2 instead of /dev/sda3, or something like that.
>
> Had it figured out by putting strace to initrd and running "strace
> cryptsetup luksOpen ..." instead of just cryptsetup - gave me something
> like "open('/dev/sdaX', ...) = -1 ENXIO (No such device or address)", so
> I had to double-check and found the mistake to be that trivial.
>

This was actually one of the first things I checked. Just forgot to
mention it. I solved it by adding a 'ls -l /dev' in the init, and there
I found out that /dev/sda1 was named /dev/hda1. But I still got the problem.

> Forgot to compile the Crypto Algorithms in the kernel instead of as
> modules? Since lvm runs, the lvm is obviously no module.

> HTH
> Sebastian

I'm quite sure that I have compiled in all of the algorithms I'm using.
But I will add some more just to be sure. Recompiling my kernel as I write.

Thanks to both of you.

- --
For security reasons, all text in this mail is double-rot13 encrypted.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmQZVsACgkQ82oqndqg+41n6QCdGcoLnojw13 UD40GlXkaZc6QX
dEkAni6+N/rU0MECoii2q/a7btNj1aRa
=QSRA
-----END PGP SIGNATURE-----
 
Old 02-09-2009, 05:15 PM
Johan Blåbäck
 
Default Segfaulting cryptsetup in init

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Johan Blåbäck wrote:
> hi,
>
> I'm setting up this old computer of mine and why not encrypt it. I have
> done this on several computers before, but never have I gotten these
> kind of errors.
>
> When booting, cryptsetup segfaults. I can find no obvious reason why, I
> have tried to recompile cryptsetup using different arch, but still the
> same. It is build statically, USE=-dynamic is set and ldd just says "no
> dynamic executable". But when trying to debug I copied the cryptsetup,
> that is not working in the init, to a usb-device and tried to decrypt my
> disk using a livecd, and this went fine.
>
> So to summarize:
> init - cryptsetup segfaults
> in livecd env - cryptsetup ok
> in gentoo system - cryptsetup ok
>
> the other programs in the init seems to run as they should; busybox and lvm.
>
> Any ideas on how to continue debugging or is there someone with the answer?
>


hi again,

Still got a segfault :-/
The things I have tried more is to recompile cryptsetup and used that
for init, but no change. Compiled in all crypto algorithms, no change.
I'm not that good with all the options in the kernel. If anyone know of
which kernel options that could affect cryptsetup in this way?

Any ideas anyone?
(thx for the help sofar)

- --
For security reasons, all text in this mail is double-rot13 encrypted.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmQcsQACgkQ82oqndqg+41kEACeLswROSAIfg 4ZCY1kqurrTvQi
pQsAnj5zixPj0Qbf+jzq5rRDSyPdEnNg
=J7gU
-----END PGP SIGNATURE-----
 
Old 02-09-2009, 05:50 PM
Johan Blåbäck
 
Default Segfaulting cryptsetup in init

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Johan Blåbäck wrote:
> Johan Blåbäck wrote:
>> hi,
>
>> I'm setting up this old computer of mine and why not encrypt it. I have
>> done this on several computers before, but never have I gotten these
>> kind of errors.
>
>> When booting, cryptsetup segfaults. I can find no obvious reason why, I
>> have tried to recompile cryptsetup using different arch, but still the
>> same. It is build statically, USE=-dynamic is set and ldd just says "no
>> dynamic executable". But when trying to debug I copied the cryptsetup,
>> that is not working in the init, to a usb-device and tried to decrypt my
>> disk using a livecd, and this went fine.
>
>> So to summarize:
>> init - cryptsetup segfaults
>> in livecd env - cryptsetup ok
>> in gentoo system - cryptsetup ok
>
>> the other programs in the init seems to run as they should; busybox and lvm.
>
>> Any ideas on how to continue debugging or is there someone with the answer?
>
>
>
> hi again,
>
> Still got a segfault :-/
> The things I have tried more is to recompile cryptsetup and used that
> for init, but no change. Compiled in all crypto algorithms, no change.
> I'm not that good with all the options in the kernel. If anyone know of
> which kernel options that could affect cryptsetup in this way?
>
> Any ideas anyone?
> (thx for the help sofar)
>

I had noticed this problem w/ my laptop where some usbdevices dont show
up until a few seconds later than when the init is running. So I added a
'sleep 10' to the init, and what I got was

- - 10 s sleep
- - during these I get a messege: sda: sda1 sda2 (this is the bootable
usb-key)
- - cryptsetup segfaults
- - ls -l /dev/sd* gives 'ls: /dev/sd*: No such file or directory'
- - ls -l DEv/hd* gives '/dev/hda1'

How is this possible? Shouldn't it show sda, sda1 and sda2 together with
hda and hda1? Why are these missing?


- --
For security reasons, all text in this mail is double-rot13 encrypted.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmQetwACgkQ82oqndqg+41aSwCgl7CAh0MXlW Eogo2dnA9BSkr1
sTAAnR9Ppheav4nbGxBonWB6nzs80KEg
=Szmp
-----END PGP SIGNATURE-----
 
Old 02-09-2009, 11:53 PM
Mike Kazantsev
 
Default Segfaulting cryptsetup in init

On Mon, 09 Feb 2009 19:50:04 +0100
Johan Blåbäck <johan.bluecreek@gmail.com> wrote:

> I had noticed this problem w/ my laptop where some usbdevices dont show
> up until a few seconds later than when the init is running. So I added a
> 'sleep 10' to the init, and what I got was
>
> - - 10 s sleep
> - - during these I get a messege: sda: sda1 sda2 (this is the bootable
> usb-key)
> - - cryptsetup segfaults
> - - ls -l /dev/sd* gives 'ls: /dev/sd*: No such file or directory'
> - - ls -l DEv/hd* gives '/dev/hda1'
>
> How is this possible? Shouldn't it show sda, sda1 and sda2 together with
> hda and hda1? Why are these missing?

Why should it? Do you have full-fledged udev on initrd?
I've always created them by hand with mknod or just copied from a
working system - you know which ones you'll need, anyway.

And I've had segfaults with usb hdd too, as I recall, but if you put
cryptsetup in a 'while true' loop it'll prompt for passphrase / mount
device as soon as it'll be detected.

--
Mike Kazantsev // fraggod.net
 
Old 02-10-2009, 07:21 AM
Johan Blåbäck
 
Default Segfaulting cryptsetup in init

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mike Kazantsev wrote:
> On Mon, 09 Feb 2009 19:50:04 +0100
> Johan Blåbäck <johan.bluecreek@gmail.com> wrote:
>
>> I had noticed this problem w/ my laptop where some usbdevices dont show
>> up until a few seconds later than when the init is running. So I added a
>> 'sleep 10' to the init, and what I got was
>>
>> - - 10 s sleep
>> - - during these I get a messege: sda: sda1 sda2 (this is the bootable
>> usb-key)
>> - - cryptsetup segfaults
>> - - ls -l /dev/sd* gives 'ls: /dev/sd*: No such file or directory'
>> - - ls -l DEv/hd* gives '/dev/hda1'
>>
>> How is this possible? Shouldn't it show sda, sda1 and sda2 together with
>> hda and hda1? Why are these missing?
>
> Why should it? Do you have full-fledged udev on initrd?
> I've always created them by hand with mknod or just copied from a
> working system - you know which ones you'll need, anyway.
>
> And I've had segfaults with usb hdd too, as I recall, but if you put
> cryptsetup in a 'while true' loop it'll prompt for passphrase / mount
> device as soon as it'll be detected.
>

True. I forgot that I just created the hda1 node. I figured it out
anyway. What I was missing was some IDE options in the kernel. Thanks
for the help all.

- --
For security reasons, all text in this mail is double-rot13 encrypted.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmROPgACgkQ82oqndqg+437rACcCq0Usa21m4 Cmndpp1b7+xPki
MKMAniVr+1GS5ZTCa9JqrvHja8O4xxV1
=OrNi
-----END PGP SIGNATURE-----
 
Old 02-10-2009, 03:43 PM
Florian Philipp
 
Default Segfaulting cryptsetup in init

Johan Blåbäck schrieb:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi,

I'm setting up this old computer of mine and why not encrypt it. I have
done this on several computers before, but never have I gotten these
kind of errors.

When booting, cryptsetup segfaults. I can find no obvious reason why, I
have tried to recompile cryptsetup using different arch, but still the
same. It is build statically, USE=-dynamic is set and ldd just says "no
dynamic executable". But when trying to debug I copied the cryptsetup,
that is not working in the init, to a usb-device and tried to decrypt my
disk using a livecd, and this went fine.

So to summarize:
init - cryptsetup segfaults
in livecd env - cryptsetup ok
in gentoo system - cryptsetup ok




I'm not sure whether it was cryptsetup or gpg who had trouble but I seem
to need these lines in my initrd to get things going:


rm /dev/tty
ln -s /dev/console /dev/tty
 

Thread Tools




All times are GMT. The time now is 09:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org