Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: I would like to use a compact flash as a hard drive in a bartop cabinet, but...  (Read 7574 times)

0 Members and 1 Guest are viewing this topic.

jukingeo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 362
  • Last login:March 14, 2015, 08:25:28 pm
Hello All,

I have some questions that I been mulling about in my head as a result of some on-line reading in regards to using a Compact Flash as a compact solution for storing an embedded operating system on for the use in various home arcade devices (and also other projects).  

Why CF?

While I am into the speed gains when going with a form of ssd, I am also into the convenience of being able to remove the CF card and put it on my main computer to update it, or for that matter making a copy of a system to create another system using an identical motherboard.

Test bed:

My current test bed that I am using is an old Compaq Evo D51s computer in which I removed the hard drive and installed a Transcend 16gig Compact Flash card using a Syba Dual CF IDE adapter card.  The computer has a 1.8ghz Intel processor with 256meg of ram.

The OS:

Currently I have a stripped down version of Windows XP Professional loaded on to the Compact Flash card.  I stripped Windows down using nLite.   The reason why I have chosen Windows XP is that it is the most current OS that I have been working with and just about all the projects I would like to work on use Windows XP.   Also certain programs, such as the Hyperspin Front End only can work with Windows XP.   Windows XP also has full support for both USB AND Firewire in addition to the ability to use parallel and serial ports (most of my projects need some form of I/O capability for interfaces).  

I currently have Windows XP set up on the compact flash with several programs that I would use in a stand alone situation.  For the most part, the compact flash performs just as well as a hard drive.

OK, Now for the "But..."

The "BUT" lies in the fact that my OS choice of using Windows XP is a double edged sword.  In my recent readings I have found out that Windows XP is notorious for writing constantly to the hard drive.   Now for a normal mechanical hard drive, this isn't a problem as a hard drive stores data magnetically, you can read AND write data until the cows come home or until the drive fails (whichever comes first).    BUT (there is that word again), with a compact flash, this is not the case.   The act of erasing and re-writing data will eventually take its toll on the compact flash card.   I know that this is on the order of 100k to 1m writes and that would normally seem like a trivially large figure, but given the amount of r/w operations Windows XP does, those numbers could add up very quickly.

Moving forward...

Ok, so I have looked into several things that cause Windows to write to the hard drive repeatedly, such as the restore feature, the Indexing feature, the paging file (Virtual Ram or Swap File) as well as other things mentioned on this web page:

http://www.jasonn.com/turning_off_unnecessary_services_on_windows_xp

The good thing was that many items mentioned on the list were not applicable because I had not installed them via the use of nLite.

Where I stand Now...

Now after I turned off just about everything mentioned in that link that I didn't need, I disconnected the network cable and sat there watching the hard drive light to see if it would blink.   Sure enough about 30 seconds pass and the light flashes once.   The timing isn't consistent, but every now and then, the light does blink when the system is sitting idle.   So now I am wondering what else could be still running that is causing Windows to still access the drive?  Being that the light shows all drive activity, I have no way of knowing if what is happening is a read or write operation.   Now I am second guessing using Windows XP as the operating system for this project.

What are my alternatives?

Being that I am worried about ruining the compact flash, I am starting to think of alternatives.

1) Change the OS.

Alright, I CAN do this, but my choices then would be Linux, Windows 98SE, or DOS.  As far as I know Win2k (while a great OS) still shares the same hard drive accessing issues as Windows XP.

Of the three operating systems Linux would be the most compatible with modern motherboards, but most of the programs I would like to use don't run under Linux, or if they do, they run too slow.

With Windows98SE or DOS, I wouldn't have the problem with constant access to the compact flash, but then I run into the problem of getting drivers for the motherboards I would like to use.

While DOS (FreeDOS to be exact) is extremely small and is a very good candidate for compact flash use, the problem I run into with this OS is finding drivers for the on-board sound on the motherboards I would like to use.  Also with DOS I run into problems with USB support.   Only MAME and DWJukebox are two programs that can run in DOS.  The good news is that am mostly basing my projects on these two programs.

2) Another storm of the brain...

So my next bright idea which I would like to swing by everyone here is as follows:   Bouncing back to using Windows XP,  with a modern motherboard, I can load it up with 4gig (or more) of memory and have the OS load up entirely in ram.   In this case, it wouldn't matter the number of read/write cycles.   I would set up the compact flash as a read only device.

Now, can this be done?  If not then would there be a solution in using another OS?

I turn the floor over to you.

Thank You,

Geo


« Last Edit: June 17, 2011, 09:41:55 pm by jukingeo »
"Let me tell you about the time I used a sharpened clamshell to turn a T-Rex into a T-Rachel!" -Buck  Ice Age 3

nox771

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 91
  • Last login:December 14, 2011, 08:50:12 am
    • rewiredgear
First, regarding write endurance I think this comes down to whether your CF cards have wear leveling or not.  CF is commonly used as a HD replacement in embedded applications, and I think there are ones out there which do have wear leveling circuits.  If you obtain specific cards which do, and you don't fill them to max capacity (assuming dynamic not static leveling) then this is a non-issue, you could write to them full out for years (decades?) and never hit the cycle limit.

I use USB flash drives extensively at my work, and I've run full Linux installs off them for years at a time with no issue.  I think most controllers these days do dynamic leveling, but I did have one drive which did static leveling (it was unbearably slow).  Currently I have an Arch linux image I run off a USB flash drive (it is a virtualbox image inside a truecrypt container), no problems yet.  My concerns with flash, esp MLC cells, are always much more with regard to bit rot than wear leveling though.  I don't know if there are any studies of MLC flash reliability with regard to environmental factors (ie. heat), but having designed flash cells in the distant past I know leakages are a major concern (and manufacturers are reluctant to disclose mitigating circuitry, such as ECC implementations, probably due to a lack thereof - it makes it very difficult to gauge reliability).

Regardless of all this, I think the goal of having a never fail CF card is the wrong way to go about it.  For a game machine the install is essentially static (aside from maybe high scores).  Small capacity flash is cheap these days, just get a couple cards and make one an offline backup.  If you are constantly tweaking the machine just refresh the backup every 2-3 months or so.  This is actually the way I go about it myself - I put all my files inside a truecrypt container on the flash device, and every day/week/month/whatever I drag and drop the whole container to a backup HD.  Since the HD is much larger than any flash you can keep multiple timestamped images.

Your other idea is intriguing though - running it off a ramdisk.  I've never gotten around to it myself, but there is something you could try here:
http://memory.dataram.com/products-and-services/software/ramdisk

I think if you can get your image small enough to fit inside a ram disk, plus allow enough working ram for the thing to function, then that is a great idea.  I remember running a Puppy Linux live CD a long time back, and it would load itself entirely into ram, and it was blazing fast - programs would open instantly.  I've had that sort of thing on my to-do list for a long time, so if you do that I would be interested in knowing your results.

Actually this gives me another idea - if you use a ramdisk to load the OS and emulator and then add in a wireless card and a NAS, you could source the ROMs wirelessly from the NAS so you would have no capacity issue.

newmanfamilyvlogs

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1694
  • Last login:June 15, 2022, 05:20:38 pm
    • forum.arcadecontrols.com/index.php/topic,103584.msg1096585.html#msg1096585
    • Newman Family Vlogs
Why not use a proper ssd with a sata-to-ide adaptor?
http://www.newegg.com/Product/Product.aspx?Item=N82E16820139

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
With proper wear leveling, "wearing out" a large flash devices is not really a concern.  I wouldn't recommend using them as swap, though not just for reasons of flash endurance: it'll be slow as hell, too.  High end CF cards should all have decent wear leveling.  Low end ones sometimes seem to have none (!!) and sometimes even seem to lack usable block replacement (!!!!).  Get a quality card from a reputable vendor like Sandisk.  Be aware that most CF cards in TrueIDE mode aren't capable of anything near the performance of even a low end consumer SSD.


As to environmental, my understanding from my technical reps is that elevated temps are the only real concern aside from things that cause corrosion or mechanical wear such as extremely high humidity.  Elevated temps (still within spec'd operating range) will cause premature margin degradation on the flash cells.   Data retention is usually spec'd as 10 years minimum at room temp for high density, non-industrial devices.  Elevated temps might reduce this to a few years, though you'll typically see much more in most cases.  Frequent reads from a reasonably smart card will keep this from being a problem: the device will notice a mis-read, correct it with ECC, then erase/rewrite the data and entire mark the block as bad (pessimistic) or attempt to erase and test it for reuse (optimistic).

I had a talk with a TI rep regarding one of their microcontroller products with integrated flash.  They were supporting 125C operation for a client, but the usable lifetime was only about 3 HOURS!  At 85C, they spec'd 10+ years minimum.  I'm guessing the relationship is pretty steep on certain parts of the curve.


Note that keeping the card "only partially full" doesn't work unless the card and your OS/filesystem support TRIM.  I'm not sure that many CF cards support this, but some may.  Windows XP doesn't support TRIM at all.  Windows 7 should.  Newer versions of Linux should.  DOS will not at all.  Using an extremely large (much bigger than your dataset), making sure it's fresh (new or recently "secure erased"), and limiting writes may help with this, but it's a one-time deal.  Once a logical sector on the card has been written once, it never knows if it's actually logically free again unless TRIM is used.

If you must run WindowsXP, there are some tricks, but I think MS only officially supports them on the "embedded" version.  You can have it do copy-on-write to a ramdisk.  This effectively "freezes" the system partition as any changes you make exist in RAM only and go away when you reboot and everything loads back off the mass storage.  This avoids the overhead of a full ramdisk while still removing all write activity to the system partition.  There's a "thaw" command if you want to make changes and commit them.  I don't know anything about how to do this, only that it exists.  A similar trick can be done on Linux via a variety of methods, or it's possible to just run Linux with everything mounted readonly, if you're careful.

nox771

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 91
  • Last login:December 14, 2011, 08:50:12 am
    • rewiredgear
Note that keeping the card "only partially full" doesn't work unless the card and your OS/filesystem support TRIM.  I'm not sure that many CF cards support this, but some may.  Windows XP doesn't support TRIM at all.  Windows 7 should.  Newer versions of Linux should.  DOS will not at all.  Using an extremely large (much bigger than your dataset), making sure it's fresh (new or recently "secure erased"), and limiting writes may help with this, but it's a one-time deal.  Once a logical sector on the card has been written once, it never knows if it's actually logically free again unless TRIM is used.

I don't think this is exactly right.  Since flash erases in blocks, on modification normally unmodified sections would need be read prior to block erasure such that they could be combined with the new data and written to a new block, only then could the original block be erased.  TRIM is just a way to preemptively mark a section as completely ready to overwrite, it negates the overhead of reworking the whole block when you are modifying just a bit of it.  However regardless of TRIM support, erased blocks on USB flash and CF flash can be overwritten - the device will not completely fill up with deleted blocks.  I know I've worked with many flash devices running at 90% capacity with no issues.  That said, barring static wear leveling the dynamic wear leveling normally used can only operate on unused blocks, so running at that 90% capacity is a bad idea with respect to cell wear.

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
TRIM does more than just "preemptively erase" logical sectors.  It tells the device that "this data is no longer required; this logical sector can be disregarded and its backing storage returned to the dynamic wear leveling pool".  That last part is very powerful.  It ensures that the device always has 1) lots of free, already erased blocks (which makes writes faster) and 2) ensures that the wear leveling pool is as big as possible, which spreads out wear more.

Without TRIM, the device has to consider all logical sectors that have EVER been written to as "potentially in use" and copy the data around when it gets erased as part of a block erase, and use blocks to back them, even if the filesystem has no use for that data (e.g. it contained part of a file which has been deleted).

jukingeo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 362
  • Last login:March 14, 2015, 08:25:28 pm
First, regarding write endurance I think this comes down to whether your CF cards have wear leveling or not.  CF is commonly used as a HD replacement in embedded applications, and I think there are ones out there which do have wear leveling circuits. ....

Yes, I know that CF cards are used in embedded applications because I have seen it.  I work for the local Chuck E. Cheese and they have two machines made by Trio-Tech (A Canadian company that makes motion simulator rides/games).   These machines use Windows Embedded with a compact flash as the hard drive.

Now, what is meant by wear leveling?

Quote
I use USB flash drives extensively at my work, and I've run full Linux installs off them for years at a time with no issue.

I do run Linux as well and usually it is my first choice, but Linux still isn't 100% with certain applications, particularly for the work that want to do.  Thusfar, Windows XP runs the applications just about flawlessly.  BUT the problem is that that darn OS constantly wants to parse the hard drive.

As far as I know, Linux doesn't do this, but I am not 100% sure.  As it is, I am running Linux on my main machine right now, and the hdd light flashes readily 1 time each second.   Another thing that I am not sure if it 'just doing it' or if it is a read operation or a write operation.

Quote
  I think most controllers these days do dynamic leveling, but I did have one drive which did static leveling (it was unbearably slow).  Currently I have an Arch linux image I run off a USB flash drive (it is a virtualbox image inside a truecrypt container), no problems yet.  My concerns with flash, esp MLC cells, are always much more with regard to bit rot than wear leveling though.  I don't know if there are any studies of MLC flash reliability with regard to environmental factors (ie. heat), but having designed flash cells in the distant past I know leakages are a major concern (and manufacturers are reluctant to disclose mitigating circuitry, such as ECC implementations, probably due to a lack thereof - it makes it very difficult to gauge reliability).

That is interesting to know, but this is a problem that would be beyond the user control and thus backups and fail safes should be implemented.  The good thing is that the CF card is easily replaced and that is what I like about the format.

Quote
Regardless of all this, I think the goal of having a never fail CF card is the wrong way to go about it.

That isn't what I am going for, but if there is a way I can assist in the LONGEVITY of the card and I have control over that, then I am certainly going to go that route.   But as I mentioned above, if it is something that I cannot control, then it is time to revert to a backup.

Quote
  For a game machine the install is essentially static (aside from maybe high scores).  Small capacity flash is cheap these days, just get a couple cards and make one an offline backup.  If you are constantly tweaking the machine just refresh the backup every 2-3 months or so.  This is actually the way I go about it myself - I put all my files inside a truecrypt container on the flash device, and every day/week/month/whatever I drag and drop the whole container to a backup HD.  Since the HD is much larger than any flash you can keep multiple timestamped images.

Sounds like a good plan, and yeah, that is what I would probably do.  I can keep everything stored on my main machine which has two 500gig drives on it.  I have a CF card reader on my printer and I can do dumps to a card from there.

Quote
Your other idea is intriguing though - running it off a ramdisk.  I've never gotten around to it myself, but there is something you could try here:
http://memory.dataram.com/products-and-services/software/ramdisk

I will check that out later, but after I made my post last night, I did do some research and it seems that running Windows XP totally from ram alone is a difficult proposition to say the least.  So the jury is still out on this one.  Linux however CAN be run totally from a ram drive.   Most Linux distributions can run a Live CD and does so by running the OS in ram (at least partially).   There is at least one distribution called "Puppy Linux" that is extremely fast once loaded on (via a Live CD) because it is so small it runs ENTIRELY from within ram.

The caveat is that Puppy Linux is Slackware based and as such the repositories are not very endowed.  I have had trouble with getting Mame to work correctly, but it does support Wine and I have managed to get some Windows based programs to run, but not the ones I need for my embedded projects.   Still the door is open with this OS as I have not completed my testing on it.   But for Ubuntu...nope.  I don't think it will work.

Quote
I think if you can get your image small enough to fit inside a ram disk, plus allow enough working ram for the thing to function, then that is a great idea.  I remember running a Puppy Linux live CD a long time back, and it would load itself entirely into ram, and it was blazing fast - programs would open instantly.  I've had that sort of thing on my to-do list for a long time, so if you do that I would be interested in knowing your results.

LOL!  This is what I get when I read and respond. 

Quote
Actually this gives me another idea - if you use a ramdisk to load the OS and emulator and then add in a wireless card and a NAS, you could source the ROMs wirelessly from the NAS so you would have no capacity issue.

For MAME, naw...I only have about 400 roms and most of them are classic games.  However, that idea does have merit for the jukebox program since I can keep all the songs in one place and the jukebox can parse a NAS unit that has many music titles on it.   Since music takes up quite a bit more space than a MAME rom, it would be best to have all my music on a NAS with a standard hard drive.   So yeah, then that is a good idea.

Why not use a proper ssd with a sata-to-ide adaptor?

Because that is expensive and an ssd cannot be easily removed and attached to my main computer as a compact flash card can.

With proper wear leveling, "wearing out" a large flash devices is not really a concern.  I wouldn't recommend using them as swap,

Point noted.  My computer is recognizing the Syba adapter as a removable drive and as such the feature of having a swap file is grayed out anyway.  So the swap file is 'off'.   Even with as low a ram as I have on my test machine, I didn't notice any problems (thusfar).

Quote
If you must run WindowsXP, there are some tricks, but I think MS only officially supports them on the "embedded" version.

Yeah, last night I was reading up on something called an Enhanced Write Filter.  This is something that is included with the embedded version of XP.  However, it is also something that can be added to Windows XP Professional too.

I do not have any details yet as I found this info late last night.

Quote
  You can have it do copy-on-write to a ramdisk.  This effectively "freezes" the system partition as any changes you make exist in RAM only and go away when you reboot and everything loads back off the mass storage.  This avoids the overhead of a full ramdisk while still removing all write activity to the system partition.  There's a "thaw" command if you want to make changes and commit them.  I don't know anything about how to do this, only that it exists.  A similar trick can be done on Linux via a variety of methods, or it's possible to just run Linux with everything mounted readonly, if you're careful.

Wow, you did mention a mouthful here and this does look like the direction that I would like to head in.  Yes, I know that some distributions of Linux can be made Read Only.   I have Ubuntu 10.04 and with this version you must supply a password to mount drives.   Thus read/writing is automatically blocked.  You can set permissions to read only if you like.  The only thing is that I am not sure if the main OS partition could be set up this way.  With Puppy Linux, I am sure it can be done since that OS is already set up to be able to run in RAM.   A boot partition could be set up on the Compact Flash in which you can load up the OS straight into RAM.  However, I don't know how to do it.   But if it can be done with a CD-ROM, I am sure it can be done with a Compact Flash.


Now I know the rest of you have been talking about TRIM, but at this point in time my goals are to have the OS write to the compact flash as little as possible, or better yet, not at all.

So what it looks like I have to do is either find a way to get Windows XP to stop haphazardly writing to the compact flash, or I am looking at going with a different OS.   The latter would be difficult as just about all my applications use sound and finding drivers for a non-parsing OS such as Windows 98 or DOS would be difficult.   I am mostly dealing with newer style motherboards and just about all have built in sound.

I know that both MAME and DWJukebox can be set up on a DOS machine, but then I would probably have to look into a full sized motherboard that has an ISA slot on it.  An ISA slot would allow the use of a Soundblaster 16 and I would be set there.   Surprisingly this would solve the bulk of my problems, but not all.  There are just some programs that I have that need to run on Windows.  OR I could use Wine if I could get the darn com ports to work!

Thanx for the info guys and keep the suggestions coming.

Geo

"Let me tell you about the time I used a sharpened clamshell to turn a T-Rex into a T-Rachel!" -Buck  Ice Age 3

ark_ader

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5645
  • Last login:March 02, 2019, 07:35:34 pm
  • I glow in the dark.
Puppy Arcade is your ticket , but if I remember you was already was looking for a similar result and I did mention it, but you didn't like the front end.

That saying, Puppy can install from CF like a HDD you just have to get a cheap USB adapter.  I used to use the CF cards on the OLD Thinkpad 365x laptops as they can boot from CF.

Puppy runs in RAM (256mb) then you have your roms. 

Are we talking one game?  If so you can use DOS.  If you have DOS and want to use USB check out PLOP.  Lots of goodies in there.  ;)

If you want XP, look at getting Bart's PE and that should sort your rewrite problem.  Earlier CF cards had the issues, but newer ones are not that bad.  Actually I have MicroXP running on a CF card without swap and the registry hacks that do not prefetch data off the HDD/CF, it runs in RAM.  It is on a crap laptop but it works.

Why be cheap, just buy a 2.5 HDD.  Easy.
If I had only one wish, it would be for three more wishes.

jukingeo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 362
  • Last login:March 14, 2015, 08:25:28 pm
Puppy Arcade is your ticket , but if I remember you was already was looking for a similar result and I did mention it, but you didn't like the front end.

That is correct.  I did try it out, but I had problems with it.  It ran extremely slow and the frond end seemed more like a 'home' quality cluster of emulators.  I was looking for something more 'arcade' quality...something like Mala or Hyperspin.  Puppy Arcade looked too "Windows" based if you know what I mean.

I did end up going back to SDLMame and Wahcade for Linux.  I got the speed problem fixed, but the sound is on the choppy side and it is an issue with SDLMame.   I also ran into a similar sound issue with DWJukebox.  I have to run this in Wine and for the most part it works, but the audio has quite a bit of noise and hiss in it.

Quote
That saying, Puppy can install from CF like a HDD you just have to get a cheap USB adapter.  I used to use the CF cards on the OLD Thinkpad 365x laptops as they can boot from CF.

I actually have one better.  I have a Syba IDE to CF adapter, which takes USB out of the picture totally.

Quote
Puppy runs in RAM (256mb) then you have your roms.

I probably have to get more ram for my test machine as I am right at that point.

Quote
Are we talking one game?  If so you can use DOS.  If you have DOS and want to use USB check out PLOP.  Lots of goodies in there.  ;)

No, I would like to run multiple games.  With DOS I can use Arcade OS as a front end as I believe I still have it hanging around.   My issue with DOS is getting the sound to work.  Modern motherboards do not have DOS drivers and that is a problem.  As I said earlier, if I could find some motherboards (preferably newer) that have at least one ISA slot on it, then I could use an old Soundblaster 16 card and that would be supported by DOS.  If that were the case then I could use MAME and DW jukebox with DOS.  DOS loads up into memory and there really isn't write backs to the hard drive.  Also given that it is such a small OS, it does make it a high candidate for a CF based system.

Quote
If you want XP, look at getting Bart's PE and that should sort your rewrite problem.  Earlier CF cards had the issues, but newer ones are not that bad.  Actually I have MicroXP running on a CF card without swap and the registry hacks that do not prefetch data off the HDD/CF, it runs in RAM.  It is on a crap laptop but it works.

What is MicroXP?

I just started to read about Bart's PE as I found out about it last night.  As such, I have not delved too deep into it currently.  

Quote
Why be cheap, just buy a 2.5 HDD.  Easy.

For a couple projects in which I need Windows XP with a swap file I have no choice but to go that route...but the main reason I want to go with Compact Flash is that I can set up a 'system' that could be easily duplicated on my main computer and then just pop it into the next build I am going to work on.  Also making updates is very easy as I can pull the Compact Flash card out easily and pop it on my main computer.   It is a little harder to do that with a regular HDD.

Thanx,

Geo
« Last Edit: June 18, 2011, 07:34:01 pm by jukingeo »
"Let me tell you about the time I used a sharpened clamshell to turn a T-Rex into a T-Rachel!" -Buck  Ice Age 3

leapinlew

  • Some questionable things going on in this room with cheetos
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7919
  • Last login:July 27, 2025, 11:06:50 am
For a couple projects in which I need Windows XP with a swap file I have no choice but to go that route...but the main reason I want to go with Compact Flash is that I can set up a 'system' that could be easily duplicated on my main computer and then just pop it into the next build I am going to work on.  Also making updates is very easy as I can pull the Compact Flash card out easily and pop it on my main computer.   It is a little harder to do that with a regular HDD.

Thanx,

Geo

There are tons of ways you can easily duplicate a system, and how much more difficult would it be to pull a 2.5" HD and mount to an external 2.5" to USB adapter on a computer? Sure it'll be faster to do CF, but we are talking mere seconds.

I like the project, I think it sounds like a fun education project, but it's hard to come up with a practical reason to do it.

jukingeo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 362
  • Last login:March 14, 2015, 08:25:28 pm

There are tons of ways you can easily duplicate a system, and how much more difficult would it be to pull a 2.5" HD and mount to an external 2.5" to USB adapter on a computer? Sure it'll be faster to do CF, but we are talking mere seconds.

I like the project, I think it sounds like a fun education project, but it's hard to come up with a practical reason to do it.

Yeah, I guess you go the external USB route, I will certainly keep that in mind for those projects that absolutely need Windows XP.   But I do feel that I set up mostly MAME and DWJukebox systems the most, and I really needed an easy (and fast) way to get a nice COMPACT system together.   For the most part the Compact Flash card does cover all those grounds.   The only thing that I initially didn't take into consideration was how much Windows XP haphazardly writes to the hard drive AND that it is a bad thing for flash memory.

Another thing is that I already have a card reader in place via my USB printer.  So my main machine is already set to go.

This is also something I just didn't do before and when I saw how many games at my job were using a compact flash to load up the operating system from, it did grab my attention that something so small is just the key that I am looking for.

With going with Windows XP, there is another alternative that I am currently looking into and that is using a program called Enhanced Write Filter (EWF).  Supposedly Microsoft includes this with Windows Embedded.   The program supposed to give you more control over how Windows XP writes to the hard drive.  Now, since Windows Embedded is based off of Windows Professional, it most certainly can use EWF.  So I thought of tracking it down and trying it out.  I am keeping my fingers crossed with this one.   I am hoping that it is easy to set up.

