You are not logged in.
I was using this in another distro. You may want to check the wiki or ask a dev how they set up their.
#!/bin/bash
MNT_PNT="/opt"
mount -v --bind /dev $MNT_PNT/dev
mount -vt devpts devpts $MNT_PNT/dev/pts
mount -vt proc proc $MNT_PNT/proc
mount -vt sysfs sysfs $MNT_PNT/sys
chroot "$MNT_PNT" /usr/bin/env -i \
PS1='\u@\h-i386:\w\$ ' \
HOME=/root TERM="$TERM" \
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
/bin/bash --login +h
umount -v $MNT_PNT/sys
umount -v $MNT_PNT/proc
umount -v $MNT_PNT/dev/pts
umount -v $MNT_PNT/dev
#---------
CHROOT=/mnt/chroot
mount -v --bind /dev ${CHROOT}/dev
mount -vt devpts devpts ${CHROOT}/dev/pts
mount -vt proc proc ${CHROOT}/proc
mount -vt sysfs sysfs ${CHROOT}/sys
chroot "${CHROOT}" /usr/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
USER=root PATH=/bin:/usr/bin:/sbin:/usr/sbin \
/bin/bash --login +h
# the following will not execute until you exit the chroot
umount -v ${CHROOT}/sys
umount -v ${CHROOT}/proc
umount -v ${CHROOT}/dev/pts
umount -v ${CHROOT}/dev
#-------
Offline
In the wiki it says that i should mount /dev entries afterwards, is that incorrect and should be changed then?
Offline
@ hatten
And which way works? :-)
Offline