User Tools

Site Tools


Writing /var/lib/dokuwiki/data/meta/tutorials/ubuntu_bionic_chroot.meta failed
Unable to save metadata file. Hint: disk full; file permissions; safe_mode setting.
tutorials:ubuntu_bionic_chroot

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tutorials:ubuntu_bionic_chroot [2019/04/04 20:51] – created admintutorials:ubuntu_bionic_chroot [2022/09/20 00:08] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Ubuntu 14.04 inside a Chroot ======+====== Ubuntu Bionic inside a Chroot ======
  
   * Install the base system   * Install the base system
Line 18: Line 18:
   #!/bin/bash   #!/bin/bash
   CHROOT_DIR=/var   CHROOT_DIR=/var
-  CHROOT_NAME=`basename $0 .sh` +  CHROOT_NAME=`basename $0 .sh` 
 +   
 +  xhost +local:
      
   if [ ! -e /var/run/$CHROOT_NAME ]   if [ ! -e /var/run/$CHROOT_NAME ]
Line 38: Line 40:
       sudo mount none -t devpts $CHROOT_DIR/$CHROOT_NAME/dev/pts       sudo mount none -t devpts $CHROOT_DIR/$CHROOT_NAME/dev/pts
       sudo mount -o bind / $CHROOT_DIR/$CHROOT_NAME/hostfs       sudo mount -o bind / $CHROOT_DIR/$CHROOT_NAME/hostfs
-      #sudo mount -o bind /run/shm $CHROOT_DIR/$CHROOT_NAME/run/shm+      sudo mount -o bind /dev/shm $CHROOT_DIR/$CHROOT_NAME/dev/shm
   fi   fi
      
Line 50: Line 52:
   then   then
       echo "Closing last invocation. Unmounting host system directories"       echo "Closing last invocation. Unmounting host system directories"
-      for i in dev/pts hostfs proc dev sys +      for i in dev/shm dev/pts hostfs proc dev sys 
       do       do
    sudo umount $CHROOT_DIR/$CHROOT_NAME/$i    sudo umount $CHROOT_DIR/$CHROOT_NAME/$i
Line 66: Line 68:
   * Configure schroot. Edit /etc/schroot/schroot.conf file with. Change YOUR_USER_NAME for your username:   * Configure schroot. Edit /etc/schroot/schroot.conf file with. Change YOUR_USER_NAME for your username:
  
-  [ubuntu-trusty+  [ubuntu-bionic
-  description=Ubuntu Trusty+  description=Ubuntu Bionic
   location=/var/chroot   location=/var/chroot
   priority=3   priority=3
Line 83: Line 85:
    
   * If you want to exit the chroot, you should type exit and the script should automatically do the job!   * If you want to exit the chroot, you should type exit and the script should automatically do the job!
 +
 +  * There is this error every time you log in:
 +
 +  mesg: ttyname failed: No such device
 +
 +  * To fix this error. Enter the Chroot and edit the file /root/.profile and remove the line that starts with "mesg"
 +
  
  
  
 ~~DISCUSSION~~ ~~DISCUSSION~~
tutorials/ubuntu_bionic_chroot.1554411072.txt.gz · Last modified: 2022/09/20 00:08 (external edit)