public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Segfaulting cryptsetup in init
@ 2009-02-09  8:39 Johan Blåbäck
  2009-02-09 11:20 ` Sebastian Günther
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Johan Blåbäck @ 2009-02-09  8:39 UTC (permalink / raw
  To: gentoo-user

-----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+gCgzLWM4mTtKWKUT3mTiE2mFHAz
pWAAn3PR5SNCg3s9HHNGCSMjFjB13PIz
=3nqB
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Segfaulting cryptsetup in init
  2009-02-09  8:39 [gentoo-user] Segfaulting cryptsetup in init Johan Blåbäck
@ 2009-02-09 11:20 ` Sebastian Günther
  2009-02-09 15:48 ` Mike Kazantsev
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Sebastian Günther @ 2009-02-09 11:20 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 685 bytes --]

* 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

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Segfaulting cryptsetup in init
  2009-02-09  8:39 [gentoo-user] Segfaulting cryptsetup in init Johan Blåbäck
  2009-02-09 11:20 ` Sebastian Günther
@ 2009-02-09 15:48 ` Mike Kazantsev
  2009-02-09 17:18   ` Johan Blåbäck
  2009-02-09 18:15 ` Johan Blåbäck
  2009-02-10 16:43 ` Florian Philipp
  3 siblings, 1 reply; 9+ messages in thread
From: Mike Kazantsev @ 2009-02-09 15:48 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 804 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Segfaulting cryptsetup in init
  2009-02-09 15:48 ` Mike Kazantsev
@ 2009-02-09 17:18   ` Johan Blåbäck
  0 siblings, 0 replies; 9+ messages in thread
From: Johan Blåbäck @ 2009-02-09 17:18 UTC (permalink / raw
  To: gentoo-user

-----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+41n6QCdGcoLnojw13UD40GlXkaZc6QX
dEkAni6+N/rU0MECoii2q/a7btNj1aRa
=QSRA
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Segfaulting cryptsetup in init
  2009-02-09  8:39 [gentoo-user] Segfaulting cryptsetup in init Johan Blåbäck
  2009-02-09 11:20 ` Sebastian Günther
  2009-02-09 15:48 ` Mike Kazantsev
@ 2009-02-09 18:15 ` Johan Blåbäck
  2009-02-09 18:50   ` Johan Blåbäck
  2009-02-10 16:43 ` Florian Philipp
  3 siblings, 1 reply; 9+ messages in thread
From: Johan Blåbäck @ 2009-02-09 18:15 UTC (permalink / raw
  To: gentoo-user

-----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+41kEACeLswROSAIfg4ZCY1kqurrTvQi
pQsAnj5zixPj0Qbf+jzq5rRDSyPdEnNg
=J7gU
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Segfaulting cryptsetup in init
  2009-02-09 18:15 ` Johan Blåbäck
@ 2009-02-09 18:50   ` Johan Blåbäck
  2009-02-10  0:53     ` Mike Kazantsev
  0 siblings, 1 reply; 9+ messages in thread
From: Johan Blåbäck @ 2009-02-09 18:50 UTC (permalink / raw
  To: gentoo-user

-----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+41aSwCgl7CAh0MXlWEogo2dnA9BSkr1
sTAAnR9Ppheav4nbGxBonWB6nzs80KEg
=Szmp
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Segfaulting cryptsetup in init
  2009-02-09 18:50   ` Johan Blåbäck
@ 2009-02-10  0:53     ` Mike Kazantsev
  2009-02-10  8:21       ` Johan Blåbäck
  0 siblings, 1 reply; 9+ messages in thread
From: Mike Kazantsev @ 2009-02-10  0:53 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Segfaulting cryptsetup in init
  2009-02-10  0:53     ` Mike Kazantsev
@ 2009-02-10  8:21       ` Johan Blåbäck
  0 siblings, 0 replies; 9+ messages in thread
From: Johan Blåbäck @ 2009-02-10  8:21 UTC (permalink / raw
  To: gentoo-user

-----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+437rACcCq0Usa21m4Cmndpp1b7+xPki
MKMAniVr+1GS5ZTCa9JqrvHja8O4xxV1
=OrNi
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Segfaulting cryptsetup in init
  2009-02-09  8:39 [gentoo-user] Segfaulting cryptsetup in init Johan Blåbäck
                   ` (2 preceding siblings ...)
  2009-02-09 18:15 ` Johan Blåbäck
@ 2009-02-10 16:43 ` Florian Philipp
  3 siblings, 0 replies; 9+ messages in thread
From: Florian Philipp @ 2009-02-10 16:43 UTC (permalink / raw
  To: gentoo-user

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




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-02-10 16:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-09  8:39 [gentoo-user] Segfaulting cryptsetup in init Johan Blåbäck
2009-02-09 11:20 ` Sebastian Günther
2009-02-09 15:48 ` Mike Kazantsev
2009-02-09 17:18   ` Johan Blåbäck
2009-02-09 18:15 ` Johan Blåbäck
2009-02-09 18:50   ` Johan Blåbäck
2009-02-10  0:53     ` Mike Kazantsev
2009-02-10  8:21       ` Johan Blåbäck
2009-02-10 16:43 ` Florian Philipp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox