From owner-freebsd-questions@FreeBSD.ORG Fri May 25 20:21:29 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C51B106566B for ; Fri, 25 May 2012 20:21:29 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 37AED8FC15 for ; Fri, 25 May 2012 20:21:29 +0000 (UTC) Received: from r56.edvax.de (port-92-195-20-192.dynamic.qsc.de [92.195.20.192]) by mx01.qsc.de (Postfix) with ESMTP id 2B3863CFED; Fri, 25 May 2012 22:21:26 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id q4PKLP6Z002296; Fri, 25 May 2012 22:21:25 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Fri, 25 May 2012 22:21:23 +0200 From: Polytropon To: freebsd@dreamchaser.org Message-Id: <20120525222123.474401eb.freebsd@edvax.de> In-Reply-To: <4FBFE5E2.6070305@dreamchaser.org> References: <4FBBF32D.9070505@dreamchaser.org> <20120522234510.a406941d.goksin.akdeniz@gmail.com> <4FBD7BA0.7070502@dreamchaser.org> <4FBEE05A.6000909@dreamchaser.org> <20120525035108.a3af81c1.freebsd@edvax.de> <4FBFAB5B.6010405@dreamchaser.org> <4FBFCC61.2010504@dreamchaser.org> <4FBFE5E2.6070305@dreamchaser.org> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: removing /var/empty on a non-system disk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2012 20:21:29 -0000 On Fri, 25 May 2012 14:04:50 -0600, Gary Aitken wrote: > something I'm not seeing > > I've got a disk previously used as a sys disk I'm trying to clean up. > What's the key to removing /var/empty? > > 280 /hd1/var#sysctl kern.securelevel > kern.securelevel: -1 > 281 /hd1/var#ls -l > total 4 > dr-xr-xr-x 2 root wheel 512 Jan 3 00:55 empty > 282 /hd1/var#chflags noschg empty > 283 /hd1/var#chmod 777 empty > chmod: empty: Operation not permitted > 284 /hd1/var#rmdir empty > rmdir: empty: Operation not permitted Interesting, I just tried this on my home system (FreeBSD 8.2-STABLE) and it worked as intended. I did use the exact commands, same securelevel. Use the -o option for ls (ls -lo) to check on the effect of chflags and chmod. Without eexamining this behaviour in more detail, how about this approach? Unmount the former system disk and newfs it? That should "solve" the problem. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...