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 / ? Nick B
On Mon, 04 Aug 2008 18:48:03 +0200, Nick Barnes <Nick.Barnes@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.
On Tue, Aug 5, 2008 at 2:48 AM, Nick Barnes <Nick.Barnes@pobox.com> wrote:> 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 / ?The DESTDIR directive will allow you to redirect your installworld to a different location, as for mergemaster IIRC this can be done (been a while since I was working on my embedded stuff that needed all this FreeBSD 6.something in about 8MB) but I can't remember what switches. It might be worth considering building /bin and /sbin dynamically (20oddMB to about 500kB), mind I can't remember where the required libs would be, if they're in /lib it'd be all good, if they're in /usr/lib you're stuck. All things considered I think your best option is to move / to a different partition. Should be relatively painless to do from a LiveCD, mount everything, duplicate / to somewhere else, modify fstab and the bootloader config, reboot.