Ticket #4389: 0001-Document-how-to-build-in-a-Chroot-environment.patch

File 0001-Document-how-to-build-in-a-Chroot-environment.patch, 1.5 KB (added by danielfrancis, 11 years ago)

Documentation patch

  • build.rst

    From 24c0828a85ce211c4300728afffb3290b399b3ef Mon Sep 17 00:00:00 2001
    From: Daniel Francis <francis@sugarlabs.org>
    Date: Sat, 19 Jan 2013 20:27:48 -0200
    Subject: [PATCH sugar-docs] Document how to build in a Chroot environment
    
    Signed-off-by: Daniel Francis <francis@sugarlabs.org>
    ---
     build.rst |   35 +++++++++++++++++++++++++++++++++++
     1 file changed, 35 insertions(+)
    
    diff --git a/build.rst b/build.rst
    index 7a96a8c..f6a670c 100644
    a b You can generate useful debug information with:: 
    4242
    4343    make bug-report
    4444
     45Running in a Chroot environment
     46-------------------------------
     47
     48If your distribution can't be supported by Sugar-build, you can install one
     49of the supported distributions in a disk partition and run Sugar without
     50switching between systems.
     51
     52This procedure requires `xchroot <http://www.zagura.ro/download/xchroot>`_.
     53
     54Mounting the partition::
     55
     56    MAINDEVICE=/dev/sda1
     57    HOMEDIR=/dev/sda5
     58    MOUNTPOINT=/mnt/ubuntu
     59
     60    mount $MAINDEVICE $MOUNTPOINT
     61    # Comment this line if you don't have a partition for the home directory       
     62    mount $HOMEDIR $MOUNTPOINT/home
     63
     64    cd $MOUNTPOINT
     65    mount -t proc proc proc/
     66    mount -t sysfs sys sys/
     67    mount -o bind /dev dev/
     68    mount -t devpts pts dev/pts/
     69
     70Chrooting to the environment::
     71
     72    USERNAME=sdf
     73
     74    cd $MOUNTPOINT
     75    xchroot . su $USERNAME
     76
     77Then you can follow the same way as in the supported distributions
     78to use Sugar-build.
     79
    4580Developing
    4681----------
    4782