* Can initramfs be mounted read-only?
@ 2009-08-12 19:47 David Wuertele
2009-08-12 21:24 ` Alan Jenkins
0 siblings, 1 reply; 4+ messages in thread
From: David Wuertele @ 2009-08-12 19:47 UTC (permalink / raw)
To: linux-kernel
I've been trying to create a system with a read-only rootfs using initramfs,
but I'm not having any luck. I've included "ro" on my command line and when
I cat /proc/cmdline it reports "ro" like I expect. But when I type "mount",
I see this:
rootfs on / type rootfs (rw)
And I can create new files and write to them just fine. Is it possible to
mount an initramfs read-only?
The documentation for early userspace and initramfs does not talk about
read/write permissions.
Thanks,
Dave
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can initramfs be mounted read-only?
2009-08-12 19:47 Can initramfs be mounted read-only? David Wuertele
@ 2009-08-12 21:24 ` Alan Jenkins
2009-08-12 22:10 ` David Wuertele
0 siblings, 1 reply; 4+ messages in thread
From: Alan Jenkins @ 2009-08-12 21:24 UTC (permalink / raw)
To: David Wuertele; +Cc: linux-kernel
On 8/12/09, David Wuertele <dave+gmane@wuertele.com> wrote:
> I've been trying to create a system with a read-only rootfs using initramfs,
> but I'm not having any luck. I've included "ro" on my command line and when
> I cat /proc/cmdline it reports "ro" like I expect. But when I type "mount",
> I see this:
>
> rootfs on / type rootfs (rw)
Changing this could potentially break a lot of systems. At least
Debian has "ro" as a default boot option, and it uses an initramfs by
default.
> And I can create new files and write to them just fine. Is it possible to
> mount an initramfs read-only?
>
> The documentation for early userspace and initramfs does not talk about
> read/write permissions.
Have you tried running "mount / -oremount,ro" in an init script?
Regards
Alan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can initramfs be mounted read-only?
2009-08-12 21:24 ` Alan Jenkins
@ 2009-08-12 22:10 ` David Wuertele
2009-08-12 23:05 ` Christoph Lameter
0 siblings, 1 reply; 4+ messages in thread
From: David Wuertele @ 2009-08-12 22:10 UTC (permalink / raw)
To: linux-kernel
Alan Jenkins <sourcejedi.lkml <at> googlemail.com> writes:
>> I've been trying to create a system with a read-only rootfs using initramfs,
>
> Changing this could potentially break a lot of systems. At least
> Debian has "ro" as a default boot option, and it uses an initramfs by
> default.
I don't want to change it for everybody, just my own system. Since I'm not
using Debian, or any other distribution, I can handle the consequences.
>> Is it possible to
>> mount an initramfs read-only?
>
> Have you tried running "mount / -oremount,ro" in an init script?
Yes, and it works (the rootfs appears read-only after doing this).
I was hoping to get it to be read-only before init gets run.
Dave
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can initramfs be mounted read-only?
2009-08-12 22:10 ` David Wuertele
@ 2009-08-12 23:05 ` Christoph Lameter
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Lameter @ 2009-08-12 23:05 UTC (permalink / raw)
To: David Wuertele; +Cc: linux-kernel
Try cramfs or romfs instead? Those are definitely readonly.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-08-12 23:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-12 19:47 Can initramfs be mounted read-only? David Wuertele
2009-08-12 21:24 ` Alan Jenkins
2009-08-12 22:10 ` David Wuertele
2009-08-12 23:05 ` Christoph Lameter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®