Debian

From WebOS Internals

Jump to: navigation, search

Contents

How to install Debian

Building the rootfs on host system

  1. Download this Debian image to your Linux desktop.
  2. On your Linux desktop, run as root:
bunzip2 debsmall.img.bz2
resize2fs debsmall.img 500M

This will resize your Debian image to 500MB. You choose the size, just put desired size in MB in place of 500.

You should now have a file named debsmall.img with a custom size. Get this onto /media/internal on the device. You can mount the device as a USB drive.

Using Debian

Activating Debian Rootfs:

mount -o loop /media/internal/debsmall.img /media/cf
mount --bind /dev /media/cf/dev
mount -t devpts none /media/cf/dev/pts
mount -t proc none /media/cf/proc
/usr/sbin/chroot /media/cf #Just that easy!

If you want to share your display (such as to run X11 apps) you'll need to also do:

mount -o bind /tmp /media/cf/tmp

Deactivating Debian Rootfs:

exit
umount /media/cf/dev/pts
umount /media/cf/dev
umount /media/cf/proc
umount /media/cf

Credit: Openmoko Project and Sargun


If you get an error chrooting to the Debian installation If you get an error that says "chroot: cannot execute /opt/bin/bash:" you will need to perform the following, with the image still mounted:

cd /media/cf/opt
mkdir bin
cp /media/cf/bin/bash /media/cf/opt/bin
cd /
chroot /media/cf

If you have performed the bash installation then the chroot image also expects bash to be in opt. Since the installation already has bash in /bin, all we need to do is recreate the /opt/bin and copy it. Note: Symlinks will NOT work and will produce a "Too many levels of symbolic links" error.

Personal tools
webos announcements
Sponsored Links