Uprading to 5.X from 4.X
karl at denninger.net
Mon Apr 25 07:14:12 PDT 2005
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
dump 0ubf 126 - / | restore xbf 126 -
(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
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
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 at 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
More information about the freebsd-stable