Re: readonly filesystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2/8/06, Sauro Salomoni <sauro@xxxxxxxxxxx> wrote:
pradeep singh wrote:

> Hi all
>
> Is it possible somehow for me to make my normal Linux root filesystem
> a read only filesystem.
>
> I mean even for root too.
>
> I anticipate a question being asked in reply ,why do i want this? :-)
>
> So this is not because i want it but when i installed FC 5 test 2 , i
> was not able to boot as it said there is no inittab file strangely.
>
> So this means i have to create it ,manually but then it couldnt mount
> the root partition in single user mode, saying it is already mounted
> or in use.
>
> Then i copied inittab from my other installation to the /etc of FC5
> and i could boot but surprisingly it acepted whatever i entered as
> root's passwd. :(
>
> i thought i did something wrong ( which i think i did perhaps ), so
> tried creating a file but then it said filesystem is readonly.
>
> Also i formatted my root partition as reiserFS partition.
>
> Later when i reinstalled with ext3 option everything went fine .
>
> but still this gave inquisity of my original question.
>
> Can i make my installed rootFS a readonly FS for everybody?
>
> TIA
> --
> play the game


Well, I didn't understand half what you did, but answering to your question:
YES, you can mount any partition as read only. In particular, in
embedded projects we usually use CRAMFS, because besides being read
only, it compacts the file system with a  nice 40% ratio. (see mkfs.cramfs)

I don't know if that's what you want for your workstation, but it's the
answer to your question. Hope it can help you out.

--
Best Regard,
Sauro Salomoni

Engineer
Ztec
Phone: +55 61 322-2544   FAX:+55 61 224-7171
www.ztec.com.br


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


also, when you boot your kernel, the order is usually:

1. mount kernel in read-only mode (look at your boot loader config file for a kernel parameter 'ro'
2. Perform filesystem checks (fsck), the above step is taken to avoid corruption at this stage i think.
3. Your init scripts *remount* your root partition as 'rw' and you go on your way.

just some extra info, which may explain how you got the errors you got in the first place.

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux