Flash Filesystem


AireTamStorm

Unix Addict
Joined
Nov 13, 2005
Messages
971
Age
38
Website
Visit site
Few ideas to pitch out there.

While flash memory has come a long way now, there should be as little writing to the internal memory as possible. Thinking of ways to keeping writes low while maintaining the ability to install stuff Unix-style, I came up with this:

Internal flash, 1 partition:
/

We add some kind of SD utility (which is basically as simple as running a shell script, launched via GUI) to format SD cards for "Pandora system use", and get them automounted at boot / insert.

Instead of
sda:
-sda1 mounted at /mnt/something

We use a model like:
sda:
-sda1, 64MB-512MB (based on SD card size or user defined), as swap
-sda2, 512MB-2GB (based on SD card size or user defined), jffs/extX mounted at /usr (UnionFS)
-sda3, remaining SD card space as general storage, at /mnt or /home or wherever.

By using UnionFS, we can still boot up and use pretty much everything from factory, but then extend that onto an SD card with additional userspace applications. This'd reduce the write ops to main memory to an absolute minimum, while allowing users to customize their units. Finally, by saving everything else onto the other parts of the SD card (configuration files, etc), you avoid further user writes other than the occasional firmware update, and keep SD-card specific application configurations on the same SD card (Ex: /usr/bin/firefox => /home/user/.mozilla).

Thoughts?

More on UnionFS:
http://en.wikipedia.org/wiki/UnionFS
 
Fine for Linux, but we need something for Windows users too. Windows can't see multiple partitions on an SD card, nor can it create multiple partitions. It also means the card can never be put into a different device, so you can't buy an 8GB card that shared between Pandora and your camera for example.

Also, windows can't see JFFS or EXTx without additional software.

I think we are pretty much stuck to a single partition, FAT32-formatted card, in order to be universal.
 
I like the idea, I would how ever want a boot loader that could more or less bypass the internal memory all together only falling back on it as a backup or if there are no SDs inserted etc.

So when you launch it with a SD inserted for the first time it scans the SD and offers to install / copy the entire system to the SD instead and adding that to the boot loader, ofc you can launch Pandora to the internal memory but this way you can try an update/installation etc before actually installing it on the internal memory and should you have a fatal Pandora error with this system you can where ever you are reboot to the internal system and reinstall/re-copy it to the SD memory and fix any problem.

Lowers the writing to the internal memory, lower the risk of total system failure due to some crash, reduces risk of Pandora being "inoperable" and makes it easy to restore the system even if you don't have any thing else but your Pandora with you also should your internal memory fail you can still use the SD to use your Pandora not having to rely on the internal memory.

EDIT:

As for people who want to switch their cards between Pandora and a Windows device etc if you could partition the first card when installing so that you can use Linux file system for the Pandora OS (that would be just 256MB big to be a copy of Pandoras internal system) etc the rest could just be mounted as any other card, also card nr2 doesn't need to be fixed this way and there for is interchangeable like any other card.
 
Aye, gonna need a better example why crippling the device so it won't boot without an sd card is a good thing.

Doubt you even need a swap space, if a device this size starts swapping out to an sd card it'd pretty much resemble death anyway.
 
Sphinxter said:
Aye, gonna need a better example why crippling the device so it won't boot without an sd card is a good thing.

Doubt you even need a swap space, if a device this size starts swapping out to an sd card it'd pretty much resemble death anyway.
You misunderstood if you meant my post, not that you need a SD card to boot it but if you have and SD card then make it possible to bypass the internal memory all together only using the SD there by making it safer in a lot of ways.

a very crude and simple chart of how it would work

Just as any dual boot more or less
 
Last edited by a moderator:
Your post was quite confusing and difficult to understand, but you can already boot from sd card, if that's what you mean. You can even put the kernel and the rootfs on the sd card if you really want to go that far.

Nobody is going to brick this baby easily :D
 
Squidge said:
Your post was quite confusing and difficult to understand, but you can already boot from sd card, if that's what you mean. You can even put the kernel and the rootfs on the sd card if you really want to go that far.

Nobody is going to brick this baby easily :D
Ah nice, in other words you can leave the internal flash untouched more or less? :)

Sounds great :)
 
Last edited by a moderator:
My initial post referred to an optional perfomance model.... an OPTIONAL feature that would perhaps render the SD card unreadable on other systems. For instance, the UI would allow you to format as single partition VFAT or allow you to do the "performance" option in which my model was allowed. It would (before the format) warn the user that doing so would render most storage unreadable on Winblows systems (theres a reason I misspelled that as you can see).

In counterargument I believe Windows will only read the 1st partition on an SD card... in which case all we need to do is warn the user that some space will be taken up for Pandora's OS and format the would-be /home partition as sda1 instead of sda3, with the UnionFS partition sda2 or sda3.

I'll test this theory tomorrow when I'm near a winblows box (I've banned the OS from my house).

While I'm /extremely/ anti-Windows I'll admit alot of the people that are buying these will have machines with it and would like access to the rest of the card. I'll try to find a couple solutions.


Edit:
As for the device not needing swap, idk. If one tries to run a window manager, (file browser, web browser, etc etc etc) you're going to see RAM usage as a potential issue, and the just-in-case swap memory would really help in that kind of scenario. Under pretty much /every other circumstance/ it would be entirely without benefit.

The speed of the SD card access depends entirely upon the card, but admittedly for most retail-bought SD cards it'd almost be faster to mount an NFS share off a box in China and use a swap file over the internet. <_<
 
AireTamStorm said:
My initial post referred to an optional perfomance model.... an OPTIONAL feature that would perhaps render the SD card unreadable on other systems. For instance, the UI would allow you to format as single partition VFAT or allow you to do the "performance" option in which my model was allowed. It would (before the format) warn the user that doing so would render most storage unreadable on Winblows systems (theres a reason I misspelled that as you can see).

In counterargument I believe Windows will only read the 1st partition on an SD card... in which case all we need to do is warn the user that some space will be taken up for Pandora's OS and format the would-be /home partition as sda1 instead of sda3, with the UnionFS partition sda2 or sda3.

I'll test this theory tomorrow when I'm near a winblows box (I've banned the OS from my house).

While I'm /extremely/ anti-Windows I'll admit alot of the people that are buying these will have machines with it and would like access to the rest of the card. I'll try to find a couple solutions.
Edit:
As for the device not needing swap, idk. If one tries to run a window manager, (file browser, web browser, etc etc etc) you're going to see RAM usage as a potential issue, and the just-in-case swap memory would really help in that kind of scenario. Under pretty much /every other circumstance/ it would be entirely without benefit.

The speed of the SD card access depends entirely upon the card, but admittedly for most retail-bought SD cards it'd almost be faster to mount an NFS share off a box in China and use a swap file over the internet. <_<



A device that size swapping may not be dead but it's sure going to feel like it.
 
Last edited by a moderator:
Sphinxter said:
A device that size swapping may not be dead but it's sure going to feel like it.
Main purpose of doing this would be to minimize writes to the internal flash by installing programs onto the SD card. I merely mentioned a (small) swap partition for good measure.

By no means should a device like this ever swap when it has so much RAM at its disposal.

Let me reiterate:
QUOTE

The speed of the SD card access depends entirely upon the card, but admittedly for most retail-bought SD cards it'd almost be faster to mount an NFS share off a box in China and use a swap file over the internet. <_<


Thats the kind of thing you just don't do, even just to show you can do it.

I'll check on the multi-part SD card thing tomorrow.
 
Last edited by a moderator:
Back
Top