At work I do have several machines that use a Compact Flash card with Windows XP Embedded and these are machines that are pounded on day in, day out by kids.  So if a Compact Flash based system can last in that environment, then it is good enough for me.

So we will see what happens if I can use EWF.  I guess my goal is that if I can sit there and watch the hdd light and it doesn't light up for an appreciable amount of time, then I just might be OK with my 'doctored' version of Windows XP.  That WOULD solve all my problems...well almost all.

Geo

"Let me tell you about the time I used a sharpened clamshell to turn a T-Rex into a T-Rachel!" -Buck  Ice Age 3

jukingeo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 362
  • Last login:March 14, 2015, 08:25:28 pm
EDIT:

Hello All,

Ok so I have some interesting news.  I figured before I decide to remove Windows XP from the compact flash, I decided to try out one more thing and that is EWF (Enhanced Write Filter).  This is the thing I mentioned earlier that normally comes with Windows XP Embedded and it allows you to filter all writes to the hard drive.  It doesn't come with Windows XP Home or Professional, BUT from what I gathered, if you have the right files (which you can get from a Windows Embedded service pack upgrade, you can add it to a standard Windows XP installation.

Basically this is like having a "read only" setting for the main C: drive.  It's main function was developed for embedded applications mainly to prevent someone from mucking about with system critical information and rendering a device useless.  How it works is that all system settings that were altered during a session are stored in RAM.  When you turn the computer off, instead of it saving it to the hard drive, it discards all the settings.  Thus if someone screws the system up, all you have to do is reboot.   Now taking this another way, as in my case.  I want to use the feature to prevent unnecessary writing to the compact flash.  

Here is the website where I received the instructions for doing this:

http://www.alix-box.info/wiki/index.php/Installation_of_EWF_drivers_for_Windows_XP

Of course once installed and turned on, you can turn it off too if you would like to if you need to make changes.

Ok, so now I am testing this out.  After turning EWF on, I  created a few folders and changed a few settings haphazardly.  I then rebooted the machine.   The first 'good' sign that it was working was that I didn't get the "saving settings" screen you normally see on shut down.  In addition, the computer pretty much shut down right away.  Upon reboot, none of the settings were saved.  GOOD!  Passed the first test as I know it is working.

For the next test, I disconnected the network cable and sat there once again watching the hard drive light.  It DOES still light up on occasion, but I have to sit for about 3 - 5 mins before I see something, WAY longer than before.  At first I found this disconcerting after I turned everything off, but then again it could be a READ function in that I am seeing the light flash. Now what I would like to see is IF there is any write activity going on by using some kind of utility program.  Then I would know for sure what is going on.  Would anyone know of such a program?

At this point it does look very promising that I might have accomplished my goal with using Windows XP with EWF.  We will have to see.


Puppy Arcade is your ticket , but if I remember you was already was looking for a similar result and I did mention it, but you didn't like the front end.

I was just reading about Groovy Arcade...how is that OS?

I read that it is Linux based, but I can't find any screen shots of it.

Any opinions?
« Last Edit: June 18, 2011, 11:18:10 pm by jukingeo »
"Let me tell you about the time I used a sharpened clamshell to turn a T-Rex into a T-Rachel!" -Buck  Ice Age 3

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Basically this is like having a "read only" setting for the main C: drive.  It's main function was developed for embedded applications mainly to prevent someone from mucking about with system critical information and rendering a device useless.  How it works is that all system settings that were altered during a session are stored in RAM.  When you turn the computer off, instead of it saving it to the hard drive, it discards all the settings.  Thus if someone screws the system up, all you have to do is reboot.   Now taking this another way, as in my case.  I want to use the feature to prevent unnecessary writing to the compact flash.  

This is the copy-on-write behavior I was talking about.  It should redirect ALL writes to RAM.  The system partition is effectively read-only.

FYI, you can do this on Linux using UnionFS.  It's how most LiveCDs work.  With some (a lot, if you want a reasonably normal feeling system) of work, you can actually make the entire system read-only, but it's probably not worth it in an application such as this given the ability to do COW.
« Last Edit: June 19, 2011, 03:13:50 am by MonMotha »

jukingeo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 362
  • Last login:March 14, 2015, 08:25:28 pm
Basically this is like having a "read only" setting for the main C: drive.  It's main function was developed for embedded applications mainly to prevent someone from mucking about with system critical information and rendering a device useless.  How it works is that all system settings that were altered during a session are stored in RAM.  When you turn the computer off, instead of it saving it to the hard drive, it discards all the settings.  Thus if someone screws the system up, all you have to do is reboot.   Now taking this another way, as in my case.  I want to use the feature to prevent unnecessary writing to the compact flash.  

This is the copy-on-write behavior I was talking about.  It should redirect ALL writes to RAM.  The system partition is effectively read-only.

So then this SHOULD do as I intended, huh?   Heh heh.  I figured there was a way to skin the cat for Windows XP since I KNOW that Windows Embedded is in use on various machines where I work that use Compact Flash as the only drive.

Since the Compact Flash is read as a removable drive, I had noticed several features such as the paging file (Virtual Memory) was already turned off.   I don't know how this will affect the programs I am using in the long term, but my initial tests seem to be fine.

Quote
FYI, you can do this on Linux using UnionFS.  It's how most LiveCDs work.  With some (a lot, if you want a reasonably normal feeling system) of work, you can actually make the entire system read-only, but it's probably not worth it in an application such as this given the ability to do COW.

I have seen a program that actually installs a Live CD iso image to a USB memory stick and you can boot from that.  I would stand the reasoning should exist that you can boot this same iso image off of a Compact Flash card.  The only thing though, is that you would have a very slow boot up and you would require user interaction (keyboard settings, time settings, Xorg settings) EVERY time you boot up...unless of course you have another drive USB or FLASH to store the system settings on.

I don't know how Union FS works, but yeah, having someway of making changes and then turning some kind of filter on (like EWF) so that once the settings are made, the filter will prevent writing to the main OS drive.

Like I said above, just about all of my programs are read only.   Mame just reads roms and DWjukebox just reads music files, so once set up, they could be put on a read only drive.

Now I understand that it will only be a matter of time before even Windows XP will no longer be supported by new motherboards.   So then I probably would have to turn to Linux.   So my testing will continue there.

In the recent past, I have tried to run both MAME and DWjukebox in Linux and those attempts have failed.   In Linux I have SDLMame and that runs with quite a bit of noise (crackles and pops) from the sound device.   DWJukebox doesn't have a Linux variant, so I tried it running Wine.   Under Wine the output has a tremendous amount of hiss in it.  The issue here is with Wine as I did these tests on a modern Intel i5 machine.

I still have hope though for a Linux version of my project as both Mame and DWJukebox do have DOS variants. The issue here is that it is nearly impossible to run DOS WITH sound on a modern ITX motherboard.   The only way around this is running DOS through an emulator such as DOSbox.  Now using an operating system PLUS an emulator is sure going to take up more space on the CF card, so this requires something special of a small OS.   I once again am going to fall on Puppy Linux for this task.

So we will see what comes of that.

As of now, the Windows XP with EWF sure looks like it is a good way to go.   The thing is that I want to install some kind of HDD monitor that will show disk activity in SEPARATE form...meaning differentiating the reads from writes. 

I did try a couple programs last night before I went to bed, BUT they didn't work because they were designed to monitor a PHYSICAL LOCAL hard drive.  Since the compact flash card is seen as removable, it isn't monitored by these programs.   So I need a program that will also monitor removable media.

That is where I am now.

Thanx,

Geo
"Let me tell you about the time I used a sharpened clamshell to turn a T-Rex into a T-Rachel!" -Buck  Ice Age 3

milkit

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 238
  • Last login:June 28, 2014, 09:14:33 pm
i could be wrong.. but lots of games will run like crap on a slow cf card.. hyperspin probably wouldn run right either.. chd games no chance

jukingeo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 362
  • Last login:March 14, 2015, 08:25:28 pm
i could be wrong.. but lots of games will run like crap on a slow cf card.. hyperspin probably wouldn run right either.. chd games no chance

Well, my take on it that I am mostly into 80's and early 90's arcade games.  Most of these games loaded rom information into ram and I believe with MAME that wouldn't be any different.  However, on newer games that used a HDD and would need to 'load' into ram, then yes, you would have a point there.   I am right now in preliminary testing to see if this can be done.   If I am successful, I always could buy a much more expensive, albeit faster flash card.  Right now I don't want to end up blowing an expensive card due to a mistake I made in setting it up.

