[wplug-bsd] Fdisk? formatting ext2 partitions as ufs

Tom Rhodes trhodes at FreeBSD.org
Thu Nov 4 00:32:54 EST 2004


On Mon, 1 Nov 2004 14:01:08 -0500
Bill Moran <wmoran at potentialtech.com> wrote:

> Brandon Kuczenski <brandon at 301south.net> wrote:
> 
> > On Mon, 1 Nov 2004, Bill Moran wrote:
> > 
> > > Not that I can imagine.
> > >
> > > Here's what I recommend.
> > > 1) Back up your critical data _off_ this computer.  You're 100% right that
> > >    it's pretty catastrophic if you format the wrong partition.
> > > 2) umount the partition you want to reformat.
> > > 3) Look in /etc/fstab to see what device that partition uses.
> > > 4) newfs that device (i.e. newfs /dev/ad0s1a ... or whatever the partition
> > >    name ends up being.)
> > > 5) Alter /etc/fstab to change ext2 to ufs for that partition.
> > > 6) Remount and replace your data.
> > > 7) Rinse and repeat for the next partition.
> > >
> > 
> > So no fdisk - all I need to do is newfs?  Ahh, that's lovely.
> 
> I don't think so.  At the most, you may have to use fdisk to change the
> partition type from ext2 to ufs, but newfs may do that for you.  I can't
> see any need to repartition in any event.

No, fdisk should not be a requirement here.  The newfs(8)
utility should automagically set the magic number to 165 for
the BSD FFS (orginal UFS but one with enhancements).  I
recommend using -O 2 with newfs(8) if you are using FreeBSD
5.2 or latter.  It has some better features which you will like
and currently there is no conversion tool in existance for
it.

Best of luck!

(hint, you would need to install boot blocks if this was the
boot partition.)

-- 
Tom Rhodes


More information about the wplug-bsd mailing list