General :: Embedded Webserver (mysql) On A Compact Flash: Reduce Read / Write Operations?
Jul 7, 2011
I've developed a tiny webserver for home automation out of an ALIX 1D, and based on a debian lenny. It runs very smoothly and is now able to operate quite a lot of different equipment from a webapp. But i'm not sure how I should handle the compact flash, regarding read/write limitations. From what I've read the partitioning should be ext2, which would disallow the journalisation of the system. A utility to 'flatten' the repartition of write cycles exists, would it be relevant to use if the partition is ext2 ?
I will also disable all logging in execution mode (a debug mode will provide the logs). Is there any other parameters I have to take into account for maximum reliability (i.e. does the system randomly write in some files for various and potentially turned off purposes)? As for the mysql database, it's not important data, and it's actually reconstructed every time the server boots. Given this, is there a way to store the db in RAM rather than in a file? I'm not sure it's the right place to ask, but I sometimes see redirection to here from stack overflow.
I'm having this problem wherein the ppp program is altering the /etc/resolv.conf file when connecting.This, despite me having set file permissions to read-only. What could be the problem here?
Making a live CD using tools such as livecd-creator seems like a good solution to create a bootable read-only image to install on Compact Flash. My goal is to prevent failure due to write cycle limits of Compact Flash memory. A secondary goal is to have the live CD available for troubleshooting. However, Usenet postings indicate challenges in making the live CD image on CF bootable. Has anyone succeeded in doing this?
I have never worked with Linux before but as part of my new job I need to format and install a program on a compact flash card. I have followed our procedure to the T but when i install the card I get a No bootable partition error. Here is what I'm doing. I go into Gnome terminal and change to my directory to "cd dcmsetupdir" (this may not be important but I want to give as much info as I can. Then I type "sudo ./format_cf". once this is complete (no errors detected), I type in "sudo ./install_cf" this seems to install correctly but when I boot up the unit with the card in I get the no bootable partition error.
I used to be able to write to my SD memory card but just recently it is being automatically mounted as read-only. I checked the read-only tab and tried to set it to the lock position, and to the unlock position. Neither position makes a difference. It was working normally a few days ago. I also tried changing the permission using su
ls -lt gives the following result drwxr-xr-x 4 col root 16384 1970-01-01 01:00 CANON_DC chmod chgrp and chown in su mode don't change anything either.
I tried mounting a different 1GB SD card and it works perfectly. I noticed that when I mount this card I get a window asking me what I want to do, but I don't get this on the other card. It must some kind of setting related to the unwriteable card.
The card in question is a PC Card (PCMCIA) 16Bit Intel Series 2 Flash Memory Card (2MB) and I want to be able to read from and write to the card. I've rebuilt latest stable kernel (2.6.37.2) with all the PCMCIA options turned on or built as modules. I've got an SRAM card, a CompactFlash Card (in a CF to PC-Card adapter) and the Linear Flash card to try, the SRAM card I'm not expecting greatness from, but hoping to prove that the slot works (it registers, but doesn't get much reported from lspcmcia). The CF card in the adapter works. I'm expecting to see a block device in /dev but nothing appears lspci:
I have a project were I have been trying to use Compact Flash (CF Card) was a Ubuntu system drive, but can't seem to successful partition it. I can partition without error, but I go back into the partition tool it gives usually a cryptic error about the partitions. They won't format either. For example Gparted puts orange triangles next to each partition. cfdisk says partition exceeds cylinder boundary. I've tried three different computer, two different CF to IDE adapters (a laptop and desktop type) and four different models/brands of CF cards all are supposed to fixed disk IDE compatible. My theory is the drive geometry is not being detected correctly, or maybe a sector alignment issue. I've tried GUID partitions too and it doesn't help. How do I correctly partition a CF card?
I need to install an aplication to several machines. The aplication runs on a Debian and the installation process is done with a usb. I'm using a plop live usb to perform the installation. I've seen that with plop , once the live system is on, i can run some scripts.
What I'm trying to do is:
->format the target device (a 4G compact flash). ->mount the formatted device. ->untar my debian.tar.gz in that device. After rebooting, the system never boots. Using a live CD and invoking "fdisk -lu" :
I'm trying to install Ubuntu 9.10 to a Compact Flash card. It's not going very well. I have a 4GB USB drive that I want to install from. I can boot from this USB drive and get into either Ubuntu itself or the installation program only. Either way, I've tried to install it.
My Sandisk Extreme IV 4GB 45MB/s compact flash card is detected in my BIOS and shows up during the installation as well. Whenever I try to finalize and start the installation it gets to 15% and then gives an error on how it can't mount the file system.
I've tried every file system available. Funny thing is, I can use gparted to format the card to ext2. It then shows up on the desktop as a drive. If I go into that drive, there's a folder called lost+found. If I try to enter that folder it complains about permissions.
Is there any special trick to installing onto a compact flash card? I've tried with every file system available, with and without a swap file partition as well. I have quite scarce experience with Ubuntu and Linux in general so this is incredibly hard. But I wont give up that easily!
Second thought: If I can't get this working, would it be just as OK to run it as a "live" distro on the CF card? The motherboard is an Intel D945GSEJT. Using 1 gig ram.
I just got an 8 gig compact flash card for my SLR camera. When I open the card (using a card reader) in Nautilus (Ubuntu 10.04) it will only list about 1024 files and not the rest. It does not provide any warnings so one could easily think all files have been copied when in fact they haven't. This could be a real issue if the user does not notice. Using another app called rapid photo downloader in Ubuntu does not seem to list/preview all the files either. I dual boot to win xp 32 bit and I can see all the photos and can copy them to the harddrive without any issues so I don't think it is hardware related. How to get Nautilus to allow the copy of all files?
I have a system with Voyage-Linux (Debian based) as my OS running on a compact flash card. Some files appear to be corrupt on it. Whenever I do a ls,cp,mv,rm command on these files I get the message Stale NFS file handle. I actually had the problem on 2 identical systems. I fixed the first one by attaching the CF card to another linux system and then running e2fsck -f -v /dev/sdb1. It got rid of the bad file.
My problem is I won't be able to do that all the time. I'm gonna have several of these systems in different places and won't have direct access to them, therefore I'm looking for a solution that would work on the system itself. Now running e2fsck on a mounted filesystem seems to be a bad idea from what I read, but I tried anyway and it did not get rid of the file. I tried running tune2fs -c 1 /dev/hda1 and rebooting, which is supposed to run e2fsck after the next boot (not 100% sure here) but that didn't seem to work.
Am in the process of upgrading from an ancient OpenSuSE release (7.2) to 11.2. One thing I have been unable to do that worked fine under 7.2 is remotely mounting a compact flash drive from an XP machine. Worked fine for many moons on 7.2:
# mount -t cifs -o rw //xpbox/'cf (H)' /cf0 I get: mount error(12): Cannot allocate memory Other cifs mounts of hard disks work fine.
I found a posting that says this means the memory allocation error is from the XP side. It says to fiddle with the XP registry, specifically IRPStackSize. I was not confident this fix would work since there should not be anything significantly more consuming with 11.2 compared to 7.2, and indeed, I got the same error after changing the parameter to 18 and rebooting the XP machine. Any ideas? I have some suspicion that the space and parenthesis in the share name might be fouling up someone. XP forces the share name to this for some reason.
I'm trying to install hardy on a portege 3480. I have connected via USB caddy and run it via a lynx build desktop and installed hardy via unetbootin onto the 8gb CF. the machine then boots to the menu where you chan choose live, memtest etc. on choosing the live option to boot the machine up it then bombs out with a error. " menu.c32: not a com32R image Boot:"
it gets this far, so its not far off, but i'm stumped as where to go next
i have read that tftpd is a possibility to get this running but have run into issues setting it up hence looking at removing the CF out for a unetbootin style install.
I am wanting to replace the hard drive on my laptop with a Compact Flash Card. I bought a card and a adapter, but I am seeing that there are a lot of downsides to this (e.g. the card is slower, writes should be conserved because of limited write cycles, etc..) plus, in order to change the hard drive in my laptop (ibook g3 clamshell) you literally have to disassemble the entire thing! I mainly wanted to do this project to increase my battery life. However, some people say that it doesn't make much of a difference, while others say it is wonderful. So, to those that have done this mod, how much of a difference did it make for you?
What are the possible problem when Windows access the file from Ubuntu got Read Only even though have a full permission to read, write and execute the file? Ubuntu to Ubuntu accessing the file there is no problem only Windows got a problem.
I want to compile Mysql for embedded arm systems that has embedded linux in it. Does any body have such this experience to guide me through it step by step?
So in my first ever attempt at Linux (and servers) I was able to set up a working web server that is visible from outside my network and created a simple PHP page thanks to this tutorial. I installed MySQL and have some experience with MS SQL but have no clue how to get started setting up databases and writing procedures in MySQL. I know all the syntax about writing scripts for MySQL (assuming it's the same as SQL) but I don't know how to get started. Do I need to be on the web server or can I do it remotely? Is there a front end GUI that everyone uses?
I have been given a headless linux system running from a SD card. I get into it by putty, directly to root, not other user and even /home dir. Whatever I copy or write will dissapear because is ro.
I am trying to write a C++ Code to read write a XML file in C++.I researched a lot and find xerces is used for that but I am not able to write the code for that.Please provide me some links on how to run a code that R/W a xml file in C++.
One of the tasks I want to do is to read/write from/to any physical address. My question is how do I get a physical address on my Linux desktop. I was thinking of using some utility to dump my BIOS settings, and modify a "not so important" memory address there? Is this possible. Otherwise is there any other physical address I can read/write
I'm using Arch right now and i'm having problems syncing my ipod with Amarok (KDE). Everytime I would want to sync a song, it would give me access denied. it is currently mounted at /tmp/ipodbxQtrU and i have tried using chmod with no luck. I was in root when i used "chmod -R user ipodbxQtrU" and it said operation not permitted.
I need a bash script that can read from a MySQL database field and insert the read information into a variable. I need it to read from a field in the database which will list if somone is using Linux or Windows. Once its done that the code will continue as follows:
Code:
if [ "$var" = "linux" ] ; then OTHER CODE HERE else
I have created directories in root. I am looking for the chmod command to allow all users read and write permissions to a specific directory. I have done chmod 775 for a file but I need this for a directory. This includes permissions on all files and sub directories.