From owner-freebsd-questions Thu Nov 16 14:04:06 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id OAA17811 for questions-outgoing; Thu, 16 Nov 1995 14:04:06 -0800 Received: from dtr.com (dtr.rain.com [204.119.8.19]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id OAA17767 for ; Thu, 16 Nov 1995 14:03:59 -0800 From: bmk@dtr.com Received: (from bmk@localhost) by dtr.com (8.6.12/8.6.9) id NAA05055; Thu, 16 Nov 1995 13:56:57 -0800 Message-Id: <199511162156.NAA05055@dtr.com> Subject: Re: Problems with new drive To: smm@uunet.uu.net (Steve Mansfield) Date: Thu, 16 Nov 1995 13:56:57 -0800 (PST) Cc: freebsd-questions@freebsd.org In-Reply-To: from "Steve Mansfield" at Nov 16, 95 03:48:38 pm Reply-To: bmk@dtr.com X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 3092 Sender: owner-questions@freebsd.org Precedence: bulk > I have a system with freebsd installed. I acquired a new, larger drive and > I'm trying to do two things: I assume that you're going to want to replace the old drive with the new one. Or that you'll want to install the new drive as drive 0, and the old as drive 1. There isn't really a cookbook procedure to do this - it depends a lot on how your disk is laid out and what type of hardware you have. I can be of a lot more assistance if you can give some more details. I'll give you the general procedure below. You'll need to understand how FreeBSD handles slices, partitions, and filesystems. The fdisk(8) and disklabel(8) man pages will be a good start. If you can't figure out how to do it from the instructions I'm about to give you, you will probably be better off seeking professional assistance. That is, unless you are an adventurous sort who doesn't mind cleaning up after potentially destructive mistakes. BE WARNED. IF YOU DON'T UNDERSTAND EACH AND EVERY STEP YOU CAN POTENTIALLY WIPE OUT YOUR DATA. Don't say I didn't warn you. :) > 1) Move everything to the new drive without having to re-install freebsd > entirely. This includes the ability to boot. > 2) Make the new drive also boot dos as well. I need to understand how to > install a boot manager for this. What I do is this - temporarily install the new drive as drive 1. You didn't say if it's IDE or SCSI, so I'm going to have to be a bit vague on this. After the drive is physically installed, boot DOS and create a DOS partition. Make the DOS partition the active partition. Format the drive with the /s option. Copy all of your existing DOS stuff to it. Boot FreeBSD to single-user off of your old drive. Create a FreeBSD slice using fdisk. Leave the DOS partition as the active (boot) partition. You'll need to boot it later. Use disklabel to put a disklabel on your new FreeBSD slice - at least create BSD partitions that correspond to your existing ones, plus any additional that you'd like. Use newfs to create filesystems on the new partitions. You can transfer all of the data from existing partitions to new ones using the following as an example: # copy root (/dev/sd0a) to /dev/sd1a newfs /dev/rsd1a mount /dev/sd1a /mnt dump 0f - /dev/sd0a | ( cd /mnt ; restore rf - ) # copy /usr (/dev/sd0f) to /dev/sd1f newfs /dev/rsd1f mount /dev/sd1f /mnt/usr dump 0f - /dev/sd0f | ( cd /mnt/usr ; restore rf - ) You will need to edit /mnt/etc/fstab to make adjustments. Shut the system down, power off, physically install the new drive as drive 0. If you've managed to get this far without destroying the data on your old drive, leave it out - just in case. :) Boot DOS off the new drive. Install the boot manager of your choice. The default FreeBSD boot manager (Booteasy) can be found on the 2.0.5 cdrom in /tools/bootinst.exe. You should be able to boot either FreeBSD or DOS off of your new drive. When you're satisfied with the results, you can either reinstall your old drive as drive 1, or dispose of it as you wish. I find that old drives make _great_ bookends. :)