compiling under chroot
I have three Linux installs on this box and the latest is another install of CRUX 2.5. Right now I'm in Ubuntu. Is it okay to chroot into CRUX 2.5 while in Ubuntu and compile packages? Or is there a possibility that compiling might draw from Ubuntu's GCC version and sources? The reason I ask is because I compiled some packages and drivers this way, and when I boot into the CRUX 2.5 install it will not load modules. I keep getting Segmentation faults and no modules will load. From /var/log/messages:
When I try doing modprobe "by hand" I still get the same "segmentation fault" error and I cannot load even the first module. Doing /sbin/depmod -a gives the same error. Any help appreciated. :)
kernel: depmod: segfault at b81ed1f8 ip 0804de62 sp bfc63ef0 error 4 in depmod[8048000+c000]
kernel: depmod: segfault at b82c71f8 ip 0804de62 sp bfe3c8c0 error 4 in depmod[8048000+c000]
Building in chroot should be OK. I do it quite often, never had any problems. Provided you take all necessary steps. For Gentoo:
Gentoo Linux Documentation -- Chroot
I do it all the time in Gentoo, when I break things I go running for my Knoppix CD. My Binkie!
I finally gave up sorting out the segmentation faults as that's all there was and little else to go on. I would have eventually updated kernels anyway so I downloaded 18.104.22.168 and compiled it. Strangely enough. when I compiled the Nvidia 3d driver and rebooted I got segmentation fault! Seems the nvidiafb driver got loaded at startup but it doesn't like living alongside the 3d driver! So as far as I know it was never a problem with compiling under chroot at all.
I recompiled without the nvidiafb, rebooted, built the nvidia 3d driver, modprobed it and all is well there. However, I'm running into that pesky "no keyboard and no mouse" demon I ran into last time. I think it has to do with evdev and hald... something or other but have forgotten how I troubleshot it last time. If anyone remembers this or has experienced it, a little nudge in the right direction on getting it resolved will be most welcome! Thanks for the help! :)
Did you post solution in this thread?
Ed: btw chroot instruction seem to vary between distros ... I use
which usually works for me ... but since I have the root account locked depending on what I'm emerging things fail - I just unlock the root account and re-run the emerge (usually creating groups/users which fails).
mount -t ext3 /dev/sda1 /media/sda1
mount -t proc proc /media/sda1/proc
mount -t sysfs sys /media/sda1/sys
mount -o bind /dev /media/sda1/dev
chroot /media/sda1 /bin/bash
Well I'll be a drunk monkey, there it is!! Guess my mind is going quicker than I think! Thanks Jonathan183! You've saved the day yet again! :D
Originally Posted by Jonathan183