Meego Wiki
Views

ARM/N900/Install/chroot

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
'''Under construction'''
'''Under construction'''
 +
== Prepare chroot directory ==
 +
=== Using tar.gz image ===
Create directory for chroot and unpack Meego image there
Create directory for chroot and unpack Meego image there
  export MEEGO_ROOT="FIXME"
  export MEEGO_ROOT="FIXME"
Line 6: Line 8:
  tar xzf <meego-image> -C $MEEGO_ROOT
  tar xzf <meego-image> -C $MEEGO_ROOT
 +
=== Using ubifs image ===
 +
Create a directory for loopback mount and mount image.
 +
export MEEGO_ROOT="/mnt/meego"
 +
mkdir $MEEGO_ROOT
 +
mount -o loop <meego-image> $MEEGO_ROOT
 +
 +
== Mount system directories ==
Mounts for chroot environment
Mounts for chroot environment
  mount -o bind /proc $MEEGO_ROOT/proc
  mount -o bind /proc $MEEGO_ROOT/proc
Line 18: Line 27:
  mount -t tmpfs tmpfs  $MEEGO_ROOT/var/run
  mount -t tmpfs tmpfs  $MEEGO_ROOT/var/run
 +
== Setup ==
Copy resolv.conf for networking
Copy resolv.conf for networking
  cp /etc/resolv.conf $MEEGO_ROOT/etc/resolv.conf
  cp /etc/resolv.conf $MEEGO_ROOT/etc/resolv.conf
 +
== Start your engines ==
Starting chroot
Starting chroot
  cd $MEEGO_ROOT
  cd $MEEGO_ROOT
  chroot . /bin/bash
  chroot . /bin/bash
 +
 +
== Cleanup ==
 +
Don't forget to unmount all the system directories that were mounted inside chroot. '''You might have to setup MEEGO_ROOT again after leaving chroot'''.
 +
 +
umount $MEEGO_ROOT/proc
 +
umount $MEEGO_ROOT/sys
 +
umount $MEEGO_ROOT/dev
 +
umount $MEEGO_ROOT/dev/pts
 +
 +
umount $MEEGO_ROOT/var/lib/dbus/
 +
umount $MEEGO_ROOT/usr/share/fonts
 +
 +
umount $MEEGO_ROOT/tmp
 +
umount $MEEGO_ROOT/var/run

Revision as of 15:49, 31 March 2010

Under construction

Contents

Prepare chroot directory

Using tar.gz image

Create directory for chroot and unpack Meego image there

export MEEGO_ROOT="FIXME"
mkdir $MEEGO_ROOT
tar xzf <meego-image> -C $MEEGO_ROOT

Using ubifs image

Create a directory for loopback mount and mount image.

export MEEGO_ROOT="/mnt/meego"
mkdir $MEEGO_ROOT
mount -o loop <meego-image> $MEEGO_ROOT

Mount system directories

Mounts for chroot environment

mount -o bind /proc $MEEGO_ROOT/proc
mount -o bind /sys  $MEEGO_ROOT/sys
mount -o bind /dev  $MEEGO_ROOT/dev
mount -o bind /dev/pts $MEEGO_ROOT/dev/pts

mount -o bind /var/lib/dbus/ $MEEGO_ROOT/var/lib/dbus/
mount -o bind /usr/share/fonts $MEEGO_ROOT/usr/share/fonts

mount -t tmpfs tmpfs  $MEEGO_ROOT/tmp
mount -t tmpfs tmpfs  $MEEGO_ROOT/var/run

Setup

Copy resolv.conf for networking

cp /etc/resolv.conf $MEEGO_ROOT/etc/resolv.conf

Start your engines

Starting chroot

cd $MEEGO_ROOT
chroot . /bin/bash

Cleanup

Don't forget to unmount all the system directories that were mounted inside chroot. You might have to setup MEEGO_ROOT again after leaving chroot.

umount $MEEGO_ROOT/proc
umount $MEEGO_ROOT/sys
umount $MEEGO_ROOT/dev
umount $MEEGO_ROOT/dev/pts

umount $MEEGO_ROOT/var/lib/dbus/
umount $MEEGO_ROOT/usr/share/fonts

umount $MEEGO_ROOT/tmp
umount $MEEGO_ROOT/var/run
Personal tools