5.x to 6.x or 7.x with 64MB /

Ronald Klop ronald-freebsd8 at klop.yi.org
Mon Aug 4 19:42:14 UTC 2008


On Mon, 04 Aug 2008 18:48:03 +0200, Nick Barnes <Nick.Barnes at pobox.com>  
wrote:

> I have a machine which I have recently upgraded using cvsup, from 4.x
> to RELENG_5, as a staging post en route to 7.x.  The upgrade went well
> until installworld ran out of disk on / and I realised it was only
> 64BMB.  My bad; should have checked before upgrading.  With help from
> an on-site colleague the installworld was nursed to completion.  But
> can I get the same machine up to 6.x or 7.x without repartitioning?
> Advice please.
>
> Partitions are as follows.
>
> ad0     2439 M
> ad0s1   2439 M
> ad0s1a    64 M /
> ad0s1b   128 M swap
> ad0s1e  1024 M /var
> ad0s1f   600 M /home
> ad0s1g   623 M -
> ad1    57259 M
> ad1s1  57259 M
> ad0s1a 10240 M /usr
>
> It occurs to me that if ad0s1a is insufficient then I could use ad0s1g
> as swap, and repurpose ad0s1b as a new /.  Is it straightforward to
> installworld/mergemaster to somewhere other than / ?

That is very well doable. On boot you can interrupt the boot process by  
pressing space an set another location for the kernel.
More information is here.
http://www.freebsd.org/doc/en/books/handbook/boot-blocks.html

The rest is just about files.
After you copy everything in ad0s1b (with a fs in it) you can boot from  
ad0s1b:/boot/kernel.

I think you can do something like make installkernel DESTDIR=/blabla, but  
I'm not sure.

Maybe more easy is booting with a LIVE-cd. Than you can mount everything  
needed for installworld in /mnt/tmproot, so you get:
/mnt/tmproot mounted the _new_ / partition (ad0s1b?)
/mnt/tmproot/usr where /usr is mounted (ad0s1a)
/mnt/tmproot/var where /var is mounted (ad0s1e)

Do a chroot /mnt/tmproot and than run installworld and mergemaster as  
usual from /usr/src.

Don't forget to make a backup. It is on your own risk. ;-)

Ronald.


More information about the freebsd-stable mailing list