Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Oct 2002 10:29:01 -0400
From:      pippo@bellnet.ca
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: how to add space
Message-ID:  <5.1.0.14.2.20021025185227.00a9c448@pop51.bellnet.ca>
In-Reply-To: <20021024142156.GA87313@happy-idiot-talk.infracaninophi>
References:  <5.1.0.14.2.20021024093139.00a8df48@mail.host45.com> <5.1.0.14.2.20021024093139.00a8df48@mail.host45.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 03:21 PM 10/24/2002 +0100, you wrote:
Big problem after settin up - now there are 2 active partitions - how do I 
de-activate slice 1?
/stand/sysinstall (Fdisk) refused to mark just slice 2 as active even 
though I checked and set it two times... :((

I think there is something that doesn't click with the procedure below 
either because something is wrong with my disk, motherboard or 
god-knows-what - see my comments:

>The easiest thing to do is probably to use some or all of the
>available 4Gb as a new filesystem mounted under /usr.  For instance,
>/usr/local might be a good choice.  You need to copy the current
>contents of /usr/local onto the new partition, move the old /usr/local
>aside somewhere and mount the new one in it's place:
>
>Assuming the disk partition where you have space is /dev/da2s2
>something like the following (in single user mode):
>
>     mount -a
>     fdisk -i da2            [ Mark slice 2 as belonging to FreeBSD ]

This refused to work on my machine (ERROR: bas supercluster or something 
like that - apparently NTFS left the partition somewhat messy. I go around 
that by formatting with Partition Magic to linux and then deleting) and 
then I had to use /stand/sysinstall.

>     disklabel -e da2s2      [ Create a 4.2BSD partition /dev/da2s2e, say ]

This did not work until I used /stand/sysinstall to create ad0s1e (in my 
case) with Label but this required a mount point - /new. Thereafter, 
disklabel did work after checking with -n option first. fBut there now 
seems to be a partition ad0s1a with 0 space)

>     newfs /dev/da2s2e
>     mkdir /usr/local.new
>     mount -t ufs /dev/da2s2e /usr/local.new
>     rsync -avx /usr/local/ /usr/local.new/
>
>         [ rsync(1) is only one way to copy the whole directory tree over.
>           Obviously, you need to install ports/net/rsync before dropping to
>           single user... Another alternative might be:
>
>           cd /usr/local ; tar -cf - . | ( cd /usr/local.new ; tar -xvpf - )
>
>           or there are similar methods using find+cpio, dump+restore etc.]
>
>     umount /usr/local.new
>     mv /usr/local /usr/local.old
>     mkdir /usr/local
>     mount -t ufs /dev/da2s2e /usr/local
>     diff -ur /usr/local.old /usr/local  [ make sure everything copied OK 
> etc. ]
>     vi /etc/fstab                       [ add /dev/da2s2e to standard 
> mounts ]
>     reboot

Here is the problem - no partition information, hence, cannot boot - cheked 
with PM and found both slice 1 (ad0s1) and slice 2 (ad0s2) are marked 
active - I wonder what is going on here?
How do I fix this?
Partition magic cannot deactivate one of the slices - only way is to delete 
slice 1 but that is not very productive... :((

>Now, when the system comes back up multiuser you should have a
>separate /usr/local partition containing the same files as the
>original /usr/local directory.  Once you're satisfied that everything
>has gone according to plan you can delete /usr/local.old and make
>merry in the extra space that becomes available.

PJ



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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