#!/bin/sh
# A site suggests using a variable for base mount point:
export chr=/mnt/p4rootfs
mount -t btrfs -o noatime,subvol=rootfs /dev/sda4 ${chr}
mount -t btrfs -o noatime,subvol=home /dev/sda4 ${chr}/home
mount -t btrfs -o noatime,subvol=usr /dev/sda4 ${chr}/usr
mount -t btrfs -o noatime,subvol=var /dev/sda4 ${chr}/var
mount -t proc proc ${chr}/proc
mount -t sysfs sys ${chr}/sys
mount -o bind /dev ${chr}/dev
mount -t devpts pts ${chr}/dev/pts
echo "Try chroot ${chr}"
