Alt optmedia

From WebOS Internals
Jump to: navigation, search

Alternative opt media method to store Optware packages

This will crash your device and force you to have to re-doctor your device

This page describes an alternate way of using /opt to store packages.

WARNING! This mode is much more advanced and could possibly cause you a restore in the future if you don't do it properly. You have been warned!

This method requires you to shrink your /media/internal LV so that you can create a new LV in the newly created space. This deals with issues (such as mine) with loop0 and possible loop0 problems when you try and use the phone as a USB device. If for some reason Palm decides to modify the existing LVM structure (which they have explicitly confirmed with us that they want to have that capability for devices in the field), this method causes a problem and your palm would have to be "reimaged" with the webDoctor. You have been warned. Proceed at your own risk.

Summary:

What we will do:

  • resize existing /media/internal LV
  • create optmedia LV
  • put fs on optmedia LV
  • mount optmedia LV
  • copy existing data from /media/internal LV to /optmedia LV
  • umount /media/internal
  • recreate fs on /media/internal LV (causing you to lose all your data - which is why we copy it before hand)
  • mount /media/internal
  • copy data from optmedia LV to /media/internal
  • ensure it works

Procedure

This document will replace step 2 of the Setting_up_optware_feed how-to. Everything before and after is the same.

1. The first thing we want to do is resize the existing /media/internal LV

lvresize -L -1G /dev/mapper/store-media    # It will ask you to confirm - say y.

2. Now we will create the new optmedia LV

lvcreate -l 100%FREE -n optmedia store   # Should tell you it was created

3. Now we will place a file system on optmedia

 
mke2fs -t ext3 -q /dev/store/optmedia  # You should'nt get any feedback here from the Pre

4. mount the new LV

mount /dev/mapper/store-optmedia /opt

5. Copy existing data over from /media/internal to /opt

cp -a /media/internal/. /opt

6. umount /media/internal

umount /media/internal

7. Recreate the fs on /media/internal

mkdosfs -F 32 /dev/mapper/store-media  # Disregard any errors.

8. mount the /media/internal

mount /dev/mapper/store-media

9. Copy data from /opt to /media/internal

cp -a /opt/. /media/internal

10. Ensure it works:

  • Open the Photos app and see if pictures are displayed. if so, everything went according to plan.

11. Continue with the Optware installation.

The reason we recreated the /media/internal fs was because if we didn't, it could come back to haunt us later. Without recreating it, df would show the original size and the partition would think it had more space to work with than it actually did.


  • Credits:

Provided by: tictac @ #webos-internals - Halcyonandoff2 also has done this, but in a slightly different way.