Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Oct 2006 15:46:18 -0400
From:      Jerry McAllister <jerrymc@msu.edu>
To:        Wayne <wc_fbsd@xxiii.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to Re-Label / Re-create filesystems?
Message-ID:  <20061002194618.GA47368@gizmo.acns.msu.edu>
In-Reply-To: <45215E6E.3000907@xxiii.com>
References:  <45215E6E.3000907@xxiii.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 02, 2006 at 02:46:06PM -0400, Wayne wrote:

> Could someone point me to instructions or offer suggestions on how to 
> re-configure file systems on a 6.x system?
> 
> When I installed from CD, I used the sysinstall menu, which I guess 
> actually calls bsdlabel and newfs (??)
> 
> I want to delete two filesystems, and recreate one large one in the same 
> space.  I tried dropping to single user and running sysinstall, but it 
> protests it can't write to the device... even when I only had things 
> mounted read-only.  Can I safely use the boot CD to do this?  I don't 
> want to experiment too much and clobber the whole drive!

Sysinstall calls fdisk, bsdlabel and newfs as well as mkdir to create
your mount points.

Yes, you can do it from a CD boot. 

FIRST:  Back up every file system on the disk you are modifying using dump 
on to some media that will be unaffected by the changes, such as tape or 
another disk.

Boot the CD and select the fixit item - I can't remember just how
it is labeled and don't want to take something down to look right now.
But, it is the one that gives you a limited running system with UNIX
prompt.

Then, use bsdlabel to create a new partition structure.  Make sure
you make the a partition bootable.   It probably already is and won't
be affected by these machinations as long as you don't change the slice
or boot sector.

Then newfs the partitions to make file systems of them.

Fix up your fstab file to reflect the changes 

reload the dumps using restore.
Make sure you CD in to each file system to do the restore for it.

Reboot.   If you messed up fstab, you may have to boot in to single
user and fix it.   

Should work just fine.

////jerry

> 
>  -Thanks,  Wayne
> 
> _______________________________________________
> 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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061002194618.GA47368>