Re: Can initramfs be mounted read-only?

From: David Wuertele
Date: Wed Aug 12 2009 - 18:10:46 EST


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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/