Re: mount as read/write on demand

2014-02-22 Thread binary

i have done this

mount -o remount,ro and then run apt-get upgrade.
it worked and writed everything to the card.
then i unplugged the power to simulate a power failure and the system got 
corrupted.
this is what i am looking to avoid. mount as read only by default, to protect 
from power failures.



Στις 21/2/2014 23:44, ο/η Andrei POPESCU έγραψε:

On Vi, 21 feb 14, 22:25:17, binary wrote:

i am afraid that the

mount -o remount,rw is not working.

You'll have to give much more detail than this, like what was the
result/error message/etc.

Kind regards,
Andrei



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/53086174.7060...@gmail.com



Re: mount as read/write on demand

2014-02-22 Thread binary

I forgot to mention my /etc/fstab

proc/proc   procdefaults00
sysfs/syssysfs   defaults00
/dev/sda1   /   ext2noatime,errors=remount-ro   0   1


Στις 22/2/2014 10:36, ο/η binary έγραψε:

i have done this

mount -o remount,ro and then run apt-get upgrade.
it worked and writed everything to the card.
then i unplugged the power to simulate a power failure and the system 
got corrupted.
this is what i am looking to avoid. mount as read only by default, to 
protect from power failures.




Στις 21/2/2014 23:44, ο/η Andrei POPESCU έγραψε:

On Vi, 21 feb 14, 22:25:17, binary wrote:

i am afraid that the

mount -o remount,rw is not working.

You'll have to give much more detail than this, like what was the
result/error message/etc.

Kind regards,
Andrei






Re: mount as read/write on demand

2014-02-22 Thread Reco
 Hi.

On Sat, 22 Feb 2014 10:57:48 +0200
binary dreamer.bin...@gmail.com wrote:

 I forgot to mention my /etc/fstab
 
 proc/proc   procdefaults00
 sysfs/syssysfs   defaults00
 /dev/sda1   /   ext2noatime,errors=remount-ro   0   1

Surely you realize that 'errors=remount-ro' should only work in case
you encounter any filesystem error?


 Στις 22/2/2014 10:36, ο/η binary έγραψε:
  i have done this
 
  mount -o remount,ro and then run apt-get upgrade.

I assume you've meant 'mount -o remount,rw'.


  it worked and writed everything to the card.

Did you invoked 'sync' afterwards?
Did you remount filesystem back to read-only status?


  then i unplugged the power to simulate a power failure and the system 
  got corrupted.

Did you run fsck.ext2 on the boot following the simulated power failure?


Reco


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20140222173603.2d598e889b0efeaaaf93c...@gmail.com



Re: mount as read/write on demand

2014-02-22 Thread binary

sorry, i am lost.
what is the solution to my problem?


Στις 22/2/2014 15:36, ο/η Reco έγραψε:

  Hi.

On Sat, 22 Feb 2014 10:57:48 +0200
binary dreamer.bin...@gmail.com wrote:


I forgot to mention my /etc/fstab

proc/proc   procdefaults00
sysfs/syssysfs   defaults00
/dev/sda1   /   ext2noatime,errors=remount-ro   0   1

Surely you realize that 'errors=remount-ro' should only work in case
you encounter any filesystem error?



Στις 22/2/2014 10:36, ο/η binary έγραψε:

i have done this

mount -o remount,ro and then run apt-get upgrade.

I assume you've meant 'mount -o remount,rw'.



it worked and writed everything to the card.

Did you invoked 'sync' afterwards?
Did you remount filesystem back to read-only status?



then i unplugged the power to simulate a power failure and the system
got corrupted.

Did you run fsck.ext2 on the boot following the simulated power failure?


Reco





--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/5308b555.60...@gmail.com



Re: mount as read/write on demand

2014-02-22 Thread Reco
 Hi.

On Sat, 22 Feb 2014 16:33:57 +0200
binary dreamer.bin...@gmail.com wrote:


Please refrain from top-posting on this list.


 sorry, i am lost.

