Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
chroot in 32bit System funktioniert nicht mehr [solved]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
nanos
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2006
Posts: 78

PostPosted: Tue Dec 04, 2012 2:43 pm    Post subject: chroot in 32bit System funktioniert nicht mehr [solved] Reply with quote

Hallo Forum,

ich habe auf einem Server mit 64bit System ein Verzeichnis mit einer 32bit Installation.
Darin ist ein fertiges System das ich für eine Boot-CD erstellt habe.
Mit "linux32 chroot /mnt/gentoo32 /bin/bash" bin ich da immer rein gewechselt und habe notwendige Änderungen erledigt.

Leider funktioniert der chroot seit einiger Zeit nicht mehr und es ist mir nicht mehr möglich Änderungen an diesem System vorzunehmen.
Bei meiner Suche nach dem Problem bin ich auf diese offizielle Anleitung gestoßen wo es auch genau so beschrieben ist.
Da die Anleitung aber aus dem Jahr 2008 ist und ich am 17.01.2012 noch eingeloggt war denke ich das es was mit den Updates dieses Jahr zu tun hat.

Ich schätze das die Mounts nicht mehr stimmen da sich hier etwas geändert hat dieses Jahr.
Weiß jemand was hier das Problem sein könnte?

Leider bekomme ich auch keine Fehlermeldungen sondern der Promt lässt einfach auf sich warten und ich muss mit Ctrl + C abbrechen.


Last edited by nanos on Wed Dec 05, 2012 9:37 am; edited 1 time in total
Back to top
View user's profile Send private message
Randy Andy
Veteran
Veteran


Joined: 19 Jun 2007
Posts: 1148
Location: /dev/koelsch

PostPosted: Tue Dec 04, 2012 5:07 pm    Post subject: Reply with quote

Hi nanos.

Zeig uns doch mal nach dem gescheitertem chroot deine Ausgabe von mount.

Mir geistert da noch was durch den Hinterkopf mit einem update von openrc, das es erforderlich machte im kernel nun folgende Optionen zu setzten:

Code:

Search Results ────────────────────────────────────────────────────────────────────────┐                   │
 │                  │                                                                                          │                   │
 │                  │ Symbol: DEVTMPFS [=y]                                                                    │                   │
 │                  │ Type  : boolean                                                                          │                   │
 │                  │ Prompt: Maintain a devtmpfs filesystem to mount at /dev                                  │                   │
 │                  │   Defined at drivers/base/Kconfig:24                                                     │                   │
 │                  │   Depends on: HOTPLUG [=y]                                                               │                   │
 │                  │   Location:                                                                              │                   │
 │                  │     -> Device Drivers                                                                    │                   │
 │                  │       -> Generic Driver Options                                                          │                   │
 │                  │                                                                                          │                   │
 │                  │                                                                                          │                   │
 │                  │ Symbol: DEVTMPFS_MOUNT [=y]                                                              │                   │
 │                  │ Type  : boolean                                                                          │                   │
 │                  │ Prompt: Automount devtmpfs at /dev, after the kernel mounted the rootfs                  │                   │
 │                  │   Defined at drivers/base/Kconfig:44                                                     │                   │
 │                  │   Depends on: DEVTMPFS [=y]                                                              │                   │
 │                  │   Location:                                                                              │                   │
 │                  │     -> Device Drivers                                                                    │                   │
 │                  │       -> Generic Driver Options                                                          │                   │
 │                  │         -> Maintain a devtmpfs filesystem to mount at /dev (DEVTMPFS [=y])               │                   │
 │                  │



Vermute was in dieser Richtung, vorausgesetzt du hast sonst alle Vorbedingungen vor dem chroot eingehalten, so wie in deiner verlinkten Doku, nach der es bei mir immer noch funktioniert.

Andy.
_________________
If you want to see a Distro done right, compile it yourself!
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3920
Location: Hamburg

PostPosted: Tue Dec 04, 2012 6:29 pm    Post subject: Reply with quote

Code:
enable CONFIG_DEVTMPFS_MOUNT
ist Bestandteil des channel topics vom IRC #gentoo ;-)
Back to top
View user's profile Send private message
nanos
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2006
Posts: 78

PostPosted: Wed Dec 05, 2012 7:34 am    Post subject: Reply with quote

