Re: [gentoo-user] 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
Re: [gentoo-user] 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 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-
Re: [gentoo-user] Segfaulting cryptsetup in init
On Mon, 09 Feb 2009 19:50:04 +0100 Johan Blåbäck 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 signature.asc Description: PGP signature
Re: [gentoo-user] 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+41aSwCgl7CAh0MXlWEogo2dnA9BSkr1 sTAAnR9Ppheav4nbGxBonWB6nzs80KEg =Szmp -END PGP SIGNATURE-
Re: [gentoo-user] 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+41kEACeLswROSAIfg4ZCY1kqurrTvQi pQsAnj5zixPj0Qbf+jzq5rRDSyPdEnNg =J7gU -END PGP SIGNATURE-
Re: [gentoo-user] 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 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-
Re: [gentoo-user] Segfaulting cryptsetup in init
On Mon, 09 Feb 2009 09:39:24 +0100 Johan Blåbäck 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 signature.asc Description: PGP signature
Re: [gentoo-user] Segfaulting cryptsetup in init
* Johan Blåbäck (johan.bluecr...@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 s...@sti@N GÜNTHER mailto:sam...@guenther-roetgen.de pgpQVaXRv4jOc.pgp Description: PGP signature
[gentoo-user] 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+gCgzLWM4mTtKWKUT3mTiE2mFHAz pWAAn3PR5SNCg3s9HHNGCSMjFjB13PIz =3nqB -END PGP SIGNATURE-