Date: Fri, 13 Oct 2006 09:41:37 +0200 From: VANHULLEBUS Yvan <vanhu_bsd@zeninc.net> To: freebsd-hackers@freebsd.org Subject: Fscking a partition mounted Read only... Message-ID: <20061013074136.GA31459@zen.inc>
next in thread | raw e-mail | index | archive | help
Hi all.
I didn't really know where to post this question, so I try
"hackers"....
When rc starts, root filesystem is already mounted readonly, and fsck
runs ok, then root is remounted read/write.
Later, if root filesystem is remounted readonly, then fsck is called,
it will says "NO WRITE ACCESS".
If "later" is "in multi user mode with lots of running process", I
guess it is a really bad idea to run fsck, but if "later" is "still
very early during rc process", it should not generate more problems
than the usual fsck.
My exact situation is:
- run a custom init
* remounts root read/write
* do some write operations on root filesystem
* remount root read-only (mnt_flags = MNT_RDONLY|MNT_UPDATE,
export.ex_flags = MNT_EXRDONLY in mount syscall).
* execv real /sbin/init
- init starts
- rc starts
- fsck says "NO WRITE ACCESS"....
Is there a way to remount root read only in the exact same state as it
is when init starts ?
Thanks,
Yvan.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061013074136.GA31459>
