Difference between revisions of "UbuntuChroot"

From WebOS Internals
Jump to navigation Jump to search
(Add fstab directions)
Line 33: Line 33:
 
  mount -o loop /media/cryptofs/ubuntu.img /media/ext3fs
 
  mount -o loop /media/cryptofs/ubuntu.img /media/ext3fs
  
 +
To make this mount at boot, you need to add an entry to the fstab:
 +
 +
echo "/media/cryptofs/ubuntu.img /media/ext3fs ext3 loop 0 0" >> /etc/fstab
 +
mount -a
  
 
Now you can install Ubuntu 11.04 Chroot from Preware and it will populate the image file.
 
Now you can install Ubuntu 11.04 Chroot from Preware and it will populate the image file.

Revision as of 08:55, 26 August 2011

You need a large-enough ext3fs partition created with Meta-Doctor mounted at /media/ext3fs (instruction how to create partition is available here Chrooting). Note that the latest optware bootstrap package will also use this if it exists. If you have not already done so you should setup the ext3fs partition to mount at bootup. (Failure to do so will cause you to run out of disk space) Instructions can be found on the Meta Doctor page.

Make sure you have the WebOS Internals Testing Feeds enabled.

Using Preware, install Xecutah and Ubuntu 11.04 Chroot.

Hit the relevant buttons on Xecutah to run the XServer and the Ubuntu 11.04 Chroot.

Run XServer first, which will open an Xserver window, then return to Xecutah and tap Ubuntu 11.04 Chroot. When you return to the Xserver card, you should see a Ubuntu command prompt.

Use "apt-get install" to install whatever apps you like from Ubuntu. Then run in the Ubuntu chroot and render on the XServer.

Don't forget the donation link on the Main Page, and please install the Preware Homebrew Documentation app from the official app catalog to learn how to install Preware on your device.

NOTE ABOUT DISK IMAGES

It is possible to use a disk image instead of creating a partition. However, this comes with a few caveats, such as slower speed, disk size restriction (mounting a disk image in cryptofs may limit you to < 2GB) or breaking USB connectivity (on /media/internal). Do this at your own risk. Partitioning with Meta Doctor is the faster and slightly stabler method.

If you do not want to re-doctor your phone, this is how to do it with an image file: First, open a terminal (XServer >XTerm - everything is done on device).

1048576 (KB) means 1 GB, you can replace that (used in two commands). NOTE: You can not create an image file in /media/cryptofs larger than 2GB.

cd /media/cryptofs
dd if=/dev/zero of=ubuntu.img bs=1024 count=1048576
mkfs.ext3 -F -b 1024 ubuntu.img 1048576


mkdir /media/ext3fs


Next, you must mount the new image file.

mount -o loop /media/cryptofs/ubuntu.img /media/ext3fs

To make this mount at boot, you need to add an entry to the fstab:

echo "/media/cryptofs/ubuntu.img /media/ext3fs ext3 loop 0 0" >> /etc/fstab
mount -a

Now you can install Ubuntu 11.04 Chroot from Preware and it will populate the image file.

How to remove the ext3fs partition

Application:MetaDoctor#How_to_remove_the_ext3fs_partition