Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jun 1996 17:21:08 GMT
From:      James Raynard <fqueries@jraynard.demon.co.uk>
To:        lupa@3loop9.com
Cc:        questions@FreeBSD.ORG
Subject:   Re: repartition
Message-ID:  <199606251721.RAA01477@jraynard.demon.co.uk>
In-Reply-To: <9606242351.AA07398@netoutfit.com> (message from threeLoopnine Design on Mon, 24 Jun 96 16:57:10 -0000)

next in thread | previous in thread | raw e-mail | index | archive | help
[Cc line drastically pruned - I'm sure most of these people get far
too much mail as it is]

> I have a hard drive that I was previously using for both DOS and FreeBSD. 
> I would now like to remove the DOS partition, or convert it to a FreeBSD 
> Partition without destroying the information on the preexisting FreeBSD 
> partition. I would then like to use that new partition as my /usr 
> partition. Can any of this be done or am I just crazy. Any help would 
> very apreciated.

Yes, FreeBSD has no problem coping with two "primary partitions" on
the same disk.

The easiest way is to re-run the installation program (either reboot
off the boot floppy or run /stand/sysinstall, if your kernel can
run gzip'd executables) and go into the partition editor. Delete the
DOS partition and replace it with a FreeBSD one, use the 'W' command
to write to disk and confirm that you know what you're doing. Then do
'Q' to exit and keep pressing escape until you leave the program.

Then do 'fsck /dev/rxxxxx', where the x's will be replaced by whatever
is correct in your case. eg for the first slice on the first IDE
drive, this would be 'fsck /dev/rwd0s1'. 

All you have to do then is mount it. I would not recommend mounting it
on /usr straight away, as any files that were there previously will
become invisible. One way round this is to drop into single-user mode
('shutdown now'), mount the new partition somewhere else, copy
everything off /usr onto it, unmount it and then mount it on /usr
before exiting single-user mode (you'll need to edit /etc/fstab as
well, to make sure it gets automatically mounted correctly at
reboots). There are probably cleverer ways to do this, but I can't
think of one offhand.

A simpler alternative might be to mount it somewhere like /usr/src or
/usr/local, where you can probably get away without having to go into
single-user mode.

-- 
James Raynard, Edinburgh, Scotland
james@jraynard.demon.co.uk



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