Difference between revisions of "UbuntuChroot"
m (Added section for recommended power user utilities) |
|||
(32 intermediate revisions by 14 users not shown) | |||
Line 1: | Line 1: | ||
− | You need a large-enough ext3fs partition created with Meta-Doctor mounted at /media/ext3fs ( | + | You need a large-enough ext3fs partition created with Meta-Doctor mounted at /media/ext3fs (instructions for how to create a partition are available below). 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 [[Application:MetaDoctor#How_to_get_the_optional_ext3fs_partition_mounted_at_device_boot|Meta Doctor]] page. |
− | + | Please support the project with a [[WebOS_Internals:Site_support|Donation]], and install the Preware Homebrew Documentation app from the official app catalog to learn how to install Preware on your device. | |
− | |||
− | + | == Instructions == | |
− | |||
− | + | ===Intro: What you need to know=== | |
+ | UbuntuChroot is the raw Ubuntu terminal without the familiar GNOME graphical interface that all have come to think of Ubuntu. With this installed, you will be able to install ubuntu programs and launch them with in the terminal card. However, you can install a GUI windows manager such as LXDE which will let you use it as you would a normal computer. | ||
+ | To do this, the basic rundown will be making a new WebOS Doctor that has a separete partition of memory for Ubuntu to run with in. Then we will install it on your TouchPad and mount that partition so it will be able to be used after a reboot of the device. Lastly, we will install Xecutah, XServer, and UbuntuChroot from Preware and boot up Ubuntu on your TouchPad. | ||
+ | Both credit and Props go to WebOS Internals for making this possible and putting in all the hard work they have to make it as easy as it is. | ||
− | + | * '''Warnings: WebOS Internals takes no responsibility over what may happen to your device. If you follow these instructions it 'should' work perfectly. If you do end up messing something up you 'should' be able to just doctor the device using the stock WebOS Doctor from HP.''' | |
+ | **'''You my want to backup app data and the like using Save/Restore in Preware as you will lose all your data buy installing a WebOS Doctor. Please do so!''' | ||
+ | **'''You must remove Optware before beginning this process. Failure to do so will most likely cause you issues!''' | ||
− | + | ===Step 1: Creating a WebOS Doctor=== | |
− | + | * We will be using the Meta Doctor to create a special WebOS Doctor that will create a 2GB (or more if you wish to do so) partition in /media/ext3fs/ were Ubuntu will be. | |
+ | * Use the WebOS Internals Guide to installing and running the Meta Doctor (the link below) | ||
+ | **[[Application:MetaDoctor#Step_1:_Setting_up_Meta-Doctor Step 1: |Application:MetaDoctor - Setting up Meta-Doctor Step 1:]] | ||
+ | * Make sure you uncomment the correct setting in the Makefile to actually create the ext3fs partition. Which will be a little ways down in the file were it says "# EXT3FS_PARTITION_SIZE = 2GB". Delete that # before it to make it readable to the program and if you desire to you may change the 2GB to the size you wish to have for Ubuntu. '''BUT BE AWARE THAT THIS TAKES AWAY THE MEMORY FROM THE USB PARTITION AND ADDS IT TO UBUNTU.''' Now save the file still with no file extension. | ||
+ | *If you are using a Wifi Only TouchPad you will be using the last one which has touchpad for device and WiFi all for the carrier. | ||
+ | * Once the Meta Doctor is done, run the WebOS Doctor it created under the 'builds' folder. And setup your device. | ||
− | + | ===Alternative Step 1: Re-partitioning by hand=== | |
+ | If you do not want to run the doctor, but do want to do the right thing and give your Ubuntu a partition of its own, here's, roughly, how: [note: [[User:Habbie|Habbie]] 08:10, 17 September 2011 (UTC) writing this from memory. somebody should try it and update the details.]: | ||
+ | [[User:Midnite|Midnite]] 26 September 2011 confirmed, below works correctly. | ||
− | + | # connect with novaterm (not via quicklaunch as you can't see dialogs) | |
+ | First determine how much actual space is being used by /media/internal (not whats allocated to it) | ||
+ | #<code> df -h | grep internal</code> | ||
+ | Remember this as you will need to keep that in mind when you resize | ||
+ | Disconnect cryptofs: | ||
+ | # <code>pkill -SIGUSR1 cryptofs</code> | ||
+ | Unmount /media/internal: | ||
+ | # <code>umount /media/internal</code> | ||
+ | verify you have a clean filesystem *before* you resize it: | ||
+ | # <code>/usr/sbin/fsck.vfat /dev/mapper/store-media</code> | ||
+ | Then verify how much space /media/internal is using | ||
+ | #<code> lvscan | grep media</code> | ||
+ | For a 16GB TP you should only reduce the size by 4GB and for a 32GB TP you can safely reduce by 8GB | ||
+ | So this means if the size is 23GB on a 32GB TP your final space that you would resize to is ie: 23GB-8GB=15GB | ||
+ | # <code>resizefat /dev/mapper/store-media {size you determined it to be}G</code> - I picked 4G to leave about 9G for my Ubuntu. Decide for yourself. This operation will delete your data if you make it too small. | ||
+ | # <code>lvresize -L 4G /dev/mapper/store-media</code> | ||
+ | # now, remount /media/internal and /media/cryptofs. I decided to just reboot but you could do the remount/reboot later. rwhitby advises <code>pkill -SIGUSR2 cryptofs</code> here. | ||
+ | # <code> lvcreate -l 100%FREE -n ext3fs store </code> | ||
+ | # <code>mkfs.ext3 /dev/mapper/store-ext3fs</code> | ||
+ | # <code>mount -o remount,rw /</code> | ||
+ | # <code>echo "/dev/mapper/store-ext3fs /media/ext3fs auto noatime 0 0" >> /etc/fstab</code> | ||
+ | # check to make sure nothing already exists under mount point: <code>ls -l /media/ext3fs</code> | ||
+ | ## If above shows files/dirs under /media/ext3fs, you will need to copy it and then move it back after mounting: | ||
+ | ## <code>cd /media/ext3fs; tar -cf /tmp/ext3fs-files.tar .</code> | ||
+ | ## and then <code>rm -rf /media/ext3fs</code> | ||
+ | # <code>mkdir /media/ext3fs</code> | ||
+ | # <code>mount -o remount,ro /</code> | ||
+ | # <code>mount -a</code> or <code>reboot</code> | ||
+ | # If files existed under /media/ext3fs before mounting, recreate them with: | ||
+ | ## <code>cd /media/ext3fs ; tar xvf /tmp/ext3fs-files.tar ; rm /tmp/ext3fs-files.tar</code> | ||
− | + | Skip the next step (Step 2: Mounting the ext3fs partition) - we have already done this above in step 10. | |
− | + | ===Step 2: Mounting the ext3fs partition=== | |
+ | *Follow the intructions of the Chrooting wiki page. | ||
+ | **[[Application:MetaDoctor#How_to_get_the_optional_ext3fs_partition_mounted_at_device_boot |Application:MetaDoctor - How to get the optional ext3fs partition mounted at device boot]] | ||
− | + | ===Step 3: Installing UbuntuChroot, Xecutah, and XServer=== | |
+ | * Open up Preware and tap List Of Everything. | ||
+ | * Search for and install the following: UbuntuChroot, Xecutah, and XServer | ||
+ | * Now opened Xecutah and tap XServer and a new card will come up. | ||
+ | * Go back to Xecutah and tap UbuntuChroot. Then swipe back to the new card that came up. | ||
+ | * Now you should have the Ubuntu terminal. Done. It should have a few 'mount' commands and then the @Touchpad: | ||
− | + | ===Step 4: What's Next?=== | |
− | + | * Now to have some fun after all that work you put in! | |
− | + | * Take a look at the auto configuration script that will install and setup most of the what is in the next bullet for you in just a few steps. | |
− | + | **[http://forums.precentral.net/webos-development/295909-easy-autoconfiguration-ubuntu.html Easy Autoconfiguration for Ubuntu] | |
− | + | * Type the below and it will update the program lists. | |
− | + | <pre>apt-get update</pre> | |
+ | * Now type the following in the box to install what ever you wish! | ||
+ | <pre>/***type the below for LibreOffice | ||
+ | apt-get install LibreOffice | ||
− | + | /***type the below for the Chromium Browser | |
+ | apt-get install chromium-browser | ||
− | + | /***type the below for GIMP | |
+ | apt-get install gimp | ||
+ | |||
+ | /***type the below for Eclipse | ||
+ | apt-get install eclipse | ||
+ | |||
+ | /***type the below for LXDE | ||
+ | apt-get install lxde</pre> | ||
+ | |||
+ | ==== Power User Utilities ==== | ||
+ | As a power user, you may wish to install the following packages. | ||
+ | <pre> | ||
+ | /***Adds add-apt-repository command, for adding ppas and other alternative package sources. | ||
+ | apt-get install python-software-properties | ||
+ | </pre> | ||
+ | |||
+ | ==== Upgrading Ubuntu ==== | ||
+ | If you'll be relying on binary packages in your Ubuntu chroot, it can be beneficial to upgrade to the latest distribution. This is actually a fairly easy process, and should be familiar to anyone who has upgraded their Ubuntu servers before. | ||
+ | |||
+ | The first step is to install the "update-manager-core" package, which will handle all of the dependencies of upgrading for you. | ||
+ | <pre>apt-get install update-manager-core</pre> | ||
+ | |||
+ | Then, simply run the updater. | ||
+ | <pre>do-release-upgrade -d</pre> | ||
+ | |||
+ | Follow any instructions it gives you along the way. | ||
+ | |||
+ | == How to remove the ext3fs partition == | ||
+ | |||
+ | *[[Application:MetaDoctor#How_to_remove_the_ext3fs_partition |Application:MetaDoctor - How to remove the ext3fs partition ]] |
Latest revision as of 22:29, 20 February 2012
You need a large-enough ext3fs partition created with Meta-Doctor mounted at /media/ext3fs (instructions for how to create a partition are available below). 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.
Please support the project with a Donation, and install the Preware Homebrew Documentation app from the official app catalog to learn how to install Preware on your device.
Instructions
Intro: What you need to know
UbuntuChroot is the raw Ubuntu terminal without the familiar GNOME graphical interface that all have come to think of Ubuntu. With this installed, you will be able to install ubuntu programs and launch them with in the terminal card. However, you can install a GUI windows manager such as LXDE which will let you use it as you would a normal computer. To do this, the basic rundown will be making a new WebOS Doctor that has a separete partition of memory for Ubuntu to run with in. Then we will install it on your TouchPad and mount that partition so it will be able to be used after a reboot of the device. Lastly, we will install Xecutah, XServer, and UbuntuChroot from Preware and boot up Ubuntu on your TouchPad. Both credit and Props go to WebOS Internals for making this possible and putting in all the hard work they have to make it as easy as it is.
- Warnings: WebOS Internals takes no responsibility over what may happen to your device. If you follow these instructions it 'should' work perfectly. If you do end up messing something up you 'should' be able to just doctor the device using the stock WebOS Doctor from HP.
- You my want to backup app data and the like using Save/Restore in Preware as you will lose all your data buy installing a WebOS Doctor. Please do so!
- You must remove Optware before beginning this process. Failure to do so will most likely cause you issues!
Step 1: Creating a WebOS Doctor
- We will be using the Meta Doctor to create a special WebOS Doctor that will create a 2GB (or more if you wish to do so) partition in /media/ext3fs/ were Ubuntu will be.
- Use the WebOS Internals Guide to installing and running the Meta Doctor (the link below)
- Make sure you uncomment the correct setting in the Makefile to actually create the ext3fs partition. Which will be a little ways down in the file were it says "# EXT3FS_PARTITION_SIZE = 2GB". Delete that # before it to make it readable to the program and if you desire to you may change the 2GB to the size you wish to have for Ubuntu. BUT BE AWARE THAT THIS TAKES AWAY THE MEMORY FROM THE USB PARTITION AND ADDS IT TO UBUNTU. Now save the file still with no file extension.
- If you are using a Wifi Only TouchPad you will be using the last one which has touchpad for device and WiFi all for the carrier.
- Once the Meta Doctor is done, run the WebOS Doctor it created under the 'builds' folder. And setup your device.
Alternative Step 1: Re-partitioning by hand
If you do not want to run the doctor, but do want to do the right thing and give your Ubuntu a partition of its own, here's, roughly, how: [note: Habbie 08:10, 17 September 2011 (UTC) writing this from memory. somebody should try it and update the details.]: Midnite 26 September 2011 confirmed, below works correctly.
- connect with novaterm (not via quicklaunch as you can't see dialogs)
First determine how much actual space is being used by /media/internal (not whats allocated to it)
df -h | grep internal
Remember this as you will need to keep that in mind when you resize Disconnect cryptofs:
pkill -SIGUSR1 cryptofs
Unmount /media/internal:
umount /media/internal
verify you have a clean filesystem *before* you resize it:
/usr/sbin/fsck.vfat /dev/mapper/store-media
Then verify how much space /media/internal is using
lvscan | grep media
For a 16GB TP you should only reduce the size by 4GB and for a 32GB TP you can safely reduce by 8GB So this means if the size is 23GB on a 32GB TP your final space that you would resize to is ie: 23GB-8GB=15GB
resizefat /dev/mapper/store-media {size you determined it to be}G
- I picked 4G to leave about 9G for my Ubuntu. Decide for yourself. This operation will delete your data if you make it too small.lvresize -L 4G /dev/mapper/store-media
- now, remount /media/internal and /media/cryptofs. I decided to just reboot but you could do the remount/reboot later. rwhitby advises
pkill -SIGUSR2 cryptofs
here. lvcreate -l 100%FREE -n ext3fs store
mkfs.ext3 /dev/mapper/store-ext3fs
mount -o remount,rw /
echo "/dev/mapper/store-ext3fs /media/ext3fs auto noatime 0 0" >> /etc/fstab
- check to make sure nothing already exists under mount point:
ls -l /media/ext3fs
- If above shows files/dirs under /media/ext3fs, you will need to copy it and then move it back after mounting:
cd /media/ext3fs; tar -cf /tmp/ext3fs-files.tar .
- and then
rm -rf /media/ext3fs
mkdir /media/ext3fs
mount -o remount,ro /
mount -a
orreboot
- If files existed under /media/ext3fs before mounting, recreate them with:
cd /media/ext3fs ; tar xvf /tmp/ext3fs-files.tar ; rm /tmp/ext3fs-files.tar
Skip the next step (Step 2: Mounting the ext3fs partition) - we have already done this above in step 10.
Step 2: Mounting the ext3fs partition
- Follow the intructions of the Chrooting wiki page.
Step 3: Installing UbuntuChroot, Xecutah, and XServer
- Open up Preware and tap List Of Everything.
- Search for and install the following: UbuntuChroot, Xecutah, and XServer
- Now opened Xecutah and tap XServer and a new card will come up.
- Go back to Xecutah and tap UbuntuChroot. Then swipe back to the new card that came up.
- Now you should have the Ubuntu terminal. Done. It should have a few 'mount' commands and then the @Touchpad:
Step 4: What's Next?
- Now to have some fun after all that work you put in!
- Take a look at the auto configuration script that will install and setup most of the what is in the next bullet for you in just a few steps.
- Type the below and it will update the program lists.
apt-get update
- Now type the following in the box to install what ever you wish!
/***type the below for LibreOffice apt-get install LibreOffice /***type the below for the Chromium Browser apt-get install chromium-browser /***type the below for GIMP apt-get install gimp /***type the below for Eclipse apt-get install eclipse /***type the below for LXDE apt-get install lxde
Power User Utilities
As a power user, you may wish to install the following packages.
/***Adds add-apt-repository command, for adding ppas and other alternative package sources. apt-get install python-software-properties
Upgrading Ubuntu
If you'll be relying on binary packages in your Ubuntu chroot, it can be beneficial to upgrade to the latest distribution. This is actually a fairly easy process, and should be familiar to anyone who has upgraded their Ubuntu servers before.
The first step is to install the "update-manager-core" package, which will handle all of the dependencies of upgrading for you.
apt-get install update-manager-core
Then, simply run the updater.
do-release-upgrade -d
Follow any instructions it gives you along the way.