Author Topic: Unionfs, Cramfs And Flash  (Read 3979 times)

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Unionfs, Cramfs And Flash
« on: September 21, 2005, 06:20:41 am »
For some time I've felt that the big problem with the Z and having a base OS install is that things can get messy...
There are a lot of symlinks from writable file space to the rom file system, so that all the usual files are in the usual place, but you can patch the OS with new files by replacing the symlink with a real file.

e.g. initially /etc/hosts would symlink to /mnt/rom.cramfs/etc/hosts, but you'd replace it with a real file in /etc/hosts.

As I understand it, Guylhem has done some great work making a clean 6000 ROM without all this clutter, but I don't know how he handled the issue of being able to replace files in ROM with files in regular flash?


Then I came across project-unionfs, which allows you to overlay or stack one FS on top of another, i.e. to add incremental changes. This allows the system to be very flexible because as far as the user is concerned, all the files are real files and you don't have to know where they are.

Does this make sense? How easy would it be to add this support into OE, Cacko or Guylhem's distro?

Paul
« Last Edit: September 21, 2005, 06:21:40 am by speculatrix »
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Unionfs, Cramfs And Flash
« Reply #1 on: September 21, 2005, 07:32:41 am »
Quote
As I understand it, Guylhem has done some great work making a clean 6000 ROM without all this clutter, but I don't know how he handled the issue of being able to replace files in ROM with files in regular flash?

Probably by making the 'ROM' writable (it's just flash which can be written to if it's mounted as rw) which is also how things are done with OZ.

Quote
Then I came across project-unionfs, which allows you to overlay or stack one FS on top of another, i.e. to add incremental changes. This allows the system to be very flexible because as far as the user is concerned, all the files are real files and you don't have to know where they are.

Does this make sense? How easy would it be to add this support into OE, Cacko or Guylhem's distro?

From what I remember this has been looked at but it still needs some problems ironing out when used on the Zaurus so it hasn't been implemented yet (http://www.openzaurus.org/official/unstable/3.5.3/changelog.txt).


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

koen

  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
    • http://dominion.thruhere.net/koen/cms/
Unionfs, Cramfs And Flash
« Reply #2 on: September 21, 2005, 07:38:44 am »
To erase doubt: unionfs + unionfs modules are in OE and can be built without effort
Forums are not bugtrackers!!! Smart questions
Ångström release team
iPAQ h2210, iPAQ h5550, iPAQ hx4700, Zaurus SL-C700, Nokia 770, all running some form of GPE
My blog

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Unionfs, Cramfs And Flash
« Reply #3 on: September 21, 2005, 07:51:51 am »
unionsfs is great, what you can do is mount the flash as read only and then mount another directory over the top of that as rw and redirect all writes to the second partion. allowing you to merge a ro and rw partion

it has some uses such as during beta testing, you can make changes to the filesystem and if it dosent work out you can start from scratch by deleteing everything in the second rw part automatically revealing the ro part again
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Unionfs, Cramfs And Flash
« Reply #4 on: September 21, 2005, 08:32:35 am »
I should have explained why I wanted this instead of just having the whole base install on a regular read-write flash: high file compression/optimised storage, which is not amenable to modification.

Da_Blitz also highlighted the reversibility of it too. Anyone remember WORM (write once optical media) which simply added new file and hid the old version(s)? This would be great too. Kind of file-system-wide CVS!

I think once OE 3.5.3 is mature it will be a killer base OS for the Z.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

koen

  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
    • http://dominion.thruhere.net/koen/cms/
Unionfs, Cramfs And Flash
« Reply #5 on: September 21, 2005, 12:52:28 pm »
Quote
I think once OE 3.5.3 is mature it will be a killer base OS for the Z.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=96537\"][{POST_SNAPBACK}][/a][/div]
That would be OZ 3.5.4 </knowitall>
Forums are not bugtrackers!!! Smart questions
Ångström release team
iPAQ h2210, iPAQ h5550, iPAQ hx4700, Zaurus SL-C700, Nokia 770, all running some form of GPE
My blog

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
Unionfs, Cramfs And Flash
« Reply #6 on: September 21, 2005, 01:19:00 pm »
Nah, that'd be Ã…ngström, of course  
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

koen

  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
    • http://dominion.thruhere.net/koen/cms/
Unionfs, Cramfs And Flash
« Reply #7 on: September 21, 2005, 03:09:09 pm »
Quote
Nah, that'd be Ã…ngström, of course 
[div align=\"right\"][a href=\"index.php?act=findpost&pid=96570\"][{POST_SNAPBACK}][/a][/div]

Yeah, with the OE/OZ confusion gone our ReadOnlyMemory building counterparts can finally insult the right project  
Forums are not bugtrackers!!! Smart questions
Ångström release team
iPAQ h2210, iPAQ h5550, iPAQ hx4700, Zaurus SL-C700, Nokia 770, all running some form of GPE
My blog

eviLjazz

  • Full Member
  • ***
  • Posts: 116
    • View Profile
    • http://katastrophos.net/andre/blog
Unionfs, Cramfs And Flash
« Reply #8 on: September 23, 2005, 06:25:35 am »
If anybody wants to check out unionfs and gzipfs on SharpROM, check out this thread:
https://www.oesf.org/forums/index.php?showtopic=15156

Regards,
Andre
Sharp Zaurus SL-C3200/36GB running Cacko : Fujitsu LifeBook U2010/64GB SSD running Win7 : Nokia N900 (yes, flame me.) Blog : Twitter : Trac
Quasar Media Player : QScrobbler : Enhanced audio driver and mixer for C1000/C3x00 : Unified Sharp/Tetsu/Cacko/pdaXrom Kernel 2.4.20 branch : My packages : Sources