From owner-freebsd-questions@FreeBSD.ORG Thu Nov 28 10:50:14 2013 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAF02D4 for ; Thu, 28 Nov 2013 10:50:14 +0000 (UTC) Received: from rdsmtp.iglou.com (rdsmtp.iglou.com [192.107.41.63]) by mx1.freebsd.org (Postfix) with ESMTP id 6B48215B2 for ; Thu, 28 Nov 2013 10:50:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=iglou.com; s=alpha; h=Content-Type:MIME-Version:References:Message-ID:In-Reply-To:Subject:cc:To:From:Date; bh=nTpNBr3xFBkaiurNJAqBuAEPGx8owCfwXrVz0844JHo=; b=anp7bAmGweFXXWUm8UEIbbnLHeOAaxIZcJzb9rj5XbL8OkAtDICKtOH0R9GzcsRELlQqe9IC9+UA6vSM+TWHtxjrwAM3TSO7c2/Z1RmrgW7by3gbRspxEgrjDpZV2qwE5ORiq7tHGzdFZRE+U4YQA32H29JIBh0xQdm7R+nO3vM=; Received: from iglou2.iglou.com ([192.107.41.8]:39789 helo=mail.iglou.com) by rdsmtp.iglou.com with esmtpa (Exim MTA/8.19.3) (envelope-from ) id 1VlzAj-0005bG-Ly by authid with igloumta_auth for questions@freebsd.org; Thu, 28 Nov 2013 05:50:13 -0500 Received: from shell1.iglou.com ([192.107.41.17]:56535 helo=shell1) by mail.iglou.com with esmtps (TLS cipher TLSv1:AES256-SHA:256) (Exim MTA/8.19.3) (envelope-from ) id 1VlzAj-0005SZ-8M; Thu, 28 Nov 2013 05:50:13 -0500 Date: Thu, 28 Nov 2013 05:50:13 -0500 (EST) From: Darrel X-X-Sender: levitch@shell1 To: Polytropon Subject: [solved]: unlink a directory In-Reply-To: <20131128101933.6356eea4.freebsd@edvax.de> Message-ID: References: <20131128101933.6356eea4.freebsd@edvax.de> User-Agent: Alpine 2.00 (GSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Originating-IP: 192.107.41.17 X-IgLou-Customer: 3cb6f76205bd20f518810676a67a982b Cc: questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 10:50:14 -0000 >> I can not recall how to unlink a directory. Installed a FreeBSD10 system >> from memory and when making the kernel link went to /root/kernels and >> linked rather than /usr/src/sys/amd64. >> >> Now I have this: >> >> (120) @ 4:01:40> ls -L conf >> conf >> (121) @ 4:01:43> ls -P conf >> conf >> (122) @ 4:01:56> ll conf >> lrwxr-xr-x 1 root wheel 24B Nov 24 22:57 conf@ -> >> /usr/src/sys/amd64/conf/ >> (123) @ 4:02:09> pwd >> /usr/src/sys/amd64 >> (124) @ 4:04:22> cd conf >> conf: Too many levels of symbolic links. > > If I understand this correctly, you have: > > /usr/src/sys/amd64/conf -> /usr/src/sys/amd64/conf/ > > So > > /usr/src/sys/amd64> cd conf > > will result in an attempt to cd to > > /usr/src/sys/amd64/(conf=/usr/src/sys/amd64/)(conf=/usr/src/sys/amd64/)... > > This obviously looks wrong. :-) > > > > Probably you should try to remove the conf@ symlink (note: > just a symbolic link, not a "real" directory!) by invoking > > /usr/src/sys/amd64> rm conf > > or > > /usr/src/sys/amd64> unlink conf > > With "man unlink" you'll see that the rm and unlink commands > can easily remove a symbolik link. :-) > > > > If this _fails_, you can try the following, which is a little bit > dangerous and you should know what you're doing: Use a live system > or single user mode (/usr partition _not_ mounted), and call > > # fdsb > > Then in this program, navigate to /usr/src/sys/amd64 (or to > /src/sys/amd64 if /usr is on its own parition), for example by > > cd /src/sys/amd64 > > and then use the > > del conf > > command. When the change has been writte to the file system, > perform a file system check > > # fsck > > Then you should be able to mount it again. > > Note again: This is an extremely dirty method! See "man fsdb" > for details. > > But I assume you won't have to do this. > Thank you- great information! The rm command solved it. I ran 'man un' and 'man ul'- probably should have ran 'apropos unlink'. I have a couple of systems up running ZFS. This time I noticed that the developers had put an "experimental" 'ZFS Root' into the system install. I chose 'mirror'. Other than my typing problem to make a kernel, so far I had to create a directory- seems like the systeminstall did not account entirely for ZFS mirror: # cd bootpool (162) @ 5:37:39> mkdir -p boot/kernel Then the kernel installed. Darrel