Ich habe das gleich mal ausprobiert, den kernel neu gebaut und neu gestartet.
Leider funktioniert es noch immer nicht.

Hier die Ausgabe von mount:
Code:

rootfs on / type rootfs (rw)
/dev/root on / type ext4 (rw,noatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=3024916k,nr_inodes=756229,mode=755)
proc on /proc type proc (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
cgroup_root on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755)
openrc on /sys/fs/cgroup/openrc type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc)
cpuset on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cpu on /sys/fs/cgroup/cpu type cgroup (rw,nosuid,nodev,noexec,relatime,cpu)
cpuacct on /sys/fs/cgroup/cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct)
freezer on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda1 on /boot type ext2 (rw,noatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/dev on /mnt/gentoo32/dev type none (rw,bind)
/dev/pts on /mnt/gentoo32/dev/pts type none (rw,bind)
/dev/shm on /mnt/gentoo32/dev/shm type none (rw,bind)
/proc on /mnt/gentoo32/proc type none (rw,bind)
/sys on /mnt/gentoo32/sys type none (rw,bind)
Back to top
View user's profile Send private message
bell
Guru
Guru


Joined: 27 Nov 2007
Posts: 508

PostPosted: Wed Dec 05, 2012 7:43 am    Post subject: Reply with quote

Quote:
/dev/pts on /mnt/gentoo32/dev/pts type none (rw,bind)
/proc on /mnt/gentoo32/proc type none (rw,bind)
/sys on /mnt/gentoo32/sys type none (rw,bind)
Normalerweise mounted man diese Verzeichnisse nicht als "bind" sondern normal neu. Also

Code:
mount -t proc none /mnt/gentoo32/proc
mount -t sysfs none /mnt/gentoo32/sys
mount -t devpts none /mnt/gentoo32/dev/pts
Vielleicht hilft das.
Back to top
View user's profile Send private message
nanos
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2006
Posts: 78

PostPosted: Wed Dec 05, 2012 7:57 am    Post subject: Reply with quote

Ich habe deinen Rat befolgt aber leider noch immer das selbe Ergebnis:

Code:
none on /mnt/gentoo32/proc type proc (rw)
none on /mnt/gentoo32/sys type sysfs (rw)
/dev on /mnt/gentoo32/dev type none (rw,bind)
none on /mnt/gentoo32/dev/pts type devpts (rw)
/dev/shm on /mnt/gentoo32/dev/shm type none (rw,bind)
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Wed Dec 05, 2012 8:11 am    Post subject: Reply with quote

bell wrote:
Normalerweise mounted man diese Verzeichnisse nicht als "bind" sondern normal neu.

Ich würde bei "bind" bleiben. Zumindest bzgl. devpts (oder war es /dev?) habe ich mit Neu-Mounten schlechte Erfahrungen gemacht, aber ich habe vergessen welche Probleme aufgetreten sind; das Problem hatte irgendwie damit zu tun, dass Änderungen (bei neuen Terminals, oder war es ein udev-Device? Ich hatte damals mit beidem experimentiert) nicht "richtig" durchgereicht wurden.
Back to top
View user's profile Send private message
nanos
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2006
Posts: 78

PostPosted: Wed Dec 05, 2012 8:51 am    Post subject: Reply with quote

Ich habe jetzt mal ein neues System mit folgenden Schritten angelegt:

Code:
mkdir /mnt/gentoo32
cd /mnt/gentoo32
wget http://de-mirror.org/gentoo/releases/x86/current-stage3/stage3-i686-20121016.tar.bz2
tar -xvjpf ./stage3-i686-20121016.tar.bz2
cp -L /etc/resolv.conf /mnt/gentoo32/etc/


Mit diesen Mounts:
Code:
mount --bind /dev /mnt/gentoo32/dev
mount --bind /dev/pts /mnt/gentoo32/dev/pts
mount --bind /dev/shm /mnt/gentoo32/dev/shm
mount -t proc none /mnt/gentoo32/proc
mount -t sysfs none /mnt/gentoo32/sys


und diesem Chroot:
Code:
linux32 chroot /mnt/gentoo32 /bin/bash --login


Kann das mal jemand mit einem aktuellem 64bit System nachmachen?
Back to top
View user's profile Send private message
Finswimmer
Bodhisattva
Bodhisattva


Joined: 02 Sep 2004
Posts: 5467
Location: Langen (Hessen), Germany

PostPosted: Wed Dec 05, 2012 9:18 am    Post subject: Reply with quote

Ich habe das 1:1 übernommen und raus kommt:
uname -a
Linux laptop 3.5.3 #7 SMP Thu Nov 8 18:34:02 CET 2012 i686 Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz GenuineIntel GNU/Linux

Normales System:
Linux laptop 3.5.3 #7 SMP Thu Nov 8 18:34:02 CET 2012 x86_64 Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz GenuineIntel GNU/Linux
_________________
Bitte auf Rechtschreibung, korrekte Formatierung und Höflichkeit achten!
Danke
Back to top
View user's profile Send private message
nanos
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2006
Posts: 78

PostPosted: Wed Dec 05, 2012 9:29 am    Post subject: Reply with quote

Danke fürs ausprobieren, Du verwendest nicht zufällig die Z-Shell?
Das ist nämlich der einzige Punkt dem ich diesen Fehler noch zutrauen würde.
Ansonsten ist es eine ganz normale Installation.
Back to top
View user's profile Send private message
bell
Guru
Guru


Joined: 27 Nov 2007
Posts: 508

PostPosted: Wed Dec 05, 2012 9:36 am    Post subject: Reply with quote

Ist bei Dir vielleicht IA32_EMULATION aus dem Kernel rausgefallen? Ohne diese Option kann der Kernel keine 32-Bit Anwendungen ausführen.
Back to top
View user's profile Send private message
nanos
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2006
Posts: 78

PostPosted: Wed Dec 05, 2012 9:37 am    Post subject: chroot in 32bit System funktioniert nicht mehr [solved] Reply with quote

Es ist tatsächlich die zsh, nachdem ich auf die Bash zurück gewechselt bin klappt auch der chroot wieder.
Ich werde mal sehen ob ich da noch genauere Infos dazu bekomme und gegeben falls einen Bug-Report erstellen.

Vielen Dank für Eure Hilfe.
Back to top
View user's profile Send private message
Randy Andy
Veteran
Veteran


Joined: 19 Jun 2007
Posts: 1148
Location: /dev/koelsch

PostPosted: Wed Dec 05, 2012 4:55 pm    Post subject: Reply with quote

Ahh, danke für die Rückmeldung.

Nun weiß ich auch wieder warum ich, trotz all der Annehmlichkeiten, der Z-shell entsagt habe :wink:

Gruß, Andy.
_________________
If you want to see a Distro done right, compile it yourself!
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3920
Location: Hamburg

PostPosted: Wed Dec 05, 2012 5:09 pm    Post subject: Reply with quote

nanos wrote:
Danke fürs ausprobieren, Du verwendest nicht zufällig die Z-Shell?
Wieso hat die (z-) Shell damit was zu tun ? Ist die so buggy ?
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Wed Dec 05, 2012 7:21 pm    Post subject: Reply with quote

toralf wrote:
Wieso hat die (z-) Shell damit was zu tun?

Das kann ich auch nicht nachvollziehen: Die wird bei "/bin/bash" im letzten Teil der chroot ja gar nicht gestartet.
Es könnte höchstens sein, dass Du in einem Bash-Initscript eine für Dien chroot wichtige Environment-Variable gesetzt hast, im zsh-Initscript aber nicht: Vergleiche doch einmal die Ausgaben eines umgeleiteten "env"-Befehls.
Back to top
View user's profile Send private message
nanos
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2006
Posts: 78

PostPosted: Mon Dec 10, 2012 9:16 am    Post subject: Reply with quote

Ich konnte keine nennenswerte Unterschiede der Ausgaben von env feststellen.
Hier mal ein diff der beiden Ausgaben von env:

Code:
diff bash.env zsh.env
3a4,5
> HISTFILE=/root/.history
> HISTSIZE=2000
10d11
< LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;usw. usw.
12a14
> OLDPWD=/root
17c19,20
< SHELL=/bin/bash
---
> SAVEHIST=2000
> SHELL=/bin/zsh
19,20c22,23
< SSH_CLIENT=192.168.44.225 49759 22
< SSH_CONNECTION=192.168.44.225 49759 192.168.44.20 22
---
> SSH_CLIENT=192.168.44.225 50009 22
> SSH_CONNECTION=192.168.44.225 50009 192.168.44.20 22
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) 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