# HG changeset patch # User Paul Boddie # Date 1275241631 -7200 # Node ID 790947f9014bb0938fed6103ab386289ff972dc6 # Parent 8a71e8492315be574a367c7d39afe2a01ba77ef2 Added bind mounts when user-do is run in root mode. Added some documentation about root mode. diff -r 8a71e8492315 -r 790947f9014b README.txt --- a/README.txt Sat May 29 23:51:42 2010 +0200 +++ b/README.txt Sun May 30 19:47:11 2010 +0200 @@ -203,6 +203,26 @@ apt-get update +Creating and Entering a Package Manager in Root Mode +---------------------------------------------------- + +The user-setup, user-postsetup and user-do scripts also support a --root +option which sets up a package manager for a user with root privileges. To +set up such an installation, the following commands could be used: + +sudo user-setup --root +sudo user-postsetup + +Entering the installation is done using the user-do script: + +sudo user-do --root + +Note that in root mode, the /proc and /sys filesystems are mounted within the +installation. Care must be taken not to delete the contents of these +directories within the installation while the above command is running; +otherwise, this can potentially damage the main operating system installation +on your computer. + Constructing UML Instances -------------------------- @@ -252,6 +272,7 @@ Entering or Starting UML Instances ---------------------------------- -To enter a UML instance, use the uml-do script: +To enter a UML instance, use the uml-do script, specifying an amount of memory +to allocate to the instance: -uml-do +uml-do 512M diff -r 8a71e8492315 -r 790947f9014b user-do --- a/user-do Sat May 29 23:51:42 2010 +0200 +++ b/user-do Sun May 30 19:47:11 2010 +0200 @@ -13,7 +13,11 @@ if [[ $1 == '--root' ]]; then shift 1 + mount -o bind /proc $PACKAGEROOT/proc + mount -o bind /sys $PACKAGEROOT/sys chroot $PACKAGEROOT $* + umount $PACKAGEROOT/proc + umount $PACKAGEROOT/sys else fakeroot fakechroot $FAKECHROOT_OPTIONS chroot $PACKAGEROOT $* fi