From owner-freebsd-questions Mon Sep 30 12:47:43 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA26318 for questions-outgoing; Mon, 30 Sep 1996 12:47:43 -0700 (PDT) Received: from hp.com (hp.com [15.255.152.4]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id MAA24895 for ; Mon, 30 Sep 1996 12:46:17 -0700 (PDT) Received: from srmail.sr.hp.com by hp.com with ESMTP (1.37.109.16/15.5+ECS 3.3) id AA004542733; Mon, 30 Sep 1996 12:45:33 -0700 Received: from hpnmhjw.sr.hp.com by srmail.sr.hp.com with ESMTP (1.37.109.16/15.5+ECS 3.3) id AA103892661; Mon, 30 Sep 1996 12:44:21 -0700 Received: from mina.sr.hp.com by hpnmhjw.sr.hp.com with SMTP (1.37.109.16/15.5+ECS 3.3) id AA271242660; Mon, 30 Sep 1996 12:44:20 -0700 Message-Id: <199609301944.AA271242660@hpnmhjw.sr.hp.com> To: Mark Cheeseman Cc: questions@freefall.freebsd.org Subject: Re: Adding a second disk - what am I missing? Reply-To: darrylo@sr.hp.com In-Reply-To: Your message of "Mon, 30 Sep 1996 11:36:34 -0000." Date: Mon, 30 Sep 1996 12:44:20 -0700 From: Darryl Okahata Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > I thought sysinstall was supposed to take care of that so I haven't tried it > until now. Everything looks sensible except for the last few lines which > say something like (excuse any typos - I don't have cut/paste here): > > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > c: 2031650 0 unused 0 0 # (Cyl. 0 - 27088*) > > Can I just change "unused" to "freebsd"? What should I do about the 8 > partitions? Change it to 1, or leave it as it is? If and only if all of the following are true: * You're an intermediate- to expert-level user. (DON'T EVEN THINK ABOUT DOING THE FOLLOWING IF YOU'RE A NOVICE USER!) * You have a SCSI disk (you did mention "sd0" -- IDE drives may work in the following, but I don't know). * You want to dedicate the *ENTIRE* disk to FreeBSD. * You have no data on the disk that you want to keep. * You don't mind losing ALL DATA that is currently on the disk. * You don't mind destroying any and all MSDOS or Windows 3.1/95/NT information that is on the disk. * You don't plan on using or sharing the disk with other operating systems (e.g., MSDOS or Windows). * You want to partition the *ENTIRE* FreeBSD slice into a single FreeBSD filesystem. Then, the easiest way to add a dedicated disk is the following: * First, determine the base disk name of the disk you want to add. Your earlier posting said "sd0", a SCSI disk -- is this correct? This implies that you're probably booting off an IDE disk, and not a SCSI disk, as "sd0" is typically the boot drive (when booting from a SCSI disk). * Assuming that "sd0" really is correct (MAKE SURE OF THIS, AS YOU'LL LOSE ALL DATA ON YOUR BOOT DISK, IF YOU'RE WRONG), do the following (assuming Bourne shell /bin/sh syntax): # This won't work if you're using /bin/csh: d=sd0 dd if=/dev/zero of=/dev/r$d count=2 disklabel /dev/r$d | disklabel -B -R -r $d /dev/stdin # We only want one partition, so using slice 'c' should be fine: newfs /dev/r${d}c (Thanks to Bruce Evans for the procedure.) You can then mount the drive via a command like: mount /dev/${d}c /mnt Expert users can partition the FreeBSD slice into multiple filesystems using a slightly different procedure: # This won't work if you're using /bin/csh: d=sd0 dd if=/dev/zero of=/dev/r$d count=2 TMP=/tmp/label$$ disklabel /dev/r$d > $TMP # Edit disklabel to add partitions: vi $TMP disklabel -B -R -r $d $TMP # newfs partitions appropriately [ In case anyone's interested, I'm working on a perl script from h*ll that attempts to simplify adding an hard disk (this perl script generates a shell script that does the proper fdisk/disklabel/newfs crud). I hope to release an alpha version this week to solicit comments. ] -- Darryl Okahata Internet: darrylo@sr.hp.com DISCLAIMER: this message is the author's personal opinion and does not constitute the support, opinion, or policy of Hewlett-Packard, or of the little green men that have been following him all day.