Mailinglist Archive: opensuse-factory (818 mails)

< Previous Next >
[opensuse-factory] Strange chroot behaviour [was: zypper dup failing on kernel error]
  • From: "Carlos E. R." <robin.listas@xxxxxxxxxxxxxx>
  • Date: Thu, 30 Oct 2008 12:59:23 +0100 (CET)
  • Message-id: <alpine.LSU.2.00.0810301249400.4534@xxxxxxxxxxxxxxxx>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On Thursday, 2008-10-30 at 08:13 +0100, Josef Reidinger wrote:

OK, so now it is quite clear what happen, you have in fstab this line:
LABEL=320_boot3 /boot ext2 acl,user_xattr
1 2

but in mtab there is no line about mounted boot. So perl-Bootloader
think, that you have separate root which is not mounted.

You are right!
Then... chroot has a problem or a behaviour I didn't was aware about.


See, I have a script:


#!/bin/bash
mount /otros/test_d/
mount /otros/test_d/boot/

mount --bind /proc /otros/test_d/proc
mount --bind /sys /otros/test_d/sys
mount --bind /dev /otros/test_d/dev

cp -f /etc/resolv.conf /otros/test_d/etc/resolv.conf

echo
echo " Copy paste the next line to activate prompt change:"
echo "export PS1=$'\\[\E[1m\E[31m\\]NOT_\\h:\\w # \\[\E(B\E[m\\]'"
echo
chroot /otros/test_d/ /bin/bash --login



And verifying:

nimrodel:~ # mount | grep otros/test_d
/dev/hdd14 on /otros/test_d type reiserfs (rw,noatime,nodiratime,acl,user_xattr)
/dev/hda8 on /otros/test_d/boot type ext2 (rw,noatime,nodiratime,acl,user_xattr)
/proc on /otros/test_d/proc type none (rw,bind)
/sys on /otros/test_d/sys type none (rw,bind)
/dev on /otros/test_d/dev type none (rw,bind)


So, boot is there, mounted. However, when I chroot, it dissapears:


nimrodel:~ # chroot /otros/test_d/ /bin/bash --login
nimrodel:/ # mount
/dev/hdd14 on / type reiserfs (rw,acl,user_xattr)
/proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
securityfs on /sys/kernel/security type securityfs (rw)


What's happened? This worked before. :-?

- -- Cheers,
Carlos E. R.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkkJoZ0ACgkQtTMYHG2NR9XeuACeINMkFPeYZumPZaMnqkF1Yo8/
dG0AnAxqX8m2i6w/Frs62MfDN7bgYd8h
=tozM
-----END PGP SIGNATURE-----
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups