Home Wiki > HCL:Chroot
Sign up | Login

HCL:Chroot

tagline: From openSUSE

Chroot

openSUSE for ARM can be installed alongside your other OS on any Linux machine, be it x86 or ARM based. This way you can work with openSUSE for ARM on your x86 based workstation. Or you can run it on your Android ARM device. Please make sure to be root for the command snippets below.

First, download the latest JeOS, XFCE or E17 root file system (*armv6-rootfs* or *armv7-rootfs*) available at:

Susemini.png
Version:
Factory
http://download.opensuse.org/ports/armv7hl/factory/images/
Susemini.png
Version:
13.1
http://download.opensuse.org/ports/armv7hl/distribution/13.1/appliances/
Susemini.png
Version:
12.3
http://download.opensuse.org/ports/armv7hl/distribution/12.3/images/
  1. JeOS image for a minimal system openSUSE-*-ARM-JeOS.armv7-rootfs-*.tbz or
  2. XFCE image for a graphical system with XFCE desktop openSUSE-*-ARM-XFCE.armv7-rootfs-*.tbz or
  3. E17 image for a graphical system with E17 desktop openSUSE-*-ARM-E17.armv7-rootfs-*.tbz
# wget http://download.opensuse.org/ports/armv7hl/distribution/13.1/appliances/openSUSE-13.1-ARM-JeOS.armv7-rootfs.armv7l-1.12.1-Build32.2.tbz
# mkdir rootfs
# sudo tar xvjf *.tbz -C rootfs

If you are on x86, set up QEMU translation for ARM binaries. You can skip this if you are already on an ARM device:

# zypper in qemu-linux-user
# qemu-binfmt-conf.sh

Prepare the environment:

# mount --bind /proc rootfs/proc
# mount --bind /sys rootfs/sys
# mount --bind /dev rootfs/dev
# mount --bind /dev/pts rootfs/dev/pts
# cp /etc/resolv.conf rootfs/etc/
# chroot rootfs

You can now run commands like you would on any openSUSE installation, for example:

# zypper ref
# zypper up
# zypper in gcc make SDL-devel

Once you're done, type

# exit

and you're back in your previous filesystem.

Do-it-yourself environment

If you have your own kernel and bootloader, you can follow the steps as above, but instead extract the rootfs tbz file into a real partition on your machine (or on a partition on an SD card). When booting your own kernel, point it to that new partition

 U-Boot 2012.04.01 (Oct 14 2012 - 20:04:42)
 
 CPU:   Some CPU
 Board: Some Board
 DRAM:  n GiB
 Using default environment
 
 In:    serial
 Out:   serial
 Err:   serial
 Hit any key to stop autoboot:  0 
 U-Boot > setenv bootargs root=/dev/mmcblk0p1
 U-Boot > boot

This way you can use your own kernel and bootloader to run an openSUSE distribution!