Now I don't know what you mean by chd games, but I know that I wouldn't get far with Hyperspin on this type of setup.  Then again, I don't need to go crazy on a bartop setup and Mala would be fine for that.   When the day comes that I build a full size cabinet, then I would stick with a standard hard drive, a full installation of Windows XP professional and THEN I will use Hyperspin as the front end.    Right now space is very limited under my current constrained living conditions...those conditions will exist for quite a while and as such right now I am interested in building small bartop style cabinets.

Thank you,

Geo
"Let me tell you about the time I used a sharpened clamshell to turn a T-Rex into a T-Rachel!" -Buck  Ice Age 3

newmanfamilyvlogs

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1694
  • Last login:June 15, 2022, 05:20:38 pm
    • forum.arcadecontrols.com/index.php/topic,103584.msg1096585.html#msg1096585
    • Newman Family Vlogs
Is the hassle of dealing with a CF vs a 2.5" HDD+sata->ide adaptor purely a size/space issue?

leapinlew

  • Some questionable things going on in this room with cheetos
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7919
  • Last login:July 27, 2025, 11:06:50 am
Is the hassle of dealing with a CF vs a 2.5" HDD+sata->ide adaptor purely a size/space issue?

I'm guessing it's the challenge because between Ghost (and other image software) and a SATA or IDE to USB adapter there is hardly no advantage to going with CF. Either way, if you're going to clone a system, you'll need to do a bit level copy and thats going to take some time. If CF is slower than a 2.5" SATA drive, than any time savings will be lost.

Why not us SD cards, or USB thumb drives?



newmanfamilyvlogs

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1694
  • Last login:June 15, 2022, 05:20:38 pm
    • forum.arcadecontrols.com/index.php/topic,103584.msg1096585.html#msg1096585
    • Newman Family Vlogs
I must have missed the part where needing the access the disk via usb was a concern. But I can't imagine any scenario where a modern 2.5" drive would be slower than a CF. All of the sata drives i've used a sata->ide adaptor on have maxed out the bandwidth of the ata133 bus i've hooked them too.

jukingeo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 362
  • Last login:March 14, 2015, 08:25:28 pm
Is the hassle of dealing with a CF vs a 2.5" HDD+sata->ide adaptor purely a size/space issue?

Nope, the adapter is only slightly smaller than a 2.5 hdd.  It is an inexpensive ssd thing with an easy way to make changes.

Why not us SD cards, or USB thumb drives?

It's the same thing...a flash drive, right?  I was under the impression that going the USB route would even be slower than a Compact Flash via an IDE/Sata adapter.

I must have missed the part where needing the access the disk via usb was a concern. But I can't imagine any scenario where a modern 2.5" drive would be slower than a CF. All of the sata drives i've used a sata->ide adaptor on have maxed out the bandwidth of the ata133 bus i've hooked them too.

Well, the IDE adapter cost me about $10 and the Transcend Card cost $27.   The cheapest SSD in about the same capacity and size was $132.   The cheapest 2.5 HDD I could find was a Western Digital 80gig drive for about $55.  I don't trust Western Digital so going with Seagate would be looking at $79 for a 1TB drive.

Reasons for going CF:

A) This project was aimed at a solid state hard drive project, but an actual ssd is prohibitively expensive.
B) Out of the various pen drives, SD cards, etc, Compact Flash via an IDE or SATA adapter seemed to be the fastest way to go.
C) The size / cost is obvious.  I just don't need such a damn huge 80gig+ HDD for most of my applications.  Most of projects would use less than 3 or 4 gig.  The jukebox project might require a bit more, but the 16gig card will cover that.
D) I already have everything needed to copy Compact Flash cards, as an old digital cameras I have uses them.

Bottom line, CF seems like a logical choice to experiment with.   If I had extra money to throw away, then I would have gone with an actual SSD.   But even then, I believe I still would have had to take some precautions on excessive writes (however, when it comes to actual SSD drives, I am not sure if they have the same limitations as flash memory).

Ok, that all being said...getting back on track.

Today I began further testing of my setup with the EWF turned on.  This time I put DWJukebox under the gun.

When I first set up DWJukebox, I had the EWF off due to the fact I was making changes to the program that needed to be saved.   During these tests, I had noticed that sometimes page turning animation caused a small skip in the audio output.  I figured this was expected since I only had 256meg of ram on board.  I did notice that the HDD light came on during the skip.

Now here is the kicker.  After I set it all up and turned the EWF back on the skipping on the page turning miraculously stopped.  The HDD light doesn't come on at all during song play...only when a new song is loaded into memory.

Now this finding is like WOW!  I NEVER thought I could pull this off with DWJukebox on a machine with as little memory as 256meg.

I would have to say that EWF is definitely the biggest thing I am going to take with me when this project is done.  I am going to even use it for regular HDD projects as well.

Now that I know this can be done with Windows XP...I am curious what I can do with Linux :).

Geo
"Let me tell you about the time I used a sharpened clamshell to turn a T-Rex into a T-Rachel!" -Buck  Ice Age 3

newmanfamilyvlogs

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1694
  • Last login:June 15, 2022, 05:20:38 pm
    • forum.arcadecontrols.com/index.php/topic,103584.msg1096585.html#msg1096585
    • Newman Family Vlogs
That price for the SSD sounds like quite a ripoff.. I linked to a 16gb Kingston SSD earlier for around $55. At least this would support wear leveling and be much faster than the CF.
http://www.newegg.com/Product/Product.aspx?Item=N82E16820139428

The SATA->IDE Adapter I've bought a bunch of is around $18
http://www.newegg.com/Product/Product.aspx?Item=N82E16812240012

Obviously you've already got the other hardware, so it's not a big deal, but I'm really surprised to hear that price on the SSDs. The 128gb SSDs I've been buy at work have only been running around $230


Anyway, great to hear EWF is working. (:

milkit

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 238
  • Last login:June 28, 2014, 09:14:33 pm
im confused as to why you'd need a 1tb 2.5 segate drive vs a 16gb Cf card... Why 1tb? get a smaller 2.5 drive.. you dont need 1tb! I mentioned hyperspin before bc u said you needed win xp to run it..

i really would say drop the flash card idea and get a real HD.

jukingeo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 362
  • Last login:March 14, 2015, 08:25:28 pm
That price for the SSD sounds like quite a ripoff.. I linked to a 16gb Kingston SSD earlier for around $55. At least this would support wear leveling and be much faster than the CF.
http://www.newegg.com/Product/Product.aspx?Item=N82E16820139428

Ahhh, so they DO have them smaller with a smaller price!  I was looking on Amazon, perhaps that could be the reason I came across the more expensive ones.  Now this thing with the 'wear leveling' is that automatic or do you need something special (like a program) that does it?

Quote
The SATA->IDE Adapter I've bought a bunch of is around $18
http://www.newegg.com/Product/Product.aspx?Item=N82E16812240012

Obviously you've already got the other hardware, so it's not a big deal, but I'm really surprised to hear that price on the SSDs. The 128gb SSDs I've been buy at work have only been running around $230

Yeah, that is a 128gig drive and a nice ridiculous price attached to it too.   Too expensive and I don't need it.   Basically in terms of of the OS, programs and data, I would be looking on the order of about 4gig.  That is it.  Even my jukebox library of MP3's on my main computer clocks in at about 10gig.  So a 16gig drive would be more than enough for most stand alone applications.

Quote
Anyway, great to hear EWF is working. (:

Yeah, so far it 'looks' like it is working fine.  While I am still looking for a monitor program, I was told (in several places) that there is probably no need to, with the EWF on, there should be NO write activity to the drive.   So that is good news.

But what is makes it even more cool is that it has that funny side effect in which it actually lets my Jukebox program perform BETTER on a RAM deprived machine.   I am going to have to try a larger catalog as I only have about 30 songs loaded in at the moment.

im confused as to why you'd need a 1tb 2.5 segate drive vs a 16gb Cf card... Why 1tb? get a smaller 2.5 drive.. you dont need 1tb! I mentioned hyperspin before bc u said you needed win xp to run it..

Precisely!  I DON'T need a 1t drive.  I was being sarcastic in my post.

As for Hyperspin, yeah, I was stretching the idea of running it on the 16gig Compact Flash, but I think that might be 'pushing' it too far.  It probably will not work on my Compaq Eve test bed.

However, one thing I didn't mention as of yet is that I have a couple Intel motherboards to use for my projects:

http://www.amazon.com/Intel-Dual-Core-Mini-ITX-Motherboard-BOXD525MW/dp/B0041RSC94/ref=sr_1_1?ie=UTF8&qid=1308621064&sr=8-1

These motherboards do not have a fan for the CPU.   So no fan, SSD hard drive, get it?  NO NOISE!  Thusfar I don't really have a need for an absolutely dead quiet computer, but after my tests on the Compaq with Compact Flash,  it is pretty eerie to NOT hear the rev up and whirring of the hard drive.

Quote
i really would say drop the flash card idea and get a real HD.

What would be the point of that.  Anyone can do that.  I wanted to do something 'different' this time and I had the hardware to do it.   I wanted to see what I could do on an OS level and if it was possible to still use Windows XP.

For my applications the performance exceeded my expectations with using an inexpensive flash card.

But now that I have answered that question, I am curious if I could do this with Linux too.

Like I said, it is a 'project' and I now believe it is entirely possible to have a low capacity ssd drive made from an inexpensive to moderately priced Compact Flash card and an IDE or SATA adapter.

But it is true, with that Newegg link that cotmm68030 posted, it does seem that there are moderately priced SSD's that could do the job too.   I would need to get some kind of IDE/SATA USB bay for ghosting operations though as one of the requirements of this project would be to duplicate the setup once in place.

Thanx,

Geo
"Let me tell you about the time I used a sharpened clamshell to turn a T-Rex into a T-Rachel!" -Buck  Ice Age 3

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
But now that I have answered that question, I am curious if I could do this with Linux too.

Look up aufs.  It appears to be a successor to/rewrite of unionfs.  Basically, in your initrd/initramfs, you mount the / partition read-only in an alternate location, create a ramdisk, put a filesystem on it, mount that read-write, then mount them on top of each other using aufs with the result being writable (copy-on-write), with the writable storage being backed by RAM.  That then becomes your new / partition once the system pivots out of the initrd and starts init.  You're essentially doing what EWF appears to do on Windows.  It is in fact even possible to replicate the "thaw and commit" behavior with some scripts.

https://help.ubuntu.com/community/aufsRootFileSystemOnUsbFlash may have some useful info, but it's a bit dated.
http://www.cianer.com/linux/81-read-only-root-partition-with-aufs is an article that may be more up to date.

Note that those instructions use a tmpfs rather than fixed size ramdisk with "real" filesystem for the writable filesystem.  You can do this, and there are some advantages, especially on RAM starved systems, but there are some problems that can rarely occur and are difficult to diagonose.

For extremely compact systems, which are common in embedded devices, you can sometimes just cram the entire system into the initrd/initramfs.  This has a lot of downsides, but it's pretty darned simple.  You're not going to be able to cram a standard Ubuntu build into an initrd/initramfs realistically, though.
« Last Edit: June 20, 2011, 10:41:25 pm by MonMotha »

nox771

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 91
  • Last login:December 14, 2011, 08:50:12 am
    • rewiredgear
Now this thing with the 'wear leveling' is that automatic or do you need something special (like a program) that does it?
It is automatic, I believe most modern flash devices will have some variety of it - Wear Leveling

Quote
These motherboards do not have a fan for the CPU.   So no fan, SSD hard drive, get it?  NO NOISE!  Thusfar I don't really have a need for an absolutely dead quiet computer, but after my tests on the Compaq with Compact Flash,  it is pretty eerie to NOT hear the rev up and whirring of the hard drive.
IMO that alone is a good enough reason not to want a HD.  However for those suggesting it, what is the motivation for an actual HD?  Barring CHDs or some such, running classic games is hardly an I/O intensive operation, doesn't MAME entirely load the ROM set into memory?  If so, I don't see a performance need there at all unless a flash based setup is seriously detrimental to boot times.

newmanfamilyvlogs

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1694
  • Last login:June 15, 2022, 05:20:38 pm
    • forum.arcadecontrols.com/index.php/topic,103584.msg1096585.html#msg1096585
    • Newman Family Vlogs
http://www.newegg.com/Product/Product.aspx?Item=N82E16812156034
USB 2.0 to SATA 1.8"/2.5"/3.5"/5.25"/SSD Hard Drive & CD/DVD-RW Adapter
$20

For such a small volume of data, what I would do is use this or something like it to copy the drive to an image, not unlike you might do an CD to an ISO, then copy that back onto as many disks as you want. It would also serve as a nice backup just in case.

I'll assume you're familiar with Clonezilla?
 http://clonezilla.org/


jukingeo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 362
  • Last login:March 14, 2015, 08:25:28 pm

Look up aufs.  It appears to be a successor to/rewrite of unionfs.  Basically, in your initrd/initramfs, you mount the / partition read-only in an alternate location, create a ramdisk, put a filesystem on it, mount that read-write, then mount them on top of each other using aufs with the result being writable (copy-on-write), with the writable storage being backed by RAM.  That then becomes your new / partition once the system pivots out of the initrd and starts init.  You're essentially doing what EWF appears to do on Windows.  It is in fact even possible to replicate the "thaw and commit" behavior with some scripts.

https://help.ubuntu.com/community/aufsRootFileSystemOnUsbFlash may have some useful info, but it's a bit dated.
http://www.cianer.com/linux/81-read-only-root-partition-with-aufs is an article that may be more up to date.

Note that those instructions use a tmpfs rather than fixed size ramdisk with "real" filesystem for the writable filesystem.  You can do this, and there are some advantages, especially on RAM starved systems, but there are some problems that can rarely occur and are difficult to diagonose.

For extremely compact systems, which are common in embedded devices, you can sometimes just cram the entire system into the initrd/initramfs.  This has a lot of downsides, but it's pretty darned simple.  You're not going to be able to cram a standard Ubuntu build into an initrd/initramfs realistically, though.

I took a quick look at the links you posted.  This looks pretty complicated to do and apparently there are some downsides.   I was under the impression that you could set the entire root volume as read only with just a few mouse clicks, and then set up a ram drive to allow writes to ram.   Overall it seems like EWF is WAY simpler to set up.  And you said "...it's pretty darned simple".   Hmmmm, I am not THAT much of a Linux expert.

Do you know of a simpler alternative?   I would think so since most Linux distributions can run off a Live CD.



It is automatic, I believe most modern flash devices will have some variety of it - Wear Leveling

Ahhh, that link cleared things up quite a bit more.  I can see how that could help if you do make quite a few changes to an OS or an embedded system.   However, as I mentioned earlier, most of my applications do fall into the 'read only' category and it would be best to prevent writing altogether (once I have the system set up).

As it is finding out about EWF for Windows XP was (thusfar) the single greatest piece of knowledge I garnered from this project.  When I first started this post, I was pretty much thinking I wouldn't be able to use Windows XP because of it's constant writing to the hard drive.  I knew I would certainly destroy a Compact Flash or other SSD device in a short time if I didn't get writes under control.   I did think that I would have faired better with Linux, Windows 98 or even DOS.

Quote
(no noise) IMO that alone is a good enough reason not to want a HD.  However for those suggesting it, what is the motivation for an actual HD?  Barring CHDs or some such, running classic games is hardly an I/O intensive operation, doesn't MAME entirely load the ROM set into memory?  If so, I don't see a performance need there at all unless a flash based setup is seriously detrimental to boot times.

Overall, there were just several reasons I wanted to try this project out.   Low noise is one of them, but it isn't mandatory for most of my applications, which is why I didn't bring it up initially.  Add to that, with my last new computer purchase, I can barely hear my hdd's running anymore.  In fact my entire new rig I built myself and I did take noise levels into consideration since I am using the computer for sound editing work too.   I have 4" fans in my unit that run at slower speeds rather than small noisy 3" fans.  Bottom line, low noise was not a major contributing factor...but I know it would be for some.

I think overall it is the idea that I could put together something that I have already seen in the field (I mean if a commercial game produces a unit that does it, why can't I do it for my home game units?).   And the format appeals to me because I already have the card reader on my main computer.   So duplicating should be a fairly easy process.

Now, speaking of duplicating...

http://www.newegg.com/Product/Product.aspx?Item=N82E16812156034
USB 2.0 to SATA 1.8"/2.5"/3.5"/5.25"/SSD Hard Drive & CD/DVD-RW Adapter
$20

This is exactly a perfect example of why I prefer using Compact Flash over using an external HDD duplication system.  I mean really, would you take a good look at this thing?  Look how many wires go into it.  It would be like having your own resident octopus sitting on your desktop.

Now I know what you are thinking...you can put it away right?  Well, I know the first thing that would run through my mind when I need to make a small change.  "Ok, so I have to open up the computer (or cabinet), unplug and take out the drive.  Then I have to set up the 'octopus'...make my changes and then put everything away."  I probably would put off changes until absolutely necessary.

With the compact flash, all I have to do is reach over (or in)...pull the card out and slap it into the CF reader built into my printer.  Make changes, pull it out and put it back into the game (etc) cabinet and DONE.   I just think it is more 'elegant'.

Granted, as I said before, there will be instances where I would stick with an hdd.  For example, my Vixen light controller system, I think I would stick with a hard drive.   The reason being in this case is that for a given season, I do events for both Halloween and Christmas.  The number of changes and updates I do would make turning the EWF off/on a pain.  Also I have not found a reliable way to run Vixen outside of an actual Windows system.   However, a way around this is to perhaps set up writes to another flash drive.   But I just think it would be an overall hassle and a 2.5" hdd would be best in this case.

Quote
For such a small volume of data, what I would do is use this or something like it to copy the drive to an image, not unlike you might do an CD to an ISO, then copy that back onto as many disks as you want. It would also serve as a nice backup just in case.

Ok, now you have my attention.   I believe something like this was mentioned before and I even said that in the case of Linux I KNOW that many distributions use a Live CD.   So I am assuming that once I set up a system, I can set up an ISO image on the Compact Flash card and thus have a read-only setup, correct?

Quote
I'll assume you're familiar with Clonezilla?
 http://clonezilla.org/

No I am not familiar with it, but I will read up on that Link.  I am familiar with Ghost though...familiar in terms of it's existence and use, but I haven't used it myself.

Now I have a question.  With the setup I now I have on my Compaq test bed...wouldn't I be able to simply 'copy' the entire contents of the Compact Flash to another one without any fancy programs?

EDIT:  Ok, just tried that and...it didn't work :(.  However, I wonder if having the CF card slot within my printer that could be the fault.  It seems when I was attempting to copy the contents of the CF to my main computer HD, the light on the printer kept coming up "card error"...shortly after I get an "access denied" message and the copy process shuts down.  Now mind you, I am still READING off the card and not making the actual copy.  Hmmm, that is weird.  I wonder if there is something I have do on the printer.

Thank You,

Geo
« Last Edit: June 21, 2011, 10:35:31 pm by jukingeo »
"Let me tell you about the time I used a sharpened clamshell to turn a T-Rex into a T-Rachel!" -Buck  Ice Age 3

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
I took a quick look at the links you posted.  This looks pretty complicated to do and apparently there are some downsides.   I was under the impression that you could set the entire root volume as read only with just a few mouse clicks, and then set up a ram drive to allow writes to ram.   Overall it seems like EWF is WAY simpler to set up.  And you said "...it's pretty darned simple".   Hmmmm, I am not THAT much of a Linux expert.

Do you know of a simpler alternative?   I would think so since most Linux distributions can run off a Live CD.

I wasn't aware that Microsoft had this reduced to "a few mouseclicks" on normal XP Pro installs.  All the instructions I can find either require you to extract some files from the "feature pack" or "borrow" some files from an XPe system then do some registry modifications (which can be done using a provided .reg file in many cases).  "Real" XPe systems do have a wizard of sorts to enable it, but that isn't present on XP Pro.

The procedure described in the linked can be done entirely from the Ubuntu GUI, though it may not be immediately obvious due the way it's presented.  Download the file provided, drag/drop to the location indicated, check "properties" to verify it's executable, edit the text file indicated, run the command given (from the "Run..." type dialog), bang the reboot button.  Editing of the GRUB config could actually be made unnecessary by altering the script provided, but the way it's done allows you to back the union with something other than a ramdisk e.g. another hard disk partition, which might be handy.

leapinlew

  • Some questionable things going on in this room with cheetos
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7919
  • Last login:July 27, 2025, 11:06:50 am
This is exactly a perfect example of why I prefer using Compact Flash over using an external HDD duplication system.  I mean really, would you take a good look at this thing?  Look how many wires go into it.  It would be like having your own resident octopus sitting on your desktop.

Now I know what you are thinking...you can put it away right?  Well, I know the first thing that would run through my mind when I need to make a small change.  "Ok, so I have to open up the computer (or cabinet), unplug and take out the drive.  Then I have to set up the 'octopus'...make my changes and then put everything away."  I probably would put off changes until absolutely necessary.

With the compact flash, all I have to do is reach over (or in)...pull the card out and slap it into the CF reader built into my printer.  Make changes, pull it out and put it back into the game (etc) cabinet and DONE.   I just think it is more 'elegant'.
http://www.newegg.com/Product/Product.aspx?Item=N82E16817986003&cm_re=2.5%22_HD_Bay-_-17-986-003-_-Product

There are all kinds of elegant solutions you can use. The device I linked installs in a computer and allows you to easily pop in a 2.5" HD.

Now I have a question.  With the setup I now I have on my Compaq test bed...wouldn't I be able to simply 'copy' the entire contents of the Compact Flash to another one without any fancy programs?
No, you'll need to do a bit level copy and pull the data over in it's entirety including the boot sector of the CF card. Whether you are using a CF card or a HD, you'll need to copy over single bit of data. You'll want to use a program which does this for you. What you should do is copy the data in a stored image file and burn that image to whatever.

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
(Note: not trying to be snide with my comments - though upon re-reading it, I see it may have come off that way.  I was not aware that the process for activating EWF on non-embedded versions of XP was appreciably easier than the procedure posted above on Ubuntu)

jukingeo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 362
  • Last login:March 14, 2015, 08:25:28 pm

I wasn't aware that Microsoft had this reduced to "a few mouseclicks" on normal XP Pro installs.  All the instructions I can find either require you to extract some files from the "feature pack" or "borrow" some files from an XPe system then do some registry modifications (which can be done using a provided .reg file in many cases).  "Real" XPe systems do have a wizard of sorts to enable it, but that isn't present on XP Pro.

LOL, yeah, I know mostly with Windows installs it is endless loading and rebooting.  It is one of the reasons why I would like to eventually go totally with Linux.  The installs ARE much easier.  However, in regards to EWF, I was amazed that all you needed to extract 3 or 4 files from the Windows XPe service pack 2.  The instructional website told me everything what to do.   Then there was a link to a registry update file.  After loading the files as instructed you DO have to go into the registry to temporarily change the permissions of ONE entry.  Then you do the registry update, change the permissions back and reboot.  EWF is then loaded on to the system.   Now you only can use EWF in CMD mode, but the nice thing is that if you are using a removable media, it already has the correct mode set for you.   There are a few commands you need to know to turn EWF on/off and to commit your changes to the "hard drive" when you need to make adjustments.

Considering how obtuse and lengthy some procedures are in Windows (especially when it comes to the registry), I found adding EWF quite simple.

However, in comparison to how you were explaining what to do in Linux, clearly the Linux procedure seems harder.

Quote
The procedure described in the linked can be done entirely from the Ubuntu GUI, though it may not be immediately obvious due the way it's presented.  Download the file provided, drag/drop to the location indicated, check "properties" to verify it's executable, edit the text file indicated, run the command given (from the "Run..." type dialog), bang the reboot button.  Editing of the GRUB config could actually be made unnecessary by altering the script provided, but the way it's done allows you to back the union with something other than a ramdisk e.g. another hard disk partition, which might be handy.

Yeah...I happen to be a stickler for step by step procedures.   The EWF document was really well laid out.  The document you linked to for Linux just ended up confusing me.  I just said to myself that their has to be a better way.  As it stands, I think I would rather go the .iso method instead.   I doubt I would go with a large OS installation anyway.  Thusfar it would seem that I would like to try Puppy Linux as I have used this OS in the past.  It is small enough to run entirely from RAM.

I think this will be the next thing I would like to try since I was successful with Windows XP and EWF.

In addition I think I am actually going to try to use Hyperspin with MAME on my test bed computer.  I am going to get more ram for it though.   I think I can go as high as 2 gig on that machine, so I may as well take it to the max.

Hold on...Yeah, I just looked it up, I can take that machine to 2 gig of ram.   This is a good thing because even on my test bed machine, if I am going to go with MAME I could pretty much load up the entire OS, MAME, Roms, and the front end in one shot.   Naturally you can't get much faster than that.

http://www.newegg.com/Product/Product.aspx?Item=N82E16817986003&cm_re=2.5%22_HD_Bay-_-17-986-003-_-Product

There are all kinds of elegant solutions you can use. The device I linked installs in a computer and allows you to easily pop in a 2.5" HD.

Oooo, that IS nawice!  Yeah that would be the way to go, MUCH better than the octopus sitting on your desk.   The darn shame is that all my 5.25" bays are occupied.  I only have a mini-tower on my main machine.  However, I do have TWO 3.5" floppy bays available since this is the first machine I bought that doesn't have a floppy drive.  I certainly could utilize one of those.

Now I have a question.  With the setup I now I have on my Compaq test bed...wouldn't I be able to simply 'copy' the entire contents of the Compact Flash to another one without any fancy programs?
No, you'll need to do a bit level copy and pull the data over in it's entirety including the boot sector of the CF card. Whether you are using a CF card or a HD, you'll need to copy over single bit of data. You'll want to use a program which does this for you. What you should do is copy the data in a stored image file and burn that image to whatever.
[/quote]

Ok, you piqued my interest.  So a regular copy program is 'no go' and I would have to use this Clonezilla then?  That wouldn't be a problem since I am already on Linux on my main machine.

You mentioned I could store the data into an image file and by that I assume you mean an .iso right?  I do have a program called image burn in which you can make an .iso from just about anything.  So if I pop my CF card in the reader I would then use the .iso creation program to make an image file right?  Now from there I could put the file anywhere

Now taking this to the next level with Linux...could I make an .iso with all of the main programs I would like to use...lets say Mame and DWjukebox and then put this .iso on the Compact Flash.  Now on system boot up it would load the iso into memory.  Could that be done?  Essentially that would be a nice way to get a read only set up.  I know I probably could do this with a DVD-Rom and I DO have a DVD-Rom on my test bed computer...the thing is it is very slow.  I am certain the compact flash would be much faster.   Also the DVD-Rom does negate my project attempts considering that I want to go solid state.

(Note: not trying to be snide with my comments - though upon re-reading it, I see it may have come off that way.  I was not aware that the process for activating EWF on non-embedded versions of XP was appreciably easier than the procedure posted above on Ubuntu)

No, I didn't take any offense to the remark as under normal circumstances you would be right.  Usually things are a pain when you get deep into Windows, especially when it comes to registry editing.  However this was one of the things that just seemed simpler than some of the tasks that I have under taken in Linux (namely trying to get an unsupported sound card to work in Linux).

Thanx again for the help and advice guys, this has been an interesting trip and I am learning quite a bit.

Geo
"Let me tell you about the time I used a sharpened clamshell to turn a T-Rex into a T-Rachel!" -Buck  Ice Age 3

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm

I wasn't aware that Microsoft had this reduced to "a few mouseclicks" on normal XP Pro installs.  All the instructions I can find either require you to extract some files from the "feature pack" or "borrow" some files from an XPe system then do some registry modifications (which can be done using a provided .reg file in many cases).  "Real" XPe systems do have a wizard of sorts to enable it, but that isn't present on XP Pro.

LOL, yeah, I know mostly with Windows installs it is endless loading and rebooting.  It is one of the reasons why I would like to eventually go totally with Linux.  The installs ARE much easier.  However, in regards to EWF, I was amazed that all you needed to extract 3 or 4 files from the Windows XPe service pack 2.  The instructional website told me everything what to do.   Then there was a link to a registry update file.  After loading the files as instructed you DO have to go into the registry to temporarily change the permissions of ONE entry.  Then you do the registry update, change the permissions back and reboot.  EWF is then loaded on to the system.   Now you only can use EWF in CMD mode, but the nice thing is that if you are using a removable media, it already has the correct mode set for you.   There are a few commands you need to know to turn EWF on/off and to commit your changes to the "hard drive" when you need to make adjustments.

Considering how obtuse and lengthy some procedures are in Windows (especially when it comes to the registry), I found adding EWF quite simple.

However, in comparison to how you were explaining what to do in Linux, clearly the Linux procedure seems harder.
I was essentially describing everything that happens as a result of the actions you perform in the instructions on that page.  You don't really need to know any of it if you just want to "follow these directions and it works".

Quote
Yeah...I happen to be a stickler for step by step procedures.   The EWF document was really well laid out.  The document you linked to for Linux just ended up confusing me.  I just said to myself that their has to be a better way.  As it stands, I think I would rather go the .iso method instead.   I doubt I would go with a large OS installation anyway.  Thusfar it would seem that I would like to try Puppy Linux as I have used this OS in the past.  It is small enough to run entirely from RAM.

It looks pretty step-by-step to me.  At least as much so as any of the non-XPe EWF instructions I could find, certainly.  I suspect you're just more familiar/comfortable with Windows.  Download file, copy file, check permissions, run a command, edit a file as indicated, reboot.  Done.  In fact, it sounds very much like the Windows procedure just with "the registry" replaced with "some file" (which would be typical of Windows vs. Linux).  The steps are even numbered (I'm referring to the second article).

The Windows procedure is surprisingly straightforward for what it's doing, though.  Probably because Microsoft didn't go to the trouble of complicating it in an attempt to make it "simple" :)

I'm not sure how you intend to use a stock ISO image for anything other than booting from a CD or maybe a USB flash drive... They will automatically set the EWF-like behavior up for you (since it's essentially required due to the way LiveCDs operate), but you can't really customize it to be anything other than the stock LiveCD without going to a fair bit of trouble.  I'd say installing Ubuntu then using the procedure described in the second link is likely to be easier.
« Last Edit: June 22, 2011, 11:53:15 pm by MonMotha »

