You are not logged in.

#26 2009-11-27 14:59:39

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Arch Linux on i586 resurrected

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

#27 2009-11-29 06:13:37

hatten
Arch Linux f@h Team Member
From: Sweden, Borlange
Registered: 2009-02-23
Posts: 736

Re: Arch Linux on i586 resurrected

In the wiki it says that i should mount /dev entries afterwards, is that incorrect and should be changed then?

Offline

#28 2009-11-29 15:55:24

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Arch Linux on i586 resurrected

@ hatten
And which way works? :-)

Offline

Board footer

Powered by FluxBB