public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* unmounting a filesystem mounted by /init (initramfs)
@ 2005-07-28 22:49 Rafael Espíndola
  2005-07-29  5:34 ` Denis Vlasenko
  0 siblings, 1 reply; 4+ messages in thread
From: Rafael Espíndola @ 2005-07-28 22:49 UTC (permalink / raw)
  To: gentoo-dev, gentoo-catalyst, linux-kernel

I am trying to build a system that uses a unionfs as root. The init
script is based on the one used by gentoo and uses initramfs. The
problem is how to remount the unionfs constituents read only during
halt.

cat /proc/mounts displays /dev/hda1 (ext2) mounted rw in /memory. The
problem is that /memory is no longer visible after the init script did
a chroot and a

mount -o remount,ro /dev/hda1

says that /dev/hda1 is not mounted!

does any anyone has an idea?

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: unmounting a filesystem mounted by /init (initramfs)
  2005-07-28 22:49 unmounting a filesystem mounted by /init (initramfs) Rafael Espíndola
@ 2005-07-29  5:34 ` Denis Vlasenko
  2005-07-29 13:37   ` Rafael Ávila de Espíndola
  2005-07-29 20:24   ` Rafael Ávila de Espíndola
  0 siblings, 2 replies; 4+ messages in thread
From: Denis Vlasenko @ 2005-07-29  5:34 UTC (permalink / raw)
  To: Rafael Espíndola, gentoo-dev, gentoo-catalyst, linux-kernel

On Friday 29 July 2005 01:49, you wrote:
> I am trying to build a system that uses a unionfs as root. The init
> script is based on the one used by gentoo and uses initramfs. The
> problem is how to remount the unionfs constituents read only during
> halt.
> 
> cat /proc/mounts displays /dev/hda1 (ext2) mounted rw in /memory. The
> problem is that /memory is no longer visible after the init script did
> a chroot and a

"A chroot"? Better provide exact sequence of mounts, chroots which you
execute. Otherwise people need to guess.
 
> mount -o remount,ro /dev/hda1
> 
> says that /dev/hda1 is not mounted!
> 
> does any anyone has an idea?

Use lazy umount (umount -l) while fs is still visible
--
vda


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: unmounting a filesystem mounted by /init (initramfs)
  2005-07-29  5:34 ` Denis Vlasenko
@ 2005-07-29 13:37   ` Rafael Ávila de Espíndola
  2005-07-29 20:24   ` Rafael Ávila de Espíndola
  1 sibling, 0 replies; 4+ messages in thread
From: Rafael Ávila de Espíndola @ 2005-07-29 13:37 UTC (permalink / raw)
  To: Denis Vlasenko; +Cc: gentoo-dev, gentoo-catalyst, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 867 bytes --]

On Friday 29 July 2005 02:34, Denis Vlasenko wrote:
> "A chroot"? Better provide exact sequence of mounts, chroots which you
> execute. Otherwise people need to guess.
The relevant commands are:

mount -t ext2 /dev/hda1 /memory
mount -t unionfs -o dirs=/memory /union
mount -t squashfs /dev/hda2 /newroot
unionctl /union --add --after 0 --mode ro /newroot
chroot /union /sbin/init

The most promissing Idea I had till now is to move the ext2 mount and the 
unionctl past the point were /sbin/rc runs udevstart. I will try it as soon 
as possible.

> Use lazy umount (umount -l) while fs is still visible
The busybox umount doesn't support lazy unmount :(
Anyway, I don't think that this would work since the unionfs will be using the 
ext2 partition to the very end and there won't be a chance to unmount it.

> vda
Thank you very much,
Rafael

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: unmounting a filesystem mounted by /init (initramfs)
  2005-07-29  5:34 ` Denis Vlasenko
  2005-07-29 13:37   ` Rafael Ávila de Espíndola
@ 2005-07-29 20:24   ` Rafael Ávila de Espíndola
  1 sibling, 0 replies; 4+ messages in thread
From: Rafael Ávila de Espíndola @ 2005-07-29 20:24 UTC (permalink / raw)
  To: gentoo-catalyst, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 271 bytes --]

> Use lazy umount (umount -l) while fs is still visible
This works after all :)

I was I bit confused on how to remove the ext2 from the union but manage to do 
it. Then it was a simple matter of implementing lazy unmount in busybox.

Thank you very much,
Rafael

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-07-29 20:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-28 22:49 unmounting a filesystem mounted by /init (initramfs) Rafael Espíndola
2005-07-29  5:34 ` Denis Vlasenko
2005-07-29 13:37   ` Rafael Ávila de Espíndola
2005-07-29 20:24   ` Rafael Ávila de Espíndola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox