LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
Search this Thread
Old 06-06-2012, 01:20 PM   #1
zvivered
Member
 
Registered: Sep 2007
Posts: 119

Rep: Reputation: 15
How to prevent linux write to a disk ?


Hi All,

My PC104 (pentium M, 1.4GHz) runs vanilla 2.6.27.35
The PC access FPGA via PCI every 3ms.
The FPGA initiates DMA (every 3ms) of data to a pre-allocated physical RAM in the PC104.

We noticed that if PC104 writes to its flash disk (from which linux boots), the data received by DMA is sometimes corrupted.
This is probably because the IDE controller is also on the same PCI bus.

The disk is divided into 2 ext3 partitions.
The first partition contains all the linux file system (boot,etc,bin,usr,tmp...)
The second partition contains the application + configuration files.

I set the first partition to read-only in the grub line.
I set the second partition to read-only using /etc/fstab

How can I prevent linux from writing to the disk ?

The application does not write to the disk at all.

Thanks,
Zvika
 
Old 06-07-2012, 02:35 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,107

Rep: Reputation: 89
If your bootloader support read-only partition, you can use that.
 
Old 06-11-2012, 07:52 AM   #3
cnxsoft
Member
 
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 166

Rep: Reputation: 29
You can try to run Linux in a ramdisk.
 
Old 06-11-2012, 08:47 PM   #4
jefro
Guru
 
Registered: Mar 2008
Posts: 12,478

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
I am really confused. Unless you are in a live cd sort of boot, a normal linux install would try to write changes to disks.


"We noticed that if PC104 writes to its flash disk (from which linux boots), the data received by DMA is sometimes corrupted.
This is probably because the IDE controller is also on the same PCI bus. "

I'd be more inclined to think that crummy pci to flash adapter rather or some issue with dma settings for that issue.

Without your application you need to get this setup stable. Try other flash cards or other pci-card adapters or move the adapter to other slots or set bios settings slower.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to prevent "write" access on a SFTP server (sshd) ajaygarg Linux - Desktop 2 03-19-2012 03:33 AM
[SOLVED] Safe to tune2fs a mounted volume to prevent disk checks at reboot? rjo98 Linux - Newbie 6 02-06-2012 04:37 PM
Any way to prevent file system corruption when power is interrupted during disk write weshutchins Linux - General 8 03-22-2011 02:17 PM


All times are GMT -5. The time now is 09:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration