Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Apr 2005 09:14:10 -0500
From:      Karl Denninger <karl@denninger.net>
To:        Iain Dooley <mail@iaindooley.com>, Jan Pechanec <jp@devnull.cz>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Uprading to 5.X from 4.X
Message-ID:  <20050425091410.A27358@denninger.net>
In-Reply-To: <426D868B.5000102@iaindooley.com>; from Iain Dooley on Tue, Apr 26, 2005 at 12:08:43AM %2B0000
References:  <426CD319.6010005@iaindooley.com> <20050425012837.GA59690@xor.obsecurity.org> <426CD723.3040906@iaindooley.com> <20050425105037.Y38987@axxem.hide.subzone.cz> <426D868B.5000102@iaindooley.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 26, 2005 at 12:08:43AM +0000, Iain Dooley wrote:
> 
> Jan Pechanec wrote:
> > On Mon, 25 Apr 2005, Iain Dooley wrote:
> > 
> >>>Use sysinstall to do a binary upgrade, or carefully follow the
> >>>directions in the handbook.
> >>
> >>binary upgrade!!! brilliant, i didn't even know it existed. is there a section
> >>in the handbook on it? i couldn't find one. 
> > 
> > 	hi, be sure you know that 5.x uses UFS2. If you do just a binary 
> > upgrade, you keep older UFS1. It will work but generally it may not be a 
> > good idea. j.
> > 
> > http://sixshooter.v6.thrupoint.net/jeroen/faq.html
> 
> so if i install from binaries i should do:
> 
> newfs -U -O 2 /dev/da1s1a
> mount /dev/da1s1a /mnt
> cd /mnt
> dump 0buf 126 - / | restore xbf 126 -
> 
> can someone please explain what these commands are doing? will i lose data that is on the device? if i go through the make buildworld/make installworld process then do i still need to do this to update to UFS2??
> 
> what significance does this:
> 
> 1.18. My /boot/loader reports "Invalid format"?
> 
> from the above article hold for me. is it likely to happen? i read through the /usr/src/UPDATING document for 5.x when i tried to install on my laptop, but still couldn't manage to upgrade from 4.10 to 5.3 without errors. i can't afford to do that on my current system because i need it for work and uni.
> 
> do i have to just back up all my data, install 5.3, format the hard drive and then reinstall all my applications? it'll take ages... 

There is no way to convert a UFS1 to UFS2 filesystem "in place."

If you have a new (empty) disk drive of at least the same size as the one
your files are on now, the 'easy way' is to:

1.	BACK UP EVERYTHING!

2.	Upgrade the system "in place" as a binary upgrade.  You now have 5.x
	but on UFS1.

3.	Set up a new disk as a "data disk", but with the same partitions
	and filesystem sizes under 5.x.  Write the boot loader.  Label these 
	filesystems with UFS2, newfs them, but do NOT install to them.  It is 
	ok for the partitions and filesystems to be larger than the original 
	disk, but if they're smaller, you must make sure the data will fit.

4.	Now, for each filesystem:

	mount /dev/da1s1[x] /mnt
	cd /mnt
	dump 0ubf 126 - / | restore xbf 126 -
	cd /
	sync
	umount /mnt

	(replace "/" with the appropriate mount point for each filesystem,
	corresponding to the slice you mounted in the "x" above)

5.	Shut down and unplug the old disk, plugging in the new disk in its
	place.

The system should boot with the upgraded software and filesystem format.  If
it doesn't for some reason, you still have the original disk and all your
data.

I've used this method before myself; it requires care to make sure you put
the right filesystem in the right place, but its not difficult.  It is, in
fact, how I upgraded from 4.x to 5.x myself a few months ago.

--
-- 
Karl Denninger (karl@denninger.net) Internet Consultant & Kids Rights Activist
http://www.denninger.net	My home on the net - links to everything I do!
http://scubaforum.org		Your UNCENSORED place to talk about DIVING!
http://www.spamcuda.net		SPAM FREE mailboxes - FREE FOR A LIMITED TIME!
http://genesis3.blogspot.com	Musings Of A Sentient Mind




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