Hmm. I believe I've just asked a couple of simple questions.
Sorry those led to your confusion.

 what is the solution to my problem?

There's no simple solution to your problem. The filesystem layout
you're using will prevent you from using read-only root filesystem.

The reason is - you cannot remount a filesystem read-only if:

- You have processes which write in this filesystem.
- You've changed some binaries and libraries, and have processes which
were launched from those binaries and libraries before the overwrite.

The former is nearly always happens with syslog (which writes to the
files in /var/log). You're have /var directory in the root filesystem
(which you want to make read-only).

The latter will happen on any upgrade.

Still, while read-only root is can be done in Debian:

https://wiki.debian.org/ReadonlyRoot

read-only /var is impossible unless you're using some kind of
livecd/liveusb.

Reco


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20140222194558.cf9b788611ebe3c5eecaa...@gmail.com



Re: mount as read/write on demand

2014-02-21 Thread binary

i am afraid that the

mount -o remount,rw is not working.

is there a howto for this?
i am running squeeze 6.0.9



Στις 19/2/2014 17:50, ο/η Efraim Flashner έγραψε:

On Tue, 18 Feb 2014 15:47:19 +0100
Erwan David er...@rail.eu.org wrote:


Le 18/02/2014 15:42, binary dreamer a écrit :

Hello everyone.
  
  
I am running some services in a remote headless system. the system

runs debian 6.
I would like the system to be read only by default. in case of an
update/upgrade I could run in read/write to process the job.
the filesystem is ext2 and it runs in a cf card.
  
I have seen voyage Linux that has this functionality but it misses

kernel headers. It is a real pain to compile the headers in this
underpowered box.
  
I would like to ask if someone could help me create a system

read/write on demand.
  
  
Thanks in advance.
  
  

mount -o remount,rw mount point should do the trick (and mount -o
remount,ro after use)



and change the listing in /etc/fstab from rw to ro



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/5307b62d.7010...@gmail.com



Re: mount as read/write on demand

2014-02-21 Thread Andrei POPESCU
On Vi, 21 feb 14, 22:25:17, binary wrote:
 i am afraid that the
 
 mount -o remount,rw is not working.

You'll have to give much more detail than this, like what was the 
result/error message/etc.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
http://nuvreauspam.ro/gpg-transition.txt


signature.asc
Description: Digital signature


Re: mount as read/write on demand

2014-02-19 Thread Efraim Flashner
On Tue, 18 Feb 2014 15:47:19 +0100
Erwan David er...@rail.eu.org wrote:

 Le 18/02/2014 15:42, binary dreamer a écrit :
  Hello everyone.
   
   
  I am running some services in a remote headless system. the system
  runs debian 6.
  I would like the system to be read only by default. in case of an
  update/upgrade I could run in read/write to process the job.
  the filesystem is ext2 and it runs in a cf card.
   
  I have seen voyage Linux that has this functionality but it misses
  kernel headers. It is a real pain to compile the headers in this
  underpowered box.
   
  I would like to ask if someone could help me create a system
  read/write on demand.
   
   
  Thanks in advance.
   
   
 
 mount -o remount,rw mount point should do the trick (and mount -o
 remount,ro after use)
 
 

and change the listing in /etc/fstab from rw to ro


signature.asc
Description: PGP signature


Re: mount as read/write on demand

2014-02-18 Thread Erwan David
Le 18/02/2014 15:42, binary dreamer a écrit :
 Hello everyone.
  
  
 I am running some services in a remote headless system. the system
 runs debian 6.
 I would like the system to be read only by default. in case of an
 update/upgrade I could run in read/write to process the job.
 the filesystem is ext2 and it runs in a cf card.
  
 I have seen voyage Linux that has this functionality but it misses
 kernel headers. It is a real pain to compile the headers in this
 underpowered box.
  
 I would like to ask if someone could help me create a system
 read/write on demand.
  
  
 Thanks in advance.
  
  

mount -o remount,rw mount point should do the trick (and mount -o
remount,ro after use)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/53037277.6010...@rail.eu.org