Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
I've been trying to install Gentoo out of Debian Lenny, using a spare partition. I've got the basic system set up, working as root, but when I try to chroot ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,218

    [SOLVED] Gentoo won't let me run bash


    I've been trying to install Gentoo out of Debian Lenny, using a spare partition. I've got the basic system set up, working as root, but when I try to chroot into it I get a permissions error: Cannot run command /bin/bash: permission denied. The same thing happens if I try to run Gentoo's version of bash (or of any other command for that matter) without chrooting.

    I've checked the permissions on these commands and they are all world-executable. I notice that Gentoo's libc is a bit older than Lenny's. Is that what's causing the problem? And if so, how do I get round it?
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

  2. #2
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    You must be root to chroot into Gentoo, just in case you haven't already figured that out. Does it give you the same problem if you use any LiveCD such as Knoppix?
    What are the exact commands you using to perform chroot?
    mount /dev/hd?? /mnt/gentoo
    mount -t proc none /mnt/gentoo/proc
    chroot /mnt/gentoo /bin/bash
    env-update && source /etc/profile
    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.

  3. #3
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,218
    I don't have Knoppix but I tried with a live Ubuntu disc and I could chroot to the new partition without any difficulty and use commands in the bin directory, including bash. From Debian I can't. Weird isn't it! And yes, I was root when I tried. Various commands I've tried (all as root) are:
    Code:
    chroot /mnt/hda1
    Code:
    chroot /mnt/hda1 /bin/bash
    Code:
    cd /mnt/hda1/bin
    ./bash
    They all give the same error
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

  4. #4
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    I would guess that it's a debian problem, although I wouldn't know where to begin pointing the finger, or like you mentioned, it could be a file version problem.
    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.

  5. #5
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,043
    Interesting problem ... when you try
    Code:
    chroot /mnt/hda1 /bin/bash
    and get the permission failure what is the full output you get for mount?
    what commands had you used before chroot?

  6. #6
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    If you cannot figure out how to make this work from within Debian, I would suggest installing from a LiveCD like you mentioned "live Ubuntu disc" and use the handbook from the alt install guide (what little there is)
    Gentoo Linux Documentation -- The Gentoo Linux alternative installation method HOWTO
    Just *pretend* you're using Knoppix, it should work just fine.
    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.

  7. #7
    Linux Enthusiast gruven's Avatar
    Join Date
    Dec 2004
    Location
    Arkansas
    Posts
    541
    I would try to help, but honestly, I have not done a stable Gentoo install in ages. The last time I tried, it was broken and had circular dependencies like crazy, so I usually just stick with the handbook using funtoo tarballs and running an all ~arch install.

    Yeah, I am asking for it, but at least it works.

    About your problem, I have installed Gentoo from Debian before (and vice-versa), and never had that problem.

    Linux User #376741
    Code is Poetry

  8. #8
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,218
    Quote Originally Posted by Jonathan183 View Post
    Interesting problem ... when you try
    Code:
    chroot /mnt/hda1 /bin/bash
    and get the permission failure what is the full output you get for mount?
    what commands had you used before chroot?
    Here's the output of mount:

    /dev/hda4 on / type ext3 (rw,errors=remount-ro)
    tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
    procbususb on /proc/bus/usb type usbfs (rw)
    udev on /dev type tmpfs (rw,mode=0755)
    tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
    devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
    /dev/hda3 on /home type ext3 (rw)
    /dev/hda1 on /mnt/hda1 type ext3 (rw,noexec,nosuid,nodev)
    none on /mnt/hda1/proc type proc (rw)
    /dev on /mnt/hda1/dev type none (rw,bind)

    As you can see, I've got proc and dev mounted as specified. I mounted them first, then tried to chroot. Last night I thought it might be an X problem but I tried again just now from a virtual console and got the same results. I'm pretty sure it isn't the chroot that's failing, it's bash. I can't run any of the Gentoo commands, not even ldconfig, which is statically linked. Well, like Mike says, I can use Ubuntu to get round that but it irritates me when things happen that don't seem to have a rational explanation - especially in Linux!
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

  9. #9
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Hazel, try this.
    Instead of mounting /proc at none:
    Code:
    mount -o bind /proc /mnt/hda1/proc
    Did you have any problems with the install before this happened?
    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.

  10. #10
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,043
    Quote Originally Posted by hazel View Post
    /dev/hda1 on /mnt/hda1 type ext3 (rw,noexec,nosuid,nodev
    I think your problem is caused by mount of hda1 ...

Page 1 of 2 1 2 LastLast

Posting Permissions

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