jukingeo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 362
  • Last login:March 14, 2015, 08:25:28 pm
... I suspect you're just more familiar/comfortable with Windows.  Download file, copy file, check permissions, run a command, edit a file as indicated, reboot.  Done.  In fact, it sounds very much like the Windows procedure just with "the registry" replaced with "some file" (which would be typical of Windows vs. Linux).  The steps are even numbered (I'm referring to the second article).

Well, yes, I would say that being a Windows user since 3.1 back when I bought my first computer (PC that is) back in 1994.  So growing with the OS over the years I did kind of find my way around it.  But by the time XP came along, Windows was getting pretty darn 'big'.   Still to this day I haven't learned all of XP.   I think the first indication that I was started to get turned off by Microsoft, was the fact that you had to 'activate' the program with WPA.  It does kind of make me feel that even though I dropped a chunk of change on a new OS (Usually I bought the full version rather than upgrade), the program still isn't 'mine'.  I had thought of when the day would come that Microsoft would stop supporting XP and worried that should I put XP on new machines down the road, that they probably would even drop the WPA authentication.  This would essentially force one into buying a new updated OS.

The recession hit shortly after that and around 2006 I was starting to feel the squeeze on the wallet.  I know I couldn't keep dropping big bucks on the latest and greatest from Microsoft.   So I decided to finally take the plunge and see what the 'penguin' was all about.

I did find out quickly on that Linux is a bit harder to configure for certain tasks.   To this day, 5 years later, I really haven't put a major dent into learning the subtle intricacies that make Linux tick.   It really is a whole 'nother ball game.

Adding to this, I have many programs that I have for Windows that I not found suitable equivalents for in Linux.  Hence the reason why I still rely on Windows.

Quote
The Windows procedure is surprisingly straightforward for what it's doing, though.  Probably because Microsoft didn't go to the trouble of complicating it in an attempt to make it "simple" :)

I didn't think Microsoft made the write up...at least it didn't seem so considering that you had to extract those files from an .iso of an upgrade for XPe.   If Microsoft really intended regular Windows users (Home & Pro) to have access to EWF, they would have made it available on their site.  For example, if you want .net framework, it is a down-loadable package.

Quote
I'm not sure how you intend to use a stock ISO image for anything other than booting from a CD or maybe a USB flash drive... They will automatically set the EWF-like behavior up for you (since it's essentially required due to the way LiveCDs operate), but you can't really customize it to be anything other than the stock LiveCD without going to a fair bit of trouble.  I'd say installing Ubuntu then using the procedure described in the second link is likely to be easier.

I don't think I would use Ubuntu for embedded work simply because the OS is pretty big.  Lubuntu perhaps, but I think if I could do what I need in Puppy Linux, that would be the OS of choice.   I always did wonder that once I did get a set up that I liked if I could 'clone' it as an .iso so I could set it up on another machine.

While it may be difficult to set up an .iso and make changes later on, the truth is that (for the most part) everything I need for MAME and DWJukebox I already had been setting up just about the same way for a few years now.  So this very well could be all that I need.

Granted some of the larger programs I have, such as Vixen, would benefit more from a more flexible system such as what EWF offers.   But the irony of the situation is that Vixen is one of those programs I could never get to run in Linux anyway.

Thanx,

Geo
"Let me tell you about the time I used a sharpened clamshell to turn a T-Rex into a T-Rachel!" -Buck  Ice Age 3