From owner-freebsd-questions@FreeBSD.ORG Mon May 4 13:39:38 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D68B106564A for ; Mon, 4 May 2009 13:39:38 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id CF9258FC12 for ; Mon, 4 May 2009 13:39:37 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id n44DcsWx084308; Mon, 4 May 2009 09:38:54 -0400 (EDT) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id n44DcsGG084307; Mon, 4 May 2009 09:38:54 -0400 (EDT) (envelope-from jerrymc) Date: Mon, 4 May 2009 09:38:54 -0400 From: Jerry McAllister To: Chris Chambers Message-ID: <20090504133854.GA84251@gizmo.acns.msu.edu> References: <21461620.25281241400402258.JavaMail.myubc2@handel.my.ubc.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21461620.25281241400402258.JavaMail.myubc2@handel.my.ubc.ca> User-Agent: Mutt/1.4.2.2i Cc: questions@freebsd.org Subject: Re: Broken Partition X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 13:39:38 -0000 On Sun, May 03, 2009 at 06:26:42PM -0700, Chris Chambers wrote: > Hi, > > Using partition magic, I freed some space from my msdos partition. Then > using sysinstall's fdisk and label, I attempted to add the space to my > freebsd partition. I broke the installation. The boot loader can not > find /boot/kernal. I tried mounting the partition under FixIt, but mount > says "broken argument". You cannot just slab it on the side of an existing slice with fdisk. You have to create a brand new slice that uses up all the space. There is something called growfs(8) in FreeBSD, but that works on FreeBSD filesystems (FreeBSD partitions) rather than slices. So, you might be able to use the fixit to go back and restore the slice to the way it was and get a backup of it. I am not sure. Do you have any information on exactly which sector it previously started on? You would have to create a slice _identical_ to the old one (without any extra added on) and then use fdisk and bsdlabel to restore the labels _exactly_ as before. Then you might be able to read stuff. I am not sure what fsck would do with it because some links probably have been wiped out. If you can get it to where dump(8) can make a dump of the each of the partitions in the slice (except swap and /tmp - don't back up swap or bother with /tmp), then do that. Then, go back to Partition Magic and delete the FreeBSD slice and then create a completely new one that combines the space of what you shaved off from MSdos with the previous FreeBSD slice. Then you can go back to sysinstall (or manually with fdisk-bsdlabel-newfs) and create the new, larger FreeBSD slice, divide it in to partitions and make file systems out of them with newfs. I think you will be extremely lucky if you can pull off rescuing the old FreeBSD slice though. You will have to get it to start on the same sector and have identical links. You might have to use backup superblocks that are built in to the filesystems if you can get to them. This probably stems from a misunderstanding on how slices, partitions and filesystems work. Although most everything is flexible, the beginnings of each are rather fixed and cannot be arbitrarily shoved around without being remade from scratch. ////jerry > > Any ideas? > > Chris > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"