From: Wolter Kamphuis Subject: Re: Overwrite mounted filesystem Date: Tue, 07 Oct 2003 17:57:30 +0200 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <3F82E26A.8090507@wkamphuis.student.utwente.nl> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7BIT Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from smtp03.wxs.nl ([195.121.6.37]:40929 "EHLO smtp03.wxs.nl") by vger.kernel.org with ESMTP id S262497AbTJGQw0 (ORCPT ); Tue, 7 Oct 2003 12:52:26 -0400 Received: from wkamphuis.student.utwente.nl (ip3e833697.speed.planet.nl [62.131.54.151]) by smtp03.wxs.nl (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with ESMTP id <0HME00I9F9L0A5@smtp03.wxs.nl> for linux-fsdevel@vger.kernel.org; Tue, 07 Oct 2003 17:55:48 +0200 (MEST) In-reply-to: To: unlisted-recipients:; (no To-header on input) List-Id: linux-fsdevel.vger.kernel.org hi all, Two weeks ago I asked on this list how I could unmount a root filesystem, overwrite it with new content and remount it again, all without rebooting. Bryan Henderson pointed me at the pivot_root function which indeed does what I need. I've been very busy trying but I can't get it to work. I've made the next program to test the pivot_root function and show you my problem: http://wkamphuis.student.utwente.nl/coding-temp/ The problem is the umounting of the old root filesystem, line 342. Even if I close all filedescriptors I still can't unmount it. I looked in the kernel to force a unmount even if the filesystem is busy but that didn't really work. I don't know where to start. does anyone here know what I do wrong or what I should do? thanks in advance, Wolter Kamphuis