Find the answer to your Linux question:
Results 1 to 6 of 6
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630

    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:
    Code:
    kernel:  depmod[1265]: segfault at b81ed1f8 ip 0804de62 sp bfc63ef0 error 4 in depmod[8048000+c000]
    kernel: depmod[1269]: segfault at b82c71f8 ip 0804de62 sp bfe3c8c0 error 4 in depmod[8048000+c000]
    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.
    Linux Mint + IceWM Registered: #371367 New Members: click here

  2. #2
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    877
    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

  3. #3
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    I do it all the time in Gentoo, when I break things I go running for my Knoppix CD. My Binkie!
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  4. #4
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    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 2.6.30.1 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!
    Linux Mint + IceWM Registered: #371367 New Members: click here

  5. #5
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,043
    Did you post solution in this thread?

    Ed: btw chroot instruction seem to vary between distros ... I use
    Code:
    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
    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).

  6. #6
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    Quote Originally Posted by Jonathan183 View Post
    Did you post solution in this thread?
    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!
    Linux Mint + IceWM Registered: #371367 New Members: click here

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •