Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cannot "chroot" during installation
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
nocturna_gr
Tux's lil' helper
Tux's lil' helper


Joined: 04 Oct 2004
Posts: 96
Location: Athens, Greece

PostPosted: Mon Oct 04, 2004 4:12 pm    Post subject: cannot "chroot" during installation Reply with quote

"chroot /mnt/gentoo /bin/bash"
-->chroot: cannot run command "/bin/bash": No such file or directory

However, it does exist, but i' ve also tried entering the path of the "bash" command, which exists in the LiveCD and there was the same problem. What am i doing wrong?
Back to top
View user's profile Send private message
TNorthover
Guru
Guru


Joined: 25 Jan 2004
Posts: 434
Location: Edinburgh, UK

PostPosted: Mon Oct 04, 2004 4:26 pm    Post subject: Reply with quote

Make sure you're checking the correct bash. Specifically, it should be /mnt/gentoo/bin/bash. Also, try "chmod +x /mnt/gentoo/bin/bash" as this could be caused by the bash file not being labelled executable (for some obscure reason or other).

You shouldn't be able to enter the one that lives on the livecd because it's all calculated from within the chroot. So the livecd effectively won't exist (unless you did some weird mounting thing, but you'd definitely know about it if you had).
Back to top
View user's profile Send private message
cocozz
Apprentice
Apprentice


Joined: 31 Jul 2004
Posts: 160

PostPosted: Mon Oct 04, 2004 4:34 pm    Post subject: Reply with quote

Did u mount your partitions ?

mount /dev/hda3 /mnt/gentoo
mount /dev/hda1 /mnt/gentoo/boot
mount -t proc none /mnt/gentoo/proc

After that chroot...it should works
Back to top
View user's profile Send private message
malv
n00b
n00b


Joined: 07 Jul 2004
Posts: 69

PostPosted: Mon Oct 04, 2004 6:07 pm    Post subject: Reply with quote

This could happen if the code you want to execute after your chroot was compiled for a different cpu architecture or optimization.
Back to top
View user's profile Send private message
nocturna_gr
Tux's lil' helper
Tux's lil' helper


Joined: 04 Oct 2004
Posts: 96
Location: Athens, Greece

PostPosted: Mon Oct 04, 2004 8:46 pm    Post subject: Reply with quote

When i wrote, that "bash" existed, i meant "/bin/bash". But as i understand, what we need hear is the /mnt/gentoo/bin/bash, which doesn't exist. In fact, the whole /mnt/gentoo/bin directory doesn't exist, although i've mounted everything right (i think)... Iretyped cocozz's commands and "mtab" showed that everything had been already mounted. I also don't know if this has to do anything , but the partition i've mounted as /mnt/gentoo is a logical one.
What is wrong? :cry:
Back to top
View user's profile Send private message
TNorthover
Guru
Guru


Joined: 25 Jan 2004
Posts: 434
Location: Edinburgh, UK

PostPosted: Mon Oct 04, 2004 9:06 pm    Post subject: Reply with quote

It sounds like you may not have unpacked the stage tarball properly. Make sure you've got things mounted as cocozz says, then look at section 5 of the install guide again. Briefly, you need to get a stage tarball (the various merits of each are discussed in the document) and do:
Code:
cd /mnt/gentoo
tar -xvjpf stage?-*.tar.bz2


You'll need to replace stage?-*.tar.bz2 with the path to it on the gentoo CD if you're using that one. It's all explained in the docs at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml

If you're not clear on any of the instructions, or the "tar" command gives an error, feel free to post here and I'm sure we'll try to advise you.
Back to top
View user's profile Send private message
HaszeGoort
n00b
n00b


Joined: 07 Oct 2004
Posts: 8

PostPosted: Thu Oct 07, 2004 9:22 pm    Post subject: Reply with quote

I do have the same problem like nocturna_gr (had).

I exactly followed the handbook and unfortunaly have no idea what is wrong.. :(

I'm using Knoppix 3.6 as LiveCD and try to get gentoo installed.

"stage2-athlon-xp-2004.2.tar.bz2" is the name of the stage file i downloaded - which results in 131MB after unpacking it and then 733MB after the (alternative command cause of knoppix install) mount -o bind /proc /mnt/gentoo/proc

using mount =>
root@ttyp0[gentoo]# mount
/dev/root on / type ext2 (rw)
/dev/scd0 on /cdrom type iso9660 (ro)
/dev/cloop on /KNOPPIX type iso9660 (ro)
/ramdisk on /ramdisk type tmpfs (rw,size=405392k)
/proc/bus/usb on /proc/bus/usb type usbdevfs (rw,devmode=0666)
automount(pid533) on /mnt/auto type autofs (rw,fd=4,pgrp=533,minproto=2,maxproto=4)
/dev/hda5 on /mnt/hda5 type vfat (rw,nosuid,nodev,umask=000,uid=1000,gid=1000)
/dev/hda3 on /mnt/gentoo type reiserfs (rw)
/dev/hda1 on /mnt/gentoo/boot type ext2 (rw)
/proc on /mnt/gentoo/proc type none (rw,bind)


is ok isn't it?

and then BUUUM
root@ttyp0[gentoo]# chroot /mnt/gentoo /bin/bash
chroot: cannot run command `/bin/bash': Datei oder Verzeichnis nicht gefunden

second line translates into (using german knoppix):
-->chroot: cannot run command "/bin/bash": No such file or directory

after erasing the data on hda3 (trying non alternative command this time...)
and unpacking the .gz again => 131MB on hda3 then:

root@ttyp0[gentoo]# mount -t proc none /mnt/gentoo/proc
root@ttyp0[gentoo]# mount
/dev/root on / type ext2 (rw)
/dev/scd0 on /cdrom type iso9660 (ro)
/dev/cloop on /KNOPPIX type iso9660 (ro)
/ramdisk on /ramdisk type tmpfs (rw,size=405392k)
/proc/bus/usb on /proc/bus/usb type usbdevfs (rw,devmode=0666)
automount(pid533) on /mnt/auto type autofs (rw,fd=4,pgrp=533,minproto=2,maxproto=4)
/dev/hda5 on /mnt/hda5 type vfat (rw,nosuid,nodev,umask=000,uid=1000,gid=1000)
/dev/hda3 on /mnt/gentoo type reiserfs (rw)
/dev/hda1 on /mnt/gentoo/boot type ext2 (rw)
none on /mnt/gentoo/proc type proc (rw)

results in 733 MB on hda3

seems ok for me aswell :/

k lets chroot again:
root@ttyp0[gentoo]# chroot /mnt/gentoo /bin/bash
chroot: cannot run command `/bin/bash': Datei oder Verzeichnis nicht gefunden

second line translates into (using german knoppix):
-->chroot: cannot run command "/bin/bash": No such file or directory

(yes the directory file:/mnt/gentoo/bin/ and in sich directory there is a bash file)

I hope i missed something simple :/ and i hope you guys can help me

Regards
Back to top
View user's profile Send private message
chunderbunny
Veteran
Veteran


Joined: 31 May 2004
Posts: 1281
Location: 51°24'27" N, 0°57'15" W

PostPosted: Thu Oct 07, 2004 10:36 pm    Post subject: Reply with quote

I had this problem ith the latest Damn Small Linux disk (0.81), in the end I had to just downgrade to the 0.72 version instead, and that worked